CS FundamentalsVery hardProduct company interview · GATE level

A host is shaped by a token bucket of capacity 6 Mb that fills at 4 Mbps; the bucket is full at t = 0. The output link can carry at most 10 Mbps. A burst of 20 Mb of data becomes ready at t = 0. How long does it take to send the whole burst?

  1. A. 3.5 s
  2. B. 5 s
  3. C. 2 s
  4. D. 2.5 s

Correct answer: A. 3.5 s

While tokens remain, the host sends at the 10 Mbps peak while tokens arrive at 4 Mbps, so the bucket drains at 6 Mbps and lasts S = 6/(10 - 4) = 1 s, in which 10 Mb are sent. The remaining 10 Mb can go only at the token rate of 4 Mbps, taking 2.5 s. Total 3.5 s. 5 s ignores the stored tokens (20/4), 2 s ignores the shaper altogether (20/10), and 2.5 s is only the second phase.

More Computer Networks questions

Exams that ask this topic