LearnViz CompSci
Home / Learn / Computer Networks / Sliding Window Protocol

Intermediate Topic 24 of 50 Computer Networks

Sliding Window Protocol

Allowing multiple outstanding unacknowledged packets.

How it works

A sliding window protocol lets a sender transmit several packets before waiting for acknowledgements. The window defines the range of sequence numbers that may be in flight; as acknowledgements arrive, it slides forward. Go-Back-N retransmits everything after a lost packet, while selective repeat retransmits only the missing ones, and the receiver buffers out-of-order data. Throughput approaches window size divided by round-trip time.

Step-by-step walkthrough

  1. A window of three packets may be in flight.
  2. Packets 1 to 3 are sent without waiting.
  3. The ACK for 1 arrives and the window slides forward.
  4. Packet 4 is now allowed.
  5. Pipelining keeps the link busy instead of waiting after each packet.

Where it is used

TCP and reliable data-link protocols use sliding windows to keep long, fast links busy instead of stopping after each packet, as stop-and-wait would.

Common pitfall

If the window is smaller than the bandwidth-delay product, the link sits idle part of the time. Sequence-number space must be at least twice the window for selective repeat to avoid ambiguity. Wrong timeout settings cause needless retransmissions. Window scaling is required for large windows in TCP.

Where it fits in the course

Sliding Window Protocol is topic 24 of 50 in Computer Networks, rated Intermediate. It follows Congestion Control. The next topic is Error Detection and Correction.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Sliding Window Protocol?
Allowing multiple outstanding unacknowledged packets. It belongs to Computer Networks and is an intermediate-level topic.
Where do people use Sliding Window Protocol?
TCP and reliable data-link protocols use sliding windows to keep long, fast links busy instead of stopping after each packet, as stop-and-wait would.
What is the most common mistake with Sliding Window Protocol?
If the window is smaller than the bandwidth-delay product, the link sits idle part of the time.
What should I learn before this topic?
Start with Congestion Control, the topic just before it in Computer Networks.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Computer Networks quiz.
Is Sliding Window Protocol hard to learn?
It is an Intermediate topic. Be comfortable with the Beginner topics in this area first, then read the common pitfall carefully, since it is where most mistakes happen.
How long does it take to learn Sliding Window Protocol?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Sliding Window Protocol?
Congestion Control, Error Detection and Correction, Flow Control are closely connected. The full list is in the related topics section of this page.
What should I study after Sliding Window Protocol?
Continue with Error Detection and Correction, the next topic in Computer Networks.

Related topics