Sliding Window Protocol: Concise Short Note with Key Concepts

Sliding Window Protocol: Concise Short Note with Key Concepts

Verified Sources
Nov 4, 2026

Sliding Window Protocol is a class of ARQ mechanisms used to improve throughput over stop-and-wait by allowing several frames to be sent before receiving their acknowledgements. It maintains:

  • a sender window (which sequence numbers may be sent),
  • a receiver window (which sequence numbers may be accepted),
  • and uses ACKs (acknowledgements) to advance windows and trigger retransmissions when needed.

In many textbook treatments (e.g., reliable transport in data communication), sliding window is commonly paired with either Go-Back-N or Selective Repeat reliability strategies:

  • Go-Back-N: if a packet is lost, the sender retransmits that packet and all subsequent ones.
  • Selective Repeat: the receiver can accept out-of-order packets within its window; only the missing packet(s) are retransmitted.

The core idea is that the sender can pipeline multiple frames, which makes the link utilization closer to 11 instead of being limited by one RTT per frame as in stop-and-wait. A typical sender behavior is: send all packets whose sequence numbers fall in the sender’s current window, then slide the window forward upon receiving ACKs (or after a timeout). The receiver similarly slides forward when it has received the expected packet(s), depending on whether it uses Go-Back-N or Selective Repeat.

How the Sliding Window Moves (Sender Side)

  1. 1
    Step 1

    Choose sequence number range, sender window size WsW_s, and receiver window size WrW_r. Set the sender’s base (oldest unacknowledged sequence number) to the first sequence number.

  2. 2
    Step 2

    Send frames with sequence numbers in the range [base, base + WsW_s − 1]. Keep a timer for frames that are outstanding (often per-base or per-frame depending on the ARQ strategy).

  3. 3
    Step 3

    When an ACK arrives, interpret it as acknowledging a particular sequence number or a set (commonly cumulative). Advance the sender’s base to the smallest unacknowledged sequence number.

  4. 4
    Step 4

    If ACKs do not arrive before timeout, retransmit according to the protocol variant. In Go-Back-N, retransmit the base and all later frames still in the window; in Selective Repeat, retransmit only the missing frame(s).

  5. 5
    Step 5

    After advancing the window, transmit any newly allowed frames that now fall into [base, base + WsW_s − 1]. Repeat until all data are sent and acknowledged.

Reliability variants (what changes between Go-Back-N and Selective Repeat)

Go-Back-N is simpler because the receiver typically discards out-of-order frames beyond the first missing one; thus the sender “goes back” and resends a burst. Selective Repeat is more efficient because it buffers out-of-order frames within the receiver window, allowing the sender to retransmit only missing frames.

The sliding window mechanism provides the control structure that coordinates which frames are allowed to be outstanding and which frames the receiver can accept without ambiguity.

Intuition: Efficiency vs Complexity (High-level)

Qualitative comparison of common reliability strategies that use sliding windows.

Exam-friendly phrasing

State that sliding window increases utilization by allowing multiple frames in flight, maintains sender/receiver windows based on sequence numbers, and uses ACKs/timeouts to slide windows and retransmit lost frames.

Common confusion to avoid

Do not describe sliding window as “sending all frames forever.” It always restricts transmission using a finite window size, which prevents buffer overflow and sequence number ambiguity.

Quick short-note bullets you can adapt

Packet Transfer Lifecycle with Sliding Window

Define sender/receiver windows

1) Window set

Choose window sizes and initial base/expected sequence numbers."

Transmit multiple frames

2) Pipeline send

Send frames whose sequence numbers are within the sender window."

Receive ACKs / advance base

3) ACK-driven progress

ACKs slide the sender window forward; previously outstanding frames become confirmed."

Timeout & retransmit

4) Loss recovery

Retransmit lost frames according to Go-Back-N or Selective Repeat rules."

All data acknowledged

5) Completion

Stop when the final frames have been acknowledged."

Knowledge Check

Question 1 of 4
Q1Single choice

In sliding window protocols, what primarily determines which frames can be transmitted without waiting for an ACK?