## Token-Bucket

Question 1 |

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 _________.

1.1 sec | |

1.2 sec | |

1.3 sec | |

1.4 sec |

Question 1 Explanation:

According to the token bucket algorithm, the minimum time required sending 1 MB of data or the maximum rate of data transmission is given by:

S = C / (M - P)

Where,

M = Maximum output rate,

C = capacity of the bucket,

P = Rate of arrival of a token,

Given, M=20 Mb, C=1Mbps, P=10 Mbps

Therefore, S= 1 Mb / (20-10) Mbps = 1/10 = 0.1 sec

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

S = C / (M - P)

Where,

M = Maximum output rate,

C = capacity of the bucket,

P = Rate of arrival of a token,

Given, M=20 Mb, C=1Mbps, P=10 Mbps

Therefore, S= 1 Mb / (20-10) Mbps = 1/10 = 0.1 sec

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

Question 2 |

A computer on a 10Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 2Mbps. It is initially filled to capacity with 16Megabits. What is the maximum duration for which the computer can transmit at the full 10Mbps?

1.6 seconds | |

2 seconds | |

5 seconds
| |

8 seconds |

Question 2 Explanation:

Duration = C/x-y, where C is the initial capacity, x is outgoing rate and y is incoming rate.

There are 2 questions to complete.