The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+16 votes
4k views

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

  1. $1.6$ seconds
  2. $2$ seconds
  3. $5$ seconds
  4. $8$ seconds
asked in Computer Networks by Veteran (59.6k points)
edited by | 4k views
0
Is token bucket in gate syllabus 2018 since token ring is not in syllabus ?
+4
Its not related to token ring . It is a congestion control algorithm in network layer (falls under traffic shaping).

6 Answers

+26 votes
Best answer

New tokens are added at the rate of $r$ bits/sec which is
$2$ $Mbps$ in the given question.

Capacity of the token bucket (b) = $16$ $Mbits$
Maximum possible transmission rate (M) = $10$ $Mbps$
So, the maximum burst time = b/(M-r) = $16$/($10$-$2$) = $2$ $seconds$
Here is the animation for token bucket hope this will help us to understand the concept.

answered by Boss (13.7k points)
edited by
+1
Can you please explain how the formula is derived?
+9
say till t sec it operate at 10mbps,

t*2+16=10*t

8t=16

so  t=2
+1

I tried this easiest method! Is my approach correct, yes or no? plz let me know!

+4
That animation link is not working. Those who are interested to see that: http://webmuseum.mi.fh-offenburg.de/index.php%3Fview=exh&src=8.html
0
@partner it is also not working
0

Yes, it is not working now, unfortunately!

+15 votes
TIME TOKEN IN BUCKET TOKEN SEND LEFT IN BUCKET
First sec 16Mb+ 2Mb =18Mb 10Mb 8Mb
next sec 8Mb+2Mb 10Mb 0Mb

Hence for 2 seconds we can send the tokens at 10 Mbps.

answered by Active (3.3k points)
+9 votes
It's 'kind of' aptitude question:

packets leaving bucket at 10Mbps   &&   packets entering bucket at 2Mbps.

So "actual rate" of bucket being empty is 10-2=8Mbps.

so (capacity/transmission rate) = 16/8 =2seconds.
answered by (325 points)
+1 vote
  • I/P rate of tokens=2MBPS. 2 MB tokens come 1 sec
  • O/P rate of tokens=10 MBPS. 10 MB tokens comes out in 1 sec
  • Capacity of the bucket=16 MB
  • At t=0, bucket=16 MB
  • At t=1, 10 MB tokens comes out(as it is filled so first tokens have to pulled out then it will be filled), 2 MB tokens come in, (16-10+2)=8 MB tokens. At t=1 bucket has 8 MB tokens
  • At t=2, bucket has 8 MB tokens(it is not full no first tokens will come in then pulled out), 2MB tokens comes in, bucket=8+2=10 MB. 10 MB tokens will come out. Now bucket has 0 MB tokens
  • At t=3, bucket has 0 tokens, 2 MB tokens comes in and 2 MB token goes out. So here tokens are send at the rate of 2 MBPS and this will continue
  • In t=1 sec 10 MB tokens comes out
  • At t=2, 10 MB tokens come out
  • So till 2 sec we're able to send tokens at 10 MBPS
answered by Active (1.2k points)
0 votes

Answer is 2 sec...

answered by Junior (553 points)
0 votes
Simple way :

Token rate into bucket = 2 Mbps

Output rate of bucket = 10 Mbps

Effective rate = 10-2 = 8 Mbps

Bucket capacity is full, 16 Mb

So, at effective rate bucket will drain in 16/8 = 2s

In these 2s, output capacity of bucket will be 10Mbps, after bucket gets empty, it's capacity will reduce to effective rate of 8Mbps.
answered by (281 points)
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

42,578 questions
48,566 answers
155,473 comments
63,596 users