#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
⚡ FREE · STEP BY STEP

Sliding Window Protocol Calculator: Efficiency, Throughput and Window Size

Enter link speed, frame size and delay to compare Stop-and-Wait, GBN and SR.

  • 📡 Stop-and-Wait, GBN, SR
  • 🪟 Optimal window size
  • 🔢 Sequence number bits

How to use the Sliding Window Protocol Efficiency Calculator

  1. 1. Describe the linkEnter bandwidth, frame size and the propagation delay, or distance and signal speed.
  2. 2. Pick the protocolChoose Stop-and-Wait, Go-Back-N or Selective Repeat and enter the window size.
  3. 3. Read the resultSee Tt, Tp, a, efficiency, throughput, the window needed for full use and sequence bits.

Efficiency formulas

Let Tt = frame size ÷ bandwidth (transmission time) and Tp = distance ÷ signal speed (propagation time). The key ratio is a = Tp ÷ Tt. Ignoring ack and processing time, one frame's cycle takes Tt + 2Tp.

  • Stop-and-Wait: efficiency = 1 ÷ (1 + 2a).
  • Go-Back-N and Selective Repeat with window N, error-free: efficiency = N ÷ (1 + 2a), up to 100%.
  • A window of 1 + 2a frames keeps the link fully busy.
  • Throughput = efficiency × bandwidth.

With m sequence bits, Go-Back-N allows a window of at most 2m − 1 frames. Selective Repeat allows at most 2m−1, so new frames are never confused with old ones.

Worked example

A 1 Mbps link sends 1,000-bit frames with a 10 ms one-way delay. Tt = 1000 ÷ 106 = 1 ms, so a = 10.

  • Stop-and-Wait: 1 ÷ 21 = 4.76%, or about 47.6 kbps of useful throughput.
  • Go-Back-N with N = 7: 7 ÷ 21 = 33.3%.
  • Full use needs a window of 1 + 2a = 21 frames. Go-Back-N then needs 5 sequence bits (25 − 1 = 31 ≥ 21). Selective Repeat needs 6 bits (25 = 32 ≥ 21).

These are the tool's default values.

With frame errors

If each frame is lost with probability P, Stop-and-Wait drops to (1 − P) ÷ (1 + 2a). Selective Repeat resends only the lost frame. Go-Back-N resends the whole window, so it loses more at high error rates. The tool uses Stallings' formulas for these cases. Some books write Stop-and-Wait efficiency as Tt ÷ (Tt + 2Tp), which is the same value. For error detection, see the CRC calculator and Hamming code calculator.

Frequently asked questions

What is a in sliding window problems?

a is propagation time divided by transmission time. A large a means the link sits idle while waiting for acks, so a bigger window is needed.

Why is the Selective Repeat window only half the sequence space?

If it were larger, a resent old frame could look like a new frame with the same number after wrap-around.

Does the tool include ack transmission time?

No. Like most textbook problems, it treats acks as tiny. Add the ack time to the delay yourself if the question needs it.

What propagation speed should I use?

Use the value in the question. If none is given, 2 × 10^8 m/s (200,000 km/s) is the usual figure for copper and fibre.

More free tools

See all free tools