955 views
Consider a token bucket with maximum rate = 20 Mbps. Suppose we want to make sure that maximum rate can only be sent for atmost 5 sec at a time and atmost 150 Mb can be sent over 10 sec window. Computer the required value for token refresh rate?

Yes! Token bucket capacity is 50Mb
why did you subtract 10 from 20 ?
@Ashwin but here we don't have packet size, so when the packet came we have to attach a token along with the packet and then send the packet.

ryt?

For 5s, data are sent with maximum bandwidth after that inflow rate = outflow rate = x Mbps.

Here C is the capacity of the bucket and the inflow rate is xMbps.

Maximum data can be sent in 5s : C + 5x

Maximum average rate: $\frac{C +5x}{5}$

$\frac{C +5x}{5}$ = 20

=> C + 5x = 20 X 5

=> C + 5x = 100

So data sent till now is 100 Mb for 5s.

Also, given in the question “ atmost 150 Mb can be sent over 10 sec”. Left time is 5s.So, for sending remaining 50Mb, we have time 5s.

Now outflow rate = inflow rate. So, outflow rate is x Mbps.

Therefore, $\frac{50}{x}$ = 5

=> x = 10

Therefore refresh rate is 10Mbps.