Computer Networks · TEE · papers
Q2(b) · Stop-and-Wait versus Go-Back-N
2025-12-05 · 2022-23
Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.
Q2(b). Explain the stop and Wait ARQ and the Go Back N ARQ method. Which method is superior and why? [10 marks]
Answer
Stop-and-Wait ARQ permits only one outstanding frame. The sender stores its frame, transmits it and starts a timer. A valid matching ACK advances the sender; a timeout retransmits the stored frame.
- Use alternating sequence numbers 0 and 1. The receiver remembers the next expected number. Here ACK k means the next sequence expected.
- Normal: send frame 0, receiver accepts it and sends ACK 1; sender then sends frame 1.
- Damaged/lost data: receiver cannot accept the missing valid frame. The sender eventually times out and retransmits.
- Lost ACK: the receiver already accepted the frame, but the sender times out and retransmits it. The receiver detects the duplicate by sequence number, does not deliver it twice, and repeats the ACK.
- A damaged ACK must not advance the sender. The timer provides eventual recovery. Waiting each round trip limits utilization on high-delay links.
Yaad rakho: One frame outstanding; duplicate ko acknowledge karo, deliver dobara nahi.
Go-Back-N (GBN) ARQ pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2m−1 and receiver window 1. The receiver accepts only the next in-order frame; out-of-order frames are discarded. ACK k here cumulatively acknowledges all frames before k and means “next expected is k”.
- For W=7 with m=3, the sequence space is 0…7. Initially the sender can transmit 0…6. It stores every unacknowledged frame; a timer tracks the oldest one.
- Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.
- Lost data: if frame 2 is lost, frames 3…6 arrive out of order and are discarded. Repeated ACK 2 says frame 2 is still expected. On timeout the sender retransmits all outstanding frames starting at 2, here 2…6.
- Lost ACK: if ACK 2 is lost but ACK 3 arrives, the later cumulative ACK confirms frames 0…2 and avoids unnecessary retransmission. If no later useful ACK arrives before timeout, the sender retransmits from its oldest outstanding frame; the receiver rejects duplicates and sends its current ACK.
- After sequence 7, numbers wrap to 0. The bound W ≤ 7 leaves one sequence value outside the sender’s current window, preventing the all-ACKs-lost ambiguity of a full eight-frame window in the textbook model.
Yaad rakho: GBN receiver one; gap ke baad discard; timeout pe outstanding suffix repeat.
| Property | Stop-and-Wait | Go-Back-N | Selective Repeat |
|---|---|---|---|
| Outstanding sender frames | 1 | Up to 2^m−1 | Up to 2^(m−1), equal windows |
| Receiver window | 1 | 1 | Same maximum as sender in standard equal-window SR |
| ACK convention used here | Next expected | Cumulative, next expected | Individual frame accepted |
| Out-of-order data | Not delivered | Discarded | Buffered within valid window |
| After timeout | Repeat the one frame | Repeat outstanding frames from base | Repeat only timed-out frame |
| Buffer/tracking cost | Low | Sender window; simple receiver | Sender and receiver windows; per-frame tracking |
| Tradeoff | Simple but idle during RTT | Good pipelining, waste after loss | Efficient loss recovery, greater complexity |
Every comparison assumes finite sequence numbers, correct duplicate handling and the textbook protocol models. The same text “ACK 3” can mean different things under different ACK conventions; state its meaning before explaining a trace.
Which is superior, and why?
Go-Back-N is usually superior in link utilization when propagation delay is significant: it sends several frames before waiting, whereas Stop-and-Wait leaves the link idle during much of the round trip. Its cumulative ACKs also simplify receiver tracking. This is not an unconditional reliability ranking: GBN needs sender buffering and may retransmit correctly received later frames after one loss. Stop-and-Wait is simpler and can suffice for low-rate, short-delay exchanges. Both recover loss correctly when their timers and sequence-number rules are followed.