Linux Network IO

Source: Internet
Author: User

There are 5 types of network IO for Linux

(1) blocking io-(corresponding to Java-bio):

The Bank has a salesman, she is responsible for the collection of single business, the first person to transact business list did not fill, she has been waiting for him to fill, the other people are not to deal with, she did not rest and wait, also do not notify colleagues, until this person's business single fill.

(2) Non-blocking I/O:

The Bank has a salesman, she is responsible for collecting single business, the first person to handle the business list is not filled out, she told him to fill out, and then immediately told the colleagues have not filled out, and then go to wait, see whether the first person is filled out or whether someone in the back is filled out, then immediately tell her colleagues.

(3) I/O multiplexing (jdk1.4 corresponds to Java-nio):

The Bank has a salesman, she is responsible for the collection of single business, so she shouted, who filled out the list, all to me, and then she took those list to take a batch of colleagues to deal with, and later to collect a list, receive the list at the same time also issued a new list.

(4) Signal-driven I/O:

The Bank has a salesman, she is responsible for the collection of single business, she first gave the business to those people, let them fill in later to find her, she then handed these lists to her colleagues, and then she went to wait for the new guests to send a list.

(5) asynchronous I/O (jdk1.7 corresponds to Java-nio2):

The Bank has a salesman, she is no longer responsible for the receipt of the business, she only responsible for sending business orders, she first gave the business to those people, and she told them, let them fill in the future directly to her colleagues to transact business, and then she told her colleagues there is such a thing, and so those people fill out and then go directly to her colleague She is only responsible for sending out lists and informing her colleagues that she is no longer responsible for receiving the list.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.