Proactor 学习1
2015-08-16 22:59
316 查看
Proactor An Object Behavioral Pattern for Demultiplexingand Dispatching Handlers for Asynchronous Events
Douglas C. Schmidt
Known Uses
The following are some widely documented uses of the Proctor pattern:
I/O Completion Ports in Windows NT:
The Windows NT operating system implements the Proactor pattern.
Various Asynchronous Operations such as accepting new network connections, reading and writing to files and
sockets, and transmission of files across a network connection are supported by Windows NT.
The operating system is the Asynchronous Operation Processor.
Results of the operations are queued up at the I/O completion port
(which plays the role of the Completion Dispatcher).
The UNIX AIO Family of Asynchronous I/O Operations:
On some real-time POSIX platforms, the Proactor pattern is implemented by the aio family of APIs
These OS features are very similar to the ones described above for Windows NT.
One difference is that UNIX signals can be used to implement an truly asynchronous Completion Dispatcher
(the Windows NT API is not truly asynchronous).
ACE Proactor:
The Adaptive Communications Environment (ACE) implements a Proactor component that encapsulates I/O Completion Ports on Windows NT
and the aio APIs on POSIX platforms.
The ACE Proactor abstraction provides an OO interface to the standard C APIs supported by Windows NT.
Asynchronous Procedure Calls in Windows NT:
Some
systems (such as Windows NT) support Asynchronous Procedure Calls (APC)s.
An APC is a function that executes asynchronously in the context of a particular thread.
When an APC is queued to a thread, the system issues a software interrupt.
The next time the thread is scheduled, it will run the APC.
APCs made by operating system are called
kernelmode APCs. APCs made by an application are called
usermode APCs.
在windows服务器中要创建高性能,灵活服务器必然涉及到IOCP的使用。而IOCP又是Proactor Pattern的实践。
同时随着java跨平台语言的发展,java语言在JDK7(2009年)提供了对于Asyn IO的支持,为java语言作为跨平台网络服务器提供了更好的支持。
java NIO中的Aysn I/O 同时也是一种对于Proactor Pattern的实践。
Douglas C. Schmidt
Known Uses
The following are some widely documented uses of the Proctor pattern:
I/O Completion Ports in Windows NT:
The Windows NT operating system implements the Proactor pattern.
Various Asynchronous Operations such as accepting new network connections, reading and writing to files and
sockets, and transmission of files across a network connection are supported by Windows NT.
The operating system is the Asynchronous Operation Processor.
Results of the operations are queued up at the I/O completion port
(which plays the role of the Completion Dispatcher).
The UNIX AIO Family of Asynchronous I/O Operations:
On some real-time POSIX platforms, the Proactor pattern is implemented by the aio family of APIs
These OS features are very similar to the ones described above for Windows NT.
One difference is that UNIX signals can be used to implement an truly asynchronous Completion Dispatcher
(the Windows NT API is not truly asynchronous).
ACE Proactor:
The Adaptive Communications Environment (ACE) implements a Proactor component that encapsulates I/O Completion Ports on Windows NT
and the aio APIs on POSIX platforms.
The ACE Proactor abstraction provides an OO interface to the standard C APIs supported by Windows NT.
Asynchronous Procedure Calls in Windows NT:
Some
systems (such as Windows NT) support Asynchronous Procedure Calls (APC)s.
An APC is a function that executes asynchronously in the context of a particular thread.
When an APC is queued to a thread, the system issues a software interrupt.
The next time the thread is scheduled, it will run the APC.
APCs made by operating system are called
kernelmode APCs. APCs made by an application are called
usermode APCs.
在windows服务器中要创建高性能,灵活服务器必然涉及到IOCP的使用。而IOCP又是Proactor Pattern的实践。
同时随着java跨平台语言的发展,java语言在JDK7(2009年)提供了对于Asyn IO的支持,为java语言作为跨平台网络服务器提供了更好的支持。
java NIO中的Aysn I/O 同时也是一种对于Proactor Pattern的实践。
相关文章推荐
- 数据结构-队列2
- GeekBand·iOS--Retain Cycle(引用循环)那些事
- android的一些大神博客(留底)
- spring MVC原理
- 第三章 Hyper-V 2012 R2配置选项
- POJ 1279 Art Gallery
- 和老师们合作,注定了是打工的(转)
- javascript的简洁的写法
- crazyflie2.0原理图之STM32F405与nRF51822串口1M速率的接收和发送
- LightOJ 1132 Summing up Powers(矩阵快速幂+二项式定理)
- iOS常见面试 问题
- 倒置读出文本文件JAVA实现
- MSP430 G2553 比较器Comparator_A+、数据流程图DFD、状态转换图STD
- 常用的表单正则验证
- C和指针---查漏补缺笔记
- java程序的类型
- 《Thinking in Java》Fourth Edition中文版笔记
- adb命令查看报名和查看手机分辨率
- js时间函数
- Microsoft Dynamics CRM 2015 服务器系统的性能维护,追踪, 也可以用到任务管理器哟...