Computer Networks · TEE · practice

Token-bucket sustained burst · example 1

Unit 5 · Congestion control and QoS · optional practice

Optional extension · no matching calculation in the two supplied papers

Optional worked extension. This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.

Practice question. A token bucket starts full with 10000 byte-tokens, replenishes at 2000 bytes/s, and transmits continuously at peak 12000 bytes/s while tokens permit. Under a fluid model with P>r, find the maximum peak-rate burst duration and data sent. [7 practice marks]

Answer

Given

B=10000 bytes; r=2000 B/s; P=12000 B/s; continuously backlogged fluid traffic.

To find

Time until tokens exhaust and bytes sent at the peak rate.

Formula and why

t=\frac{B}{P-r},\quad D=PtLaTeX: t=\frac{B}{P-r},\quad D=Pt

Tokens are consumed at P and simultaneously replenished at r, so net depletion is P−r.

Step-by-step solution

Step 1. Net depletion

12000−2000=10000 tokens/s.

Step 2. Time to exhaust B

t=10000/10000=1 s.

Step 3. Data sent and independent balance

D=12000×1=12000 bytes. Check B+rt=10000+2000×1=12000 bytes.

Final answer: Peak burst lasts 1 s and sends 12000 bytes.