Question
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.
Official answer and solution
- Official answer
- 1.1
- From
- Official GATE 2016 answer key
Solution
Determine the burst duration at maximum output rate while consuming bucket capacity, and add the time needed to transmit remaining data at the token generation rate.
Given parameters:
- Token bucket capacity .
- Maximum transmission rate .
- Token arrival rate .
- Initial bucket state: full ( of tokens).
- Total data to transmit .
Phase 1: Burst transmission at maximum rate :
- Let be the duration of the burst.
- During , data is transmitted at rate , while tokens arrive at rate .
- The bucket empties when the total tokens consumed equal initial tokens plus newly arrived tokens:
Phase 2: Remaining data transmission:
- Data transmitted during burst .
- Remaining data to transmit .
- Once the bucket is empty, data can only be transmitted as fast as tokens arrive, which is at rate :
Total minimum time required:
1.1
Ignoring token regeneration during the initial burst, calculating burst time as s and remaining s, totaling s.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2016 Computer Science and Information Technology (CS) Session 1
- Question
- 64 of 65, printed as CS Q.54
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.