首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

I/O Completion Port 文件

2012-07-19 
I/O Completion Port 资料C++ / C#?与设备通信的两种方式:同步: 当调用 ReadFile 时, 函数会等待系统执行

I/O Completion Port 资料

C++ / C#

?

与设备通信的两种方式:

同步: 当调用 ReadFile 时, 函数会等待系统执行完所要求的操作, 才返回。

异步: ReadFile 这类函数会直接返回, 系统自己去完成对设备的操作, 然后以某种方式通知完成操作。

?

重叠 I/O

?

I/O completion ports 提供了一个有效的线程模型用于处理多个异步的 I/O 请求在多处理器系统上。

?

同步与异步的区别:

同步: 干完一件事, 再干另外一件事。

异步: 同时干多件事。

?

I/O completion ports = IOCP

?

IOCP are the way in which an app uses a pool of threads to process asynchronous I/O requests. These threads are kernel threads and their only job in life is to process I/O requests. Applications that process many concurrent asynchronous I/O requests can do more quickly and efficiently by using IOCP than by creating threads at the time of the I/O request. When you create a completion port, you can specify a concurrency value which limits the #threads associated with the port. Typically this number = #processors.

热点排行