2,635 views
5 votes
5 votes
For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of 1 mega byte and the maximum output rate is 20 mega bytes per second. Tokens arrive at a rate to sustain output at a rate of 10 mega bytes per second. The token bucket is currently 25% full and the machine needs to send 12 mega bytes of data. If the system is initially idle for 2 seconds, then the minimum time required to transmit the data is ____________ seconds.

3 Answers

Best answer
1 votes
1 votes
Is it 1.1 sec.
selected by
6 votes
6 votes

1.175 sec

Capacity = 1MB

Initially 25% filled so 0.25 MB of data will be transmitted immediately in no time. So the token bucket becomes empty now.
Now remains 12MB-0.25MB= 11.75MB data

But tokens arrive at a rate of 10MBps
So 10MB data transmitted in 1 sec
Therefore 11.75MB of data will be transmitted in 1.175 sec.

 

0 votes
0 votes
Initially token bucket has 25% capacity = 25%(1)= 0.25MB

And the host machine is idle for 2 seconds , so in 2 sec in general tokens arrive here at 10Mb/sec .so it can fill a max capacity of 20MB in 2sec , but here bucket capacity is just 1MB , so now the token bucket is full.

So , now after 2 sec host machine starts data transfer ,so it will use tokens the EQ becomes 1+10t=20t, on solving you will get t=0.1 means for 0.1 sec it will transfer data at max bandwidth of 20MB. So, in 0.1 sec 20(0.1)=2MB data transfer has been completed , remaining 10 MB has to be transferred , as the rate of token arrival is 10MB /sec , so to generate 10MB tokens one second is required, and without any due the data will be transferred as o/p rate is more than i/p rate .

So total 0.1+1=1.1 sec required to transfer the 12MB data

Related questions

2 votes
2 votes
1 answer
2
abheet asked Jul 31, 2022
1,412 views
Imagine a flow specification that has the maximum packet size 800 bytes, token bucket rate of $5 \times 10^{6}$ bytes/sec. Token bucket size is 1 million byte and the max...
0 votes
0 votes
2 answers
3