edited by
41,691 views
100 votes
100 votes
For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of $1$ $\text{megabyte}$ and the maximum output rate is $20$ $\text{megabytes}$ per $\text{second}$. Tokens arrive at a rate to sustain output at a rate of $10$ $\text{megabytes}$ per $\text{second}$. The token bucket is currently full and the machine needs to send $12$ $\text{megabytes}$ of data. The minimum time required to transmit the data is _____________ $\text{seconds}$.
edited by

21 Answers

1 votes
1 votes

Let, C= Capacity of token bucket=1MB,

M= Maximum number of packets that can enter in network during a time interval 't'= C+rt

M=C+rt

12MB=1MB+10MB/sec*tsec

12 = 1 +10t

t=1.1sec

0 votes
0 votes
TIME

TOTAL TOKENS IN BUCKET

TOKENS SEND TOKENS LEFT IN BUCKET
1 (First second)

1MB(capacity)+10MB(generated in 1 second)=11MB

11MB<12MB..so generate more.

NOT send because 12 MB have to be send at once. 11MB

2(next second)

t second

11MB+10MB=21MB

21MB>20MB  

So time is less than a second for the generation of 12 MB.

11MB+t*10MB=12MB

t=0.1 sec

               -

now we have 12MB Tokens in bucket 

      -

      0 MB in bucket.

Hence in total time of 1+0.1 sec=1.1 we are able to send 12 MB .

0 votes
0 votes
we know formulae

( Capacity of token bucket + input Token Rate * Burst Time) / Burst Time = Burst speed

(1 + 10 * T ) /T = 20 => T= 0.1 sec

hence for 0.1 sec  burst speed was 20MBps , In this much time we can send 0.1 * 20 MBps = 2MB

After this bust time speed become 10 MBps and we want to send remaining 10 MB

It will take 10MB / 10 MBps =  1 sec

Total 1.1 sec
0 votes
0 votes
I will simplify the question.......Firstly since the output rate is more than incoming rate, we will calculate the time when the bucket will be empty, that is

 

capacity +(input rate x S)  =(output rate x S)

1+ (10 x S) =(20 x S)

S=0.1 sec  .............at this time bucket will be empty, till this time we have transferred data at max rate of 20 MB/sec, thus we have transferred 0.1  x 20 =2 MB , now we have to transfer 10 MB more, since the bucket is empty, now the output rate will be equal to input rate, thus

to transfer 10 MB at speed 10 MB/sec, it will require 1 sec.

 

 

Thus ans= 1 + .1 =1.1 sec
Answer:

Related questions

58 votes
58 votes
11 answers
2
Sandeep Singh asked Feb 12, 2016
26,090 views
A sender uses the Stop-and-Wait $\text{ARQ}$ protocol for reliable transmission of frames. Frames are of size $1000$ bytes and the transmission rate at the sender is $80\...
34 votes
34 votes
6 answers
3
Sandeep Singh asked Feb 12, 2016
18,001 views
Which one of the following protocols is NOT used to resolve one form of address to another one?$\textsf{DNS}$$\textsf{ARP}$$\textsf{DHCP}$$\textsf{RARP}$