GATE GUIDE

Sliding Window Questions in GATE CSE: Efficiency and Window Size

By MD ANISH AHAMADUpdated 27 Oct 20269 min read
Sliding Window Questions in GATE CSE: Efficiency and Window Size

Sliding window questions look like many different questions and are actually one question. A link is described, a frame size is given, and you are asked for an efficiency, a throughput, a window size or a number of sequence bits. Every one of those answers falls out of a single ratio. Once you compute that ratio, the rest is substitution. This guide gives away the whole method.

In this guide
  1. Key takeaways
  2. Where these questions sit in the paper
  3. What the 2027 syllabus puts in scope
  4. The one ratio that drives every answer
  5. A worked example, arithmetic shown
  6. Sequence-number bits, and why selective repeat is stricter
  7. Bandwidth-delay product is the same idea
  8. The unit traps that actually cost the marks
  9. Build one template and never deviate

Key takeaways

Where these questions sit in the paper

Third-party analyst compilations place Computer Networks at 6 to 11 marks per paper from 2009 to 2026. The per-paper series is 10, 8, 6, 9, 7, 9, 8, 8, 10, 7, 10, 6, 7, 11, 8, 9, 8, 6, which averages about 8.2. The first nine papers average 8.3 and the last nine average 8.0, so the direction is flat rather than falling. 2022 was the recent high at 11 marks. One analyst's count for the 2026 shift-2 paper put Computer Networks at 6 questions. These numbers are approximate and unofficial: sources disagree by 2 to 3 marks because a sliding-window item may be filed under performance metrics by one analyst and under the data link layer by another.

Inside that band, sliding-window arithmetic is the most repeated calculation the subject has. The full subject ranking is in the guide to Computer Networks important topics.

What the 2027 syllabus puts in scope

The official GATE 2027 CS syllabus names performance metrics explicitly under the switching clause, which covers transmission and propagation delay, round-trip time, throughput, utilisation and bandwidth-delay product. It keeps TCP flow control and congestion control, which carries the window-over-RTT throughput bound and sequence-number sizing. The data link layer clause is now error detection, medium access control and Ethernet.

So the window arithmetic stays, arriving through two doors instead of one. The clause-by-clause comparison is in the note on the 2027 Computer Networks syllabus changes. Syllabus wording can be revised between cycles, so check the current notification and the official syllabus PDF before you finalise a study list.

The one ratio that drives every answer

Two delays matter on a point-to-point link.

Transmission time is how long the sender takes to push the frame onto the wire:

Tt=frame size in bitslink rate in bits per secondT_t = \frac{\text{frame size in bits}}{\text{link rate in bits per second}}

Propagation time is how long the first bit takes to travel: Tp=distancesignal speed\displaystyle T_p = \frac{\text{distance}}{\text{signal speed}}. On satellite questions the propagation time is usually given directly.

Then a=TpTt\displaystyle a = \frac{T_p}{T_t}. That is the whole exam. A link with a large aa is a long thin pipe where the sender finishes transmitting and then waits, which is why stop-and-wait collapses on satellite links. A link with a small aa is short and fat, where a window of one is already close to enough.

The sender's cycle in stop-and-wait is Tt+2TpT_t + 2T_p and delivers one frame, so the efficiency is

η=TtTt+2Tp=11+2a\eta = \frac{T_t}{T_t + 2T_p} = \frac{1}{1 + 2a}

With a window of WW frames the sender delivers WW frames per cycle, so the efficiency multiplies by WW and caps at 1, because a link cannot be more than fully used.

Protocol Sender window Receiver window Efficiency Max window with nn sequence bits
Stop-and-wait 1 1 11+2a\displaystyle \frac{1}{1 + 2a} 1
Go-Back-N WW 1 min⁡(1,W1+2a)\displaystyle \min\left(1, \frac{W}{1 + 2a}\right) 2n−12^n - 1
Selective Repeat WW WW min⁡(1,W1+2a)\displaystyle \min\left(1, \frac{W}{1 + 2a}\right) 2n−12^{n-1}

The efficiency column is identical for go-back-N and selective repeat. The protocols differ in retransmission behaviour and in buffering, not in the best case the formula describes. A question that asks for efficiency on an error-free link is not testing which protocol you were given.

A worked example, arithmetic shown

Take a 1 Mbps link with a one-way propagation delay of 20 ms, carrying 1000-byte frames. Acknowledgements are small enough to ignore.

Tt=8000 bits106 bits per second=8 msTp=20 msa=208=2.51+2a=6\begin{aligned} T_t &= \frac{8000\ \text{bits}}{10^6\ \text{bits per second}} = 8\ \text{ms} \\ T_p &= 20\ \text{ms} \\ a &= \frac{20}{8} = 2.5 \\ 1 + 2a &= 6 \end{aligned}

Stop-and-wait efficiency is 16\displaystyle \frac{1}{6}, about 16.67 percent, and throughput is 0.1667×1 Mbps≈166.7 kbps0.1667 \times 1\ \text{Mbps} \approx 166.7\ \text{kbps}.

With a window of 4 frames the efficiency is 46\displaystyle \frac{4}{6}, about 66.67 percent, and throughput is about 666.7 kbps.

The minimum window for full utilisation is 1+2a=61 + 2a = 6 exactly, so W=6W = 6. If the arithmetic had given 5.2 you would round up to 6, never down to 5, because a window of 5 leaves the sender idle.

Now suppose acknowledgements are 100 bits on the same 1 Mbps link. Their transmission time is 0.1 ms, the cycle becomes 8+40+0.1=48.1 ms8 + 40 + 0.1 = 48.1\ \text{ms}, and stop-and-wait efficiency drops slightly to 848.1\displaystyle \frac{8}{48.1}, about 16.63 percent. Include that term only when the question hands you an acknowledgement size.

Sequence-number bits, and why selective repeat is stricter

A window needs sequence numbers, and the number of bits nn bounds how large the window may be.

Go-back-N keeps a receiver window of one, so it can safely use a sender window of up to 2n−12^n - 1. The one number held back is what stops a delayed duplicate from being mistaken for a fresh frame.

Selective repeat gives the receiver a window of the same size as the sender's, and the two windows must never overlap in the sequence space. That halves the budget: the window may be at most 2n−12^{n-1}.

Continue the example above, where the required window is 6.

For go-back-N you need 2n−1≥62^n - 1 \ge 6, so 2n≥72^n \ge 7 and n=3n = 3. Three bits allow a window of 7, which is comfortably above 6.

For selective repeat you need 2n−1≥62^{n-1} \ge 6, so n−1=3n - 1 = 3 and n=4n = 4. Four bits allow a window of 8.

Same link, same window, one extra bit. That gap is the question. When a paper says selective repeat and you quietly use the go-back-N bound, you land on 3 and lose the mark. Watch the inequality too: the bound is greater than or equal to the required window, not strictly greater.

Bandwidth-delay product is the same idea

Bandwidth-delay product is bandwidth multiplied by delay, and it measures the data in flight on the link. On the example link, using the full cycle, 106 bits/s×48 ms=48,000 bits10^6\ \text{bits/s} \times 48\ \text{ms} = 48{,}000\ \text{bits}, which is exactly 6 frames of 8000 bits. That is the same 6 the efficiency formula produced, because the minimum window for full utilisation is just the pipe capacity measured in frames.

Using round-trip time alone, 106 bits/s×40 ms=40,000 bits10^6\ \text{bits/s} \times 40\ \text{ms} = 40{,}000\ \text{bits}, or 5000 bytes. Read the question to see which delay it wants before multiplying.

The transport-layer version is the throughput bound: throughput is at most windowRTT\displaystyle \frac{\text{window}}{\text{RTT}}. A 64 KB receive window over a 100 ms round trip gives 65,536×8 bits0.1 s≈5.24 Mbps\displaystyle \frac{65{,}536 \times 8\ \text{bits}}{0.1\ \text{s}} \approx 5.24\ \text{Mbps}, no matter how fast the underlying link is. That single line explains why the TCP window scale option exists, and it is a favourite one-mark item.

The unit traps that actually cost the marks

More traps of this shape across subjects are collected in the guide to common mistakes in GATE CSE, and the compact versions of these formulas sit in the GATE CSE formula sheet.

Build one template and never deviate

Write this four-line template on a rough sheet and use it for every question in this family, including the ones that look unfamiliar.

  1. Tt=frame bitslink rate\displaystyle T_t = \frac{\text{frame bits}}{\text{link rate}}.
  2. Tp=distancespeed\displaystyle T_p = \frac{\text{distance}}{\text{speed}}, or read it from the question.
  3. a=TpTt\displaystyle a = \frac{T_p}{T_t}, and 1+2a1 + 2a.
  4. Substitute: efficiency W1+2a\displaystyle \frac{W}{1 + 2a}, window 1+2a1 + 2a rounded up, bits from the protocol bound, throughput=efficiency×rate\text{throughput} = \text{efficiency} \times \text{rate}.

Under exam pressure the failure is never the formula. It is skipping step 1 because the frame size was in bytes, or starting at step 4 because the question mentioned selective repeat and you reached for a remembered answer. Doing the steps in order costs about thirty seconds and removes almost every way to go wrong.

For practice, take any previous-year link question and re-ask it three times with the same numbers: solve for efficiency, then for the minimum window, then for the sequence bits under both protocols. One set of numbers gives you four drills, and the bandwidth-delay product behind all of them starts to show. The Computer Networks chapter of the GATE CSE 2027 book carries the full worked bank for this family, including the acknowledgement-time variants the article keeps short.

Frequently asked questions

What is the formula for the efficiency of a sliding window protocol?

Efficiency is W1+2a\displaystyle \frac{W}{1 + 2a}, capped at 1, where WW is the window size and aa is the ratio of propagation delay to transmission delay. Stop-and-wait is the special case W=1W = 1, giving 11+2a\displaystyle \frac{1}{1 + 2a}. Multiply the efficiency by the link rate to get throughput.

How do you find the minimum window size for full link utilisation?

Set W1+2a=1\displaystyle \frac{W}{1 + 2a} = 1 and solve, so the minimum window is 1+2a1 + 2a rounded up to the next integer. Compute transmission time as frame size divided by link rate, propagation time as distance divided by signal speed, then aa as propagation over transmission. Round up, never down.

Why does selective repeat need more sequence number bits than go-back-N?

Go-back-N uses a receiver window of one, so the sender window may be as large as 2n−12^n - 1 for nn sequence bits. Selective repeat gives the receiver a window of the same size as the sender, and the two must not overlap in the sequence space, so the window is limited to half of it. Half of 2n2^n is the stricter bound, and it often costs one extra bit.

Is the sliding window topic still in the GATE 2027 Computer Networks syllabus?

Yes, though not under that name. The 2027 CS syllabus lists performance metrics explicitly under switching, and keeps TCP flow control and congestion control. Utilisation, throughput, window size and bandwidth-delay-product arithmetic sit inside those clauses. The data link layer clause now reads error detection, medium access control and Ethernet. Check the official syllabus PDF for the exact wording.

Should acknowledgement transmission time be included in the efficiency calculation?

Only if the question gives you an acknowledgement size or an acknowledgement rate. The standard formula assumes the acknowledgement is tiny and ignores it, so the cycle is transmission time plus twice propagation. If the paper states that acknowledgements are 100 bits on a stated link, add that transmission time to the denominator and say so in your working.

How many marks does Computer Networks carry in GATE CSE?

Analyst compilations put Computer Networks at 6 to 11 marks per paper from 2009 to 2026, averaging about 8.2, with 11 in 2022 as the recent high. These counts are unofficial, and different analysts differ by 2 to 3 marks because borderline questions get classified differently. Sliding-window arithmetic is among the most repeated items inside that band.

Sources

Dates, fees and the syllabus are set by the GATE 2027 organising institute and can change. Always confirm at gate2027.iitm.ac.in.

Keep reading

GATE CSE 2027 book1,020 pages · ₹250 ₹300
Buy now — ₹250