Flow control in TCP — OS, DBMS & Networks Aptitude Question
Flow control in TCP: Which mechanism does TCP use for flow control — that is, to stop a fast sender from… Answer and worked solution on CodeKairo.
- Topic: OS, DBMS & Networks
- Section: Programming MCQs
- Difficulty: Medium
- Time target: 90 seconds
Question
Which mechanism does TCP use for flow control — that is, to stop a fast sender from overwhelming a slow receiver?
Options
- A leaky-bucket shaper in the network layer
- A sliding window whose size the receiver advertises
- The slow-start congestion window
- The time-to-live field of the IP header
Show the answer and the worked solution
Correct answer: B. A sliding window whose size the receiver advertises
Worked solution
- Slow start and the congestion window are congestion control, which protects the network rather than the receiver, and TTL merely limits how many hops a packet may take.
- Every TCP acknowledgement carries a window field stating how much buffer space the receiver still has free.
- The sender may keep at most that many bytes unacknowledged, so the receiver throttles the sender directly through A sliding window whose size the receiver advertises.
Answer: A sliding window whose size the receiver advertises.
The idea
TCP runs two limits at once and sends no more than the smaller of them: the receiver's advertised window and its own congestion window.
Shortcut. Flow control protects the receiver, so the receiver must set the limit, and only the advertised-window option involves the receiver at all.
Common trap. "The slow-start congestion window" also throttles the sender, but it protects the network (congestion control), not the receiver.