The GATE Grind

GATE 2016 CS – Question 64

Computer Networks · TCP: Flow Control, Congestion Control, Socket API · 2 marks · Numerical answer

For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of 1 megabyte and the maximum output rate is 20 megabytes per second. Tokens arrive at a rate to sustain output at a rate of 10 megabytes per second. The token bucket is currently full and the machine needs to send 12 megabytes of data. The minimum time required to transmit the data is ________ seconds.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 1.09 to 1.11

Explanation

The machine first sends at the maximum rate of 20 MB/s while the bucket drains at $20 - 10 = 10$ MB/s, which empties 1 MB in 0.1 seconds. In that time it sends $20 \times 0.1 = 2$ MB. The remaining $12 - 2 = 10$ MB goes out at the sustained rate of 10 MB/s, which takes 1 second. The total is $0.1 + 1 = 1.1$ seconds.