Flow Control and ARQ Protocols: Stop-and-Wait, Go-Back-N, and Selective Repeat
If a fast high-speed computer sends 10,000 frames per second to an older slow computer, the receiver’s memory buffer will quickly overflow and drop frames.
Flow Control ensures that a fast sender does not overwhelm a slow receiver. When combined with error control, these protocols are called Automatic Repeat reQuest (ARQ) protocols.
1. Stop-and-Wait ARQ
The simplest flow control protocol:
Sender ──── Frame 0 ────▶ Receiver
Sender ◀─── ACK 1 ─────── Receiver (Ready for next frame)
Sender ──── Frame 1 ────▶ Receiver
- Sender transmits one single frame and starts a timer.
- Sender stops and waits until it receives an Acknowledgement (ACK) from the receiver.
- If the ACK arrives before the timer expires, sender sends the next frame.
- If the timer expires (frame or ACK was lost), sender retransmits the frame.
- Limitation: Terribly slow! Most of the time, the sender is sitting idle doing nothing while waiting for ACKs.
2. Sliding Window Protocols (Pipelined Transmission)
Instead of waiting after every single frame, Sliding Window protocols allow the sender to transmit multiple frames (up to a Window Size W) before stopping to wait for acknowledgements!
Go-Back-N vs Selective Repeat ARQ
⏮️ Go-Back-N ARQ (GBN)
- Sender window size: Ws = 2^m - 1.
- Receiver window size: Wr = 1 (Only accepts frames in strict sequence!).
- If Frame 2 is damaged/lost, receiver discards Frame 2, 3, 4, 5.
- Sender must go back and retransmit ALL frames starting from Frame 2!
- Uses cumulative acknowledgements.
🎯 Selective Repeat ARQ (SR)
- Sender window size: Ws = 2^m-1.
- Receiver window size: Wr = 2^m-1 (Has a buffer to store out-of-order frames!).
- If Frame 2 is lost, receiver buffers Frame 3, 4, 5.
- Sender retransmits ONLY the single lost frame (Frame 2)!
- Uses independent negative acknowledgements (NAK).
3. Master Comparison Table for Exams
| Parameter | Stop-and-Wait ARQ | Go-Back-N ARQ (GBN) | Selective Repeat ARQ (SR) |
|---|---|---|---|
| Sender Window Size (Ws) | 1 | 2^m - 1 | 2^m-1 |
| Receiver Window Size (Wr) | 1 | 1 | 2^m-1 |
| Retransmission on Error | Only that 1 frame | All N frames in the window | Only the single damaged frame |
| Receiver Buffer Needed? | No buffer needed | No buffer needed (discards out-of-order) | Yes, needs buffer to store out-of-order frames |
| Efficiency / Bandwidth | Lowest | Moderate (wastes bandwidth re-sending good frames) | Highest efficiency |
| Complexity | Very Simple | Moderate | Most Complex logic |
💡 DAVV Exam Tip
Question (10 Marks): “Explain Sliding Window protocols. Compare Go-Back-N and Selective Repeat ARQ with diagrams.”
- State the receiver window sizes: Wr = 1 for GBN, Wr > 1 for Selective Repeat.
- Explain why GBN retransmits all frames while SR retransmits only the lost frame.
- Write the 6-point comparison table above.