BBN Notes for Lecture 16 (4/2/97)
Flow Regulators
- For shaping or policing traffic.
- Inside the network or at the edge of the network.
- To control peak rate, average rate, . . .
- Suite of schemes called "leaky bucket flow regulators"
started in 1986 by Jonathan Turner.
Simple Leaky Bucket Regulator
Leaky Token Bucket Regulator
Suppose we now want to allow some bursty data into the network but
we want to limit the size of a burst.
- If M=0, cells leave at rate of 1/
per second.
- If M=1, you have a simple leaky bucket scheme.
- If tokens are waiting, then there are no cells to send.
If cells do arrive and there are multiple tokens in the bucket, then
you would get a burst of cells into the network.
limits the long term rate
(i.e. average) of cell flow into the network.
- M is the largest burst size allowed, M limits the burst size,
M is the "regulator".
Example:
If 12 cells arrive at once at a time when there are 7 tokens in the
token bucket, then there would be a burst of 7 cells.
The five (12-7) remaining cells would enter the network at a rate of
1/
seconds.
NOTE: In any time interval of length T, the maximum number of cells allowed
into the network = M +
T.
If you have a large M, then you do not have regulation.
Approximate Analysis of Leaky Token Bucket Regulator
- Assume 1/
(the interarrival
time of tokens) is an integer in slots per token.
- Note 1/
>1 since
1/
= 1 implies no regulating.
- Example:
= 0.2 then
1/
= 5 slots per token.
- Assume service from cell queue occurs at token arrival times.
- Let 1/
be our basic
time unit (i.e. ignore all granularity for
<1).
- Let n be the state of the system defined by
- n = {M - number of tokens waiting} if no cells are waiting.
- n = {number of cells waiting + M} if no tokens are waiting.
State Diagram
Assume number of cell arrivals between consecutive token arrivals
is Ai
Let aj =
P{j arrivals in
1/
period of time} =
P{Ai =
j}.
independent of i.
Assume Ai's are independent.
Same state diagram as G/D/1 output queueing model.
As in the output queue case, we can solve the
balance equations, e.g.
p0 P01 + p0P02 + . . . =
p1 a0
recursively to get pn = P{system is in state n}.
Note that exactly one token is generated in each
1/
interval,
except when n = 0 and there are no cell arrival in that interval.
Thus, the token generation rate is (1 - p0a0).
In steady state this should equal
, the cell arrival rate,
so we have
= 1 - p0a0
or
p0
= (1-
)/a0
We can also compute the mean waiting time (in seconds) for a cell to
get a token:
E{W} = 0 p0 + 0 p1 + . . . + 0 pM
+ 1/
pM+1
+ 2/
pM+2
+ . . .
= 1/
SUM (from j=M+1 to infinity) of [(j - M) pj]
BBN Notes for Lecture 16 (4/2/97)
Notes taken by Russ Ford from a lecture by Professor Kenneth Vastola
of RPI on 4/02/97