note8 - Computer Networks Flow control with TCP Saad...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Networks Flow control with TCP Saad Mneimneh Computer Science Hunter College of CUNY New York advertised window 1 Introduction We have seen that at the conceptual level, TCP uses the same sliding window algorithm used by the DLC layer. However, while DLCs can be matched for speed, the sender and receiver on each side of a TCP connection may have different speeds. This is determined by the application programs communicating over TCP. If the receiver is slower than the sender, bytes will have to be dropped from the receiver’s sliding window buffer. TCP deals with this issue using what is known as flow control. 2 Flow control with advertised window With TCP, a slow receiver can limit how much data a sender can transmit. This is integrated within the sliding window algorithm, so the receiver can control how large the sender’s window can be. The receiver advertises a window size in bytes to the sender through a 16 bit number in the TCP header (the advertised window field). Upon receipt of a TCP segment from the receiver, the sender adjusts its window size accordingly. Let LR be the last byte read by the receiver (delivered to the application program). Ideally, LR = RN - 1 if the receiver is fast enough. In general, however, LR RN - 1 (with LR < RN - 1 when the receiver is slow). 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
If the current window size at the receiver is m bytes, the receiver will advertise a window size of advw = m - [( RN - 1) - LR ] bytes. RN m LR slow: LR < RN – 1 m Figure 1: Receiver’s window Upon the receipt of a segment from the receiver, the sender sets its window size n to the advertised window field advw . If the sender wants to be more conservative, it will set its window size to n = max(0 ,advw - ( LS - SN + 1)) bytes, where LS is the last byte transmitted by the sender over the network (but may not have reached the receiver yet). SN LS advw Figure 2: Sender’s window If the sender’s window size becomes zero, the sender stops sending immediately (and TCP blocks the corresponding application program). How does the sender know that the advertised window is no longer zero? Because the sender is not permitted to send any more data, and the receiver sends acks only in response to received data, there is no way for the sender to discover that the receiver has opened up the window. One can imagine the receiver sending some control infor-
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/27/2010 for the course CSCI 415 taught by Professor Saadmneimneh during the Spring '08 term at CUNY Hunter.

Page1 / 5

note8 - Computer Networks Flow control with TCP Saad...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online