Synchronous asynchronous IO, blocking non-blocking

Synchronous Asynchronous

Synchronous IO operations: blocking the process leading to the request, knowing IO operation is complete.
Asynchronous IO operations: the process does not lead to blockage.

In dealing with (network) IO, the blocking and non-blocking are synchronized IO ,
obstruction, is to call me (function) before me (function) after receiving no data or no results, I will not return.
Non-blocking, it is to call me (function), I (function) returns immediately, select the notification by the caller
blocking and non-blocking distinguish perform IO operations when that network IO thread will not be suspended , in fact, for some IO model He said blocking non-blocking in fact, more difficult to define, such as select models middle finger does not block the user thread on recvfrom other network IO operation, but in the select operation itself is blocked, but not because of network congestion is still called the IO model selec non-blocking model.

The difference between synchronous and asynchronous IO IO is that: when the data copy process is blocked

Difference between blocking and non-blocking IO IO lies: whether the calling application to return immediately

Guess you like

Origin www.cnblogs.com/Jun10ng/p/12355167.html