Differences and relations reactor model and proactor mode
Blocking / non-blocking asynchronous synchronization VS
Blocking I / O read request is initiated, the thread is suspended, waiting until the kernel data is ready, and copy the data to the application's buffer, the copy process is complete,
read request call before returning.
The second is non-blocking I / O. Non-blocking read request data is not ready to return immediately under good circumstances, the application can continue to round ten days kernel until the data is ready, the kernel will copy the data to the application buffer, read and complete the call, the last call is read data acquisition process
Every ten days the application to go round kernel I / O is ready, but also a non-wasteful practice, because in the course of ten days of the application round to do what is not /.
I / O multiplexing, distributed through the I / O event, when the core data is ready, and then notify the application to operate, to improve CPU utilization, application can also use the CPU to do other things
These three are synchronous I / O call technology. Because synchronous calls, asynchronous calls to say, is for the process of obtaining data, and finally get some comprehensive call data read operations are synchronized, when read call, the kernel will copy data from kernel space to space applications this process is carried out simultaneously in the read function, if the kernel copy inefficiency, read call will be consumed in the process longer events
Asynchronous I / O technology
The aio_read when we initiated, returns immediately, automatically copying data from the kernel space kernel space to the application, the copy process is asynchronous, different operating kernel done automatically, and in front of the