Let's look at five I/O models ., Five I/O models
The application process is: James
Kernel: John
1 blocking I/O model:
James borrowed rice for cooking from Mr. Wang. Mr. Wang didn't have it for now, but he didn't do anything else at this time (for example, he could still wash his dishes at this time). He waited until Mr. Wang had rice, then James moved the rice to his house and started cooking.
2 non-blocking I/O models:
James borrowed rice for cooking from Mr. Wang, but Mr. Wang didn't. But at this time, he went to wash his food. Every time he washed it, he asked Mr. Wang if he had prepared rice until Mr. Wang had rice, then James moved the rice to his house and started cooking.
3 I/O Reuse Model:
Many people in the village have no rice for cooking, and they all want to borrow rice from Mr. Wang. In this way, no matter if you ask Mr. Smith at intervals, or if you want to tell him where he died, he will at least not do other things well,
In this way, you can find an agent. Then, let's talk about the situation and let the agent interact with Mr. Wang. When data arrives, the agent notifies a specific person, and then the person carries the rice to his home and starts cooking.
4. Signal driving model:
James borrowed rice to cook at Mr. Wang, but Mr. Wang didn't. But he went to wash his food at this time, instead of waiting somewhere, or asked Mr. Wang continuously, because Mr. Wang will take the initiative to notify James when he has rice, at the arrival of the notice, James carried the rice to his house and began to cook.
5 asynchronous model:
James borrowed rice to cook at Mr. Wang. Then James told Mr. Wang that he had to borrow rice and then did other things. When Mr. Wang had rice, he took the initiative to take the rice to James's house, james started to cook at this time.
Synchronization: the application process actively copies data to the user space.
Asynchronous: the kernel is responsible for copying data to the user space. In this process, the application process is still doing its own thing.
Blocking, non-blocking, I/O multiplexing, and signal driving are all synchronous. The final Asynchronization is the true Asynchronization.
Refer:
Http://blog.csdn.net/lovelinx/article/details/39924473