Difference Between Synchronous and Asynchronous

The difference between synchronous and asynchronous (transfer)

Answer one:
1. Asynchronous transmission

Usually, the asynchronous transmission takes the character as the transmission unit, and each character should be appended with 1 start bit and 1 stop bit to mark the start and end of a character, and thus realize the synchronization of data transmission. The so-called asynchronous transmission means that the time interval between characters (the end of one character to the beginning of the next character) is variable, and there is no need to strictly limit their time relationship. The start bit corresponds to the binary value 0, which is represented by a low level and occupies a width of 1 bit. The stop bit corresponds to the binary value 1, which is represented by a high level and occupies a width of 1~2 bits. A character occupies 5~8 bits, depending on the character set used by the data. For example, telegraph code characters are 5 bits, ASCII characters are 7 bits, and Chinese characters are 8 bits. In addition, 1 additional parity bit is added, which can choose odd or even check mode to implement simple error control for this character. In addition to using the same data format (number of characters, number of stop bits, presence or absence of check digit and check method, etc.), the sending end and the receiving end should also use the same transmission rate. Typical rates are: 9 600 b/s, 19.2 kb/s, 56 kb/s, etc.

Asynchronous transmission, also known as start-stop asynchronous communication, has the advantages of simplicity and reliability, and is suitable for character-oriented, low-speed asynchronous communication occasions. For example, the communication between the computer and the Modem is in this way. Its disadvantage is that the communication overhead is large, and an additional 2 to 3 bits are added for each character transmitted, and the communication efficiency is relatively low. For example, when using Modem to surf the Internet, it is generally felt that the speed is very slow. In addition to the low transmission rate, it is also closely related to the high communication overhead and low communication efficiency.


--------------------------------------------------------------------------------

2. Synchronous transmission

Usually, isochronous transfers are based on data blocks. A special character or bit sequence should be attached to the head and tail of each data block to mark the beginning and end of a data block, and a check sequence (such as a 16-bit or 32-bit CRC check code) is generally attached. for error control of data blocks. The so-called synchronous transmission means that the time interval between data blocks is fixed, and their time relationship must be strictly specified.

Answer two:
Please tell me more, I am mentally handicapped, thank you  
---------------------------------------------------------------  
 
Synchronous is blocking mode and asynchronous is non-blocking mode.  
---------------------------------------------------------------  
 
My understanding: Synchronization means that the operation of two threads is related, and one thread is blocked waiting for the operation of another thread. Asynchronous means that the two threads are unrelated and run their own.  
 
Not sure right or wrong? say downstairs  
---------------------------------------------------------------  
 
Synchronization refers to the communication method in which the sender sends data and waits for the receiver to send back a response before sending the next data packet.  
Asynchronous means: after the sender sends data, it does not wait for the receiver to send back a response, and then sends the next data packet.  
 
It has been discussed on CSDN:  
http://expert.csdn.net/Expert/topic/2646/2646592.xml?temp=.3842584  
http://expert.csdn.net/Expert/topic/2659/2659726.xml?temp=.1480219  
---------------------------------------------------------------  
 
To give an inappropriate example, something like:  
SendMessage(...)  
TRACE0("just  like  send");  
 
PostMessage(...)  
TRACE0("just  like  WSASend  using  overlapped");  
 
SendMessage does not return when called, and executes TRACE0 after the message responds, which is synchronization.  
PostMessage returns immediately after the call, and executes TRACE0 without a message response, which is asynchronous.

Answer three:

 Difference Between Synchronous and Asynchronous
 For example: ordinary B/S mode (synchronous) AJAX technology (asynchronous)
Synchronization: submit the request -> wait for the server to process -> return after processing and the client browser cannot do anything during this period
Asynchronous: The request is triggered by an event -> processed by the server (this is that the browser can still do other things) -> processed
--------------------------------------------------------------------------------------------------------------------
Synchronization means that when you ask me to go to dinner, I will go to dinner with you when I hear it; if you do not hear it, you will keep calling until I tell you that you have heard it, and then we will go to dinner together.
Asynchronous means that you call me and then go to eat by yourself. I may leave immediately after I get the news, or I may wait until I get off work to eat.

So, if you want me to treat you to dinner, use the synchronous method, and if you want to treat me to dinner, use the asynchronous method, so that you can save money.
--------------------------------------------------------------------------------------------------------------------
For example, sending a message synchronously when making a phone call is asynchronous

Reprinted from: http://www.cnblogs.com/lebronjames/archive/2010/10/09/1846690.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326995716&siteId=291194637