AlgoPlusAlgoPlus
Learn/Networking
Lesson

Selective Repeat ARQ

Pipeline a window, but a smart receiver buffers out-of-order frames and ACKs each one, so only the truly lost frame is resent.

9 min read Watch it move Build it

Selective Repeat keeps the same full pipeline as Go-Back-N but makes the receiver smart. Instead of discarding frames that arrive before the gap is filled, it buffers them and acknowledges each frame individually. When a frame is lost, the sender retransmits only that one frame — the early arrivals are already safe in the receiver's buffer and get delivered once the missing frame fills the hole.

How it differs from Go-Back-N

  1. 1Receiver has a window > 1 and a buffer: out-of-order frames within the window are kept, not thrown away.
  2. 2Each frame gets its own individual ACK, so the sender knows exactly which frames are still missing.
  3. 3Sender keeps a separate timer per outstanding frame; only the frame whose timer expires is resent — selective retransmission.
  4. 4When the lost frame finally arrives, the receiver delivers it together with the buffered frames, all in order.
Both windows must be equal — and ≤ 2^(m−1)
Unlike Go-Back-N (receiver window 1), Selective Repeat needs sender and receiver windows of the same size, and that size must be at most `2^(m−1)` for m-bit sequence numbers. If the window were larger, a retransmitted old frame could carry a sequence number the receiver mistakes for a new one, and it would accept a duplicate as fresh data.
Least waste, most bookkeeping
Selective Repeat retransmits the fewest frames of the three ARQ schemes, but it pays for it: buffering on both ends, per-frame timers, and per-frame ACKs. Go-Back-N is simpler; Selective Repeat is leaner on a lossy link.
OperationTimeSpace
On one lost frame · window ≤ 2^(m−1); individual ACKs, per-frame timersresend 1 framesender N · receiver N
Check yourself
With m-bit sequence numbers, what is the maximum window size for Selective Repeat?