edited by
42,459 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

0 votes
0 votes

We know number of packets that can be sent at t sec is --> c+rt

Therefore we can write -->

12=c+rt

=> (12-1)/10 second =t

=> t= 1.1 second

0 votes
0 votes
Capacity (c) = 1 MB

Max Output Rate (m) = 20 MB/sec
Rate of arrival of token (r) =  10 MB/sec

Time taken to send 1 MB of data =  c / m-r = 1 / 20 -10 = 0.1

 Since, the bucket is initially full, it already has 1 Mb to transmit so it will be transmitted instantly.
So, we are left with only (12 – 1) Mb, i.e. 11 Mb of data to be transmitted.
Therefore, time required to send the 11 MB will be 11 * 0.1 = 1.1 sec
0 votes
0 votes
Well a brilliant explanation has already been given, but I'm just sharing my interpretation that may make it a bit easier.

In token bucket algorithm, suppose if I want to send 1MB data, I need to have 1MB of tokens.

Here, we need to transmit 12MB of data, so we need to generate 12 MB of tokens.

The bucket capacity is 1MB and it has been stated that the bucket is full. So we already have 1 MB tokens available, now remaining only 11 MB of data. So, we require only 11 MB of tokens to be generated.

 

Now, token generation rate is 10 MBps:

10 MB ---> 1 sec

so 11 MB ---> ?

which is equal to 11/10 sec i.e. 1.1 sec

 

PS: Correct me if I'm wrong.
Answer:

Related questions

58 votes
58 votes
11 answers
2
Sandeep Singh asked Feb 12, 2016
26,417 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,275 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}$