TCP Congestion Control for GATE

Track cwnd at one fixed point in every round, apply the correct growth rule, and reset it on the stated loss signal. A worked ten-RTT table follows the sawtooth.

KnowledgeGate Team

Exam prep & CS education

Updated 20 Jul 20266 min read

TCP congestion-control questions look unpredictable only when the window is updated mentally. Put one row per round-trip time on paper, record the phase, and apply exactly one rule at each boundary. The sawtooth then becomes bookkeeping rather than guesswork.

Slow start and congestion avoidance

The congestion window, cwnd, limits how much data a TCP sender may have outstanding. Exam questions usually measure it in maximum segment sizes, or MSS. The slow-start threshold, ssthresh, decides which growth rule applies.

In slow start, cwnd grows by roughly one MSS for every acknowledgement. Over a full RTT, all segments are acknowledged, so the window approximately doubles:

1, 2, 4, 8, 16, ... MSS

Despite its name, slow start is the faster growth phase. It starts cautiously from a small window but grows exponentially.

Once cwnd reaches ssthresh, TCP enters congestion avoidance. Its additive-increase rule grows cwnd by about one MSS per RTT:

8, 9, 10, 11, ... MSS

Those two behaviours together are what AIMD names: additive increase, multiplicative decrease. The additive half is this climb of about one MSS per RTT. The multiplicative half is the halving that a loss applies to the window. Slow start's doubling belongs to neither half, which is why a single exam sequence can move between exponential growth, additive growth and a halved threshold.

For a numerical, fix your observation point before writing the first row. Take a row's cwnd to be the window at the start of that RTT. A successful row then shows the window to be used at the start of the next RTT. Fixing the convention before you begin prevents the classic one-round offset.

Timeout versus triple duplicate ACKs

TCP treats two loss signals differently because they suggest different network conditions.

Timeout

A timeout suggests serious congestion. Under the standard exam rule:

  • Set ssthresh = cwnd / 2 using the window at the loss.

  • Set cwnd = 1 MSS.

  • Restart slow start.

If cwnd is odd, follow the rounding convention stated in the question. Do not silently invent one.

Triple duplicate acknowledgements

Three duplicate ACKs suggest that one segment is missing but later segments are still reaching the receiver. The sender can perform fast retransmit without waiting for a timer.

What happens to cwnd next depends on the TCP variant:

  • TCP Tahoe: set ssthresh to half and cwnd to 1 MSS, then slow start again.

  • TCP Reno: set ssthresh to half, enter fast recovery, and follow the stated inflation and deflation rule. A common model temporarily sets cwnd to ssthresh + 3 MSS, then sets it to ssthresh when a fresh ACK arrives.

GATE-style questions usually state a Tahoe-style rule or identify the TCP variant. Follow the convention in the question. A correct Reno answer and a correct Tahoe answer can differ even with the same loss event.

Worked cwnd evolution, RTT by RTT

Suppose the initial cwnd is 1 MSS and the initial ssthresh is 16 MSS. A timeout occurs during RTT 5, when cwnd is 16 MSS. Find the window evolution through RTT 10. At cwnd = ssthresh, use congestion avoidance.

RTT

cwnd at start (MSS)

Phase

Result during RTT

cwnd for next RTT

ssthresh after RTT

1

1

Slow start

ACKs received

2

16

2

2

Slow start

ACKs received

4

16

3

4

Slow start

ACKs received

8

16

4

8

Slow start

ACKs received

16

16

5

16

Congestion avoidance

Timeout

1

8

6

1

Slow start

ACKs received

2

8

7

2

Slow start

ACKs received

4

8

8

4

Slow start

ACKs received

8

8

9

8

Congestion avoidance

ACKs received

9

8

10

9

Congestion avoidance

ACKs received

10

8

Check the loss calculation separately. At the timeout, cwnd is 16 MSS, so:

new ssthresh = 16 / 2 = 8 MSS

new cwnd = 1 MSS

The next three successful slow-start rounds take cwnd from 1 to 2, then 4, then 8. Because cwnd has now reached ssthresh, the following round uses additive increase, not another doubling.

Sawtooth graph of cwnd against RTT: growth to 16 MSS, a timeout drop to 1 MSS, then recovery to 10 MSS as ssthresh falls from 16 to 8.

Check the last row two ways. Stepping through it: from cwnd = 1 at the start of RTT 6, three doublings take the window to 2, then 4, then 8, so RTT 9 opens at 8 MSS, and the two additive rounds that follow leave cwnd = 10 MSS once RTT 10 completes. Computing it directly: the window is 1 after the timeout, three slow-start rounds give 1 x 2 x 2 x 2 = 8, and each additive round adds 1, so 8 + 2 = 10 across RTT 9 and RTT 10. Both routes give 10 MSS, and the agreement is worth two seconds when a mark turns on a single round.

What the question may actually ask

The table supports several question forms:

  • cwnd at RTT k: decide whether this means the start or end of the round.

  • Rounds needed to reach a target: count successful updates, not just values in the sequence.

  • ssthresh after a loss: halve the window at that loss, not the original threshold.

  • Phase at a given window: compare cwnd with the current ssthresh, which may have changed after loss.

A second, loss-free sequence makes the counting trap concrete. Initial cwnd is 2 MSS, ssthresh is 8 MSS, and no loss occurs. After RTT 1, cwnd doubles from 2 to 4. After RTT 2, it doubles from 4 to 8. Because cwnd now equals ssthresh, RTT 3 uses additive increase and ends at 9, and RTT 4 ends at 10. The sender first reaches 10 MSS after four successful RTTs. Counting the values 2, 4, 8, 9, 10 instead gives five, and that off-by-one is exactly what the question is testing.

Keep flow control separate from congestion control. The usable sending window is constrained by both the receiver-advertised window and cwnd, but a question that gives only congestion-control values normally expects you to evolve cwnd. TCP vs UDP: Transport Layer Explained gives the surrounding transport context, while Computer Networks: TCP and UDP Transport Layer MCQs provides adjacent practice.

How GATE tests TCP congestion control

Expect a short event sequence with an initial cwnd, an ssthresh and one or more losses. The task may ask for the window after a named RTT, the new threshold, the number of rounds needed to reach a value, or the difference between timeout and triple duplicate ACK handling.

The named variant changes the number, not just the wording. Suppose cwnd is 16 MSS when three duplicate ACKs arrive. Tahoe sets ssthresh to 8 MSS, drops cwnd to 1 MSS and restarts slow start, so the next round opens at 1. Reno sets the same ssthresh of 8 MSS but enters fast recovery, so under the common exam model cwnd rises to 8 + 3 = 11 MSS and then settles at 8 MSS when a fresh ACK arrives. Identical loss event, identical threshold, and a next-round window of 1 against 8.

Write down whether each number is measured before or after the RTT. Also check whether the problem names Tahoe, Reno or its own simplified rule. For the current syllabus and official exam-specific instructions, use the official GATE portal of the organising IIT. GATE CS Exam Preparation Courses & Test Series helps place this topic within Computer Networks.

The short version and next step

Below ssthresh, double cwnd each successful RTT. At or above ssthresh, add about one MSS each RTT. On a timeout, halve the current window to get the new threshold, reset cwnd to 1 MSS, and restart slow start. For triple duplicate ACKs, follow the named variant.

KnowledgeGate's Computer Networks question bank runs to roughly 2,200 questions. Use the GATE Test Series after you can reproduce the worked table without looking back. A fixed table convention is the habit that turns window evolution into dependable marks.