Http://hj490134273.blog.163.com/blog/static/1446496162010494441182/
I just started to learn socket programming. I just made a simple chat room program. Later I went deep into it and found many problems, first, let's talk about the three socket usage
I/O model
Five I/O models available in UNIX:
(1) blocking I/O
(2) non-blocking I/O
(3) I/O multiplexing (select and poll)
(4) signal-driven I/O (SIGIO)
(5) asynchronous I/O
For input operations on a set of interfaces, the first step usually
Recently in the writing of reptiles, for these concepts are more vague, so deliberately learned a bit.
Process: A process is a program with a certain number of independent functions on a data collection of a running activity, the process is a
The first kind of explanation:
Take the TCP transmission as an example in the socket transfer. Suppose Server a client B communicates. First, you need to establish a listening thread on machine A. Listening to a certain port, then B machine can send
(1) Blocking blockBlocking mode block, as the name suggests, is when processes or threads execute to these functions must wait for an event to occur, and if the event does not occur, the process or thread is blocked and the function cannot be
Nonsense don't say, Lao Zhang Love tea, boiled water, there are two kettle, ordinary kettle, Ring kettle (water meeting tips)
Synchronization is the ordinary kettle to boil water, you have to come to see the open did not open;asynchronous is the
"Mr. Wang, let's talk about how the interview is going today. It should be smooth." I asked Mr. Wang with a dull frown.
"Alas, don't mention it. You said, what is my luck? Didn't you tell me about blocking before the interview? I met the interviewer,
ReferenceRichard Stevens's"UNIX Network Programming Volume 1, third edition: The sockets networking".
Steven s proposed a total of five Io models:
Blocking Io
Nonblocking Io
Io multiplexing (select and poll)
Signal driven io
SynchronizationThe so-called synchronization means that when a function call is sent, the call will not return until the result is not obtained. According to this definition, most functions are called synchronously (such as sin and isdigit ). But in
Some people think that asynchrony is not blocking, and synchronization is blocking. This is because different people have different knowledge backgrounds, and the context is not the same when discussing this problem. So, to better answer this
Non-blocking IO and blocking IO:
In network programming, the concept of blocking IO and non-blocking IO is encountered for a network handle, and here is a description of the two sockets first:Basic concepts:
Blocking IO::
The blocking mode of the
Most of Delphi's books do not mention the Delphi's various socket communication module models and models, and some books only explain the Windows Socket mode and model, and did not summarize the models adopted by various components, so our
Recently encountered some common concepts, especially the concept of network programming, such as: blocking, non-blocking, asynchronous I/O and so on, for these concepts themselves are not too clear understanding, but very vague concept, said
I. Overview:In the network programming, blocking, non-blocking, synchronous, asynchronous is often referred to, let me first talk about the following I understand in I/O blocking, non-blocking, synchronous, asynchronous.The five I/O models are
Recently encountered some common concepts, especially the concept of network programming, such as: blocking, non-blocking, asynchronous I/O and so on, for these concepts themselves are not too clear understanding, but very vague concept, said
Recently encountered some common concepts, especially the concept of network programming, such as: blocking, non-blocking, asynchronous I/O and so on, for these concepts themselves are not too clear understanding, but very vague concept, said
"Turn from" http://qindongliang.iteye.com/blog/2018539In the high-performance IO system design, there are several noun concepts that often confuse us. Specific as follows:Serial number problem1 What is synchronization?2 What is async?3 What is
Python: process, python ProcessI. Development of Operating Systems
1. At the beginning of the computer, there was no operating system. The programmer loaded the perforated tape (or card) corresponding to the program and data into the input machine,
in the high-performance IO system design, there are several noun concepts that often confuse us. Specific as follows:Serial number Problem1 What is synchronization? 2 What is async? 3 What is blocking? 4 What is non-blocking? 5 What is sync blocking?
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.