Interview chain gun series (xx): TCP sliding window protocol is what

  1. TCP sliding window protocol is it
    a sliding window protocol for the flow control of the data transmission network, in order to avoid congestion. This protocol allows the sender stops and waits for confirmation before sending more data packets. Because each sender does not have to send a packet acknowledgment wait stopped, so that the data transmission protocol can be accelerated, improving network throughput. It is essentially TCO data packet description data buffer size of the recipient, the sender can transmit up to calculate how long their data based on this data. The window size is 0, the sender stops sending data. Start the timer and wait for the window to become non-zero.
      Sliding window protocol must ensure sequential transmission of data packets, sent on behalf of the serial number in the window has been sent but not received a confirmation packet, send window the sustainability of a series of unacknowledged packets because the sender within the window data packets may be lost or corrupted during transmission, the transmission procedure must be saved by all packets transmitted in the window in preparation for retransmission. Once the maximum send window, the process must be stopped transmitting new data packet received, until a free cache. Outer packet reception window to be discarded when the received sequence number is equal to the lower limit of the window packet arrives, it is submitted to the application sends an acknowledgment to the transmitting end, the receiving window is moved forward one. The lower limit need not transmit and receive windows on the same, and without the same size, but the need to maintain a fixed receiving window size, the window size can be transmitted with the data packets changes.

  2. The size of the sliding window will change it
    TCP is duplex protocol, both sides of the conversation can be received simultaneously send data. The two sides have each TCP session maintains a send window and a receive window, each of the receive window size limit depends on the application, system and hardware. When the link is changed for the better or worse, this window will change.

  3. Under what circumstances would this agreement deadlock, how to solve the deadlock
    when the receiver sends a zero window segment to the sender shortly after the receiving end of the receive buffer, there has been some storage space, so the receiver sends to the sender of the Windows size = segment 2, but this segment is lost during transmission. The transmitting end receives a non-zero window has been waiting notification sent by the receiver, and the receiver waits until the sender sends data, thus deadlock.
      The solution of the deadlock is: TCP for each connection has a duration timer. As long as the one received from the peer TCP connection zero window notification, starts a timer duration, if the duration set by the timer expires, sends a zero window probe segment (carrying only 1 byte of data), while the other it gives the current value of the window when confirming the detection segment.

Reference (excerpt text copyright belongs to the original author):

https://blog.csdn.net/m0_37962600/article/details/79951780
https://baike.baidu.com/item/%E6%BB%91%E5%8A%A8%E7%AA%97%E5%8F%A3%E5%8D%8F%E8%AE%AE/10291557?fr=aladdin
https://www.jianshu.com/p/07bd39becbfd

Guess you like

Origin www.cnblogs.com/xiaoyangjia/p/11690664.html