- 2070 Asar · 4 marks
TCP flow control
Short answer
TCP flow control uses a sliding window governed by the receiver's advertised window (rwnd). The receiver puts its free buffer space in the ACK's window field; the sender limits outstanding bytes to min(rwnd, cwnd). Zero-window probes prevent deadlock, and Clark/Nagle avoid silly window syndrome.
Explain how flow control is done in TCP.
Flow control stops a fast sender from overwhelming a slow receiver. TCP uses a sliding window protocol controlled by the receiver.
Mechanism
- TCP is byte-oriented; each byte has a sequence number.
- In every ACK, the receiver advertises its receive window (rwnd) = free buffer space, in the 16-bit window size field.
- The sender may have at most min(rwnd, cwnd) unacknowledged bytes outstanding. cwnd is the congestion window used for congestion control.
- As the application reads data, the receive buffer empties and a larger window is advertised; the window "slides" forward.
- If rwnd = 0, the sender stops and sends a small window probe periodically, so it does not wait forever if the update is lost.
Sent+ACKed | Sent, not ACKed | Can send | Cannot send
...........|<---------- window --------->|
^ left edge moves on ACK ^ right edge moves on rwnd
Example (receiver buffer 4000 bytes)
| Event | rwnd advertised |
|---|---|
| Connection set up | 4000 |
| Sender sends 3000 bytes, app has not read | 1000 |
| Sender sends 1000 bytes | 0 (sender stops) |
| Application reads 2000 bytes | 2000 (sender resumes) |
Silly window syndrome
Tiny windows cause tiny segments. It is avoided by Clark's solution (receiver advertises window only when it can accept at least one MSS or half the buffer) and Nagle's algorithm (sender waits to collect data).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Short note: DLL flow control · Computer Networks and Security, chapter 3
- Tasks done at OSI layers (set 1) · Computer Networks and Security, chapter 1
- Flow control mechanisms in data communication · Telecommunications, chapter 8
- Routing, flow control and dynamic routing · Telecommunications, chapter 8
- Flow control in data communication network · Telecommunications, chapter 8
- Labour productivity: causes, measures, control · Construction Management, chapter 7 · asked 5×