Professional Documents
Culture Documents
Eytan Modiano
Slide 1
PS
PS
PS
Packet Network
PS
PS
PS
Buffer
PS
Eytan Modiano
Slide 2
Packet
Switch
Queueing Systems
Eytan Modiano
Slide 3
Random events
Arrival process
( !T )n e "!T
P(n arrivals in interval T)=
n!
Eytan Modiano
Slide 4
( !T )n e "!T
P(n arrivals in interval T)=
n!
n = number of arrivals in T
It can be shown that,
E[n] = !T
E[n2 ] = !T + (! T )2
Eytan Modiano
Slide 5
Inter-arrival times
Eytan Modiano
Slide 6
The exponential distribution is often used to model the service times (I.e., the
packet length distribution)
$
=
$
t0
"e #"t dt
# "t t + t
#e | t00
#e #" (t +t 0 ) + e #" (t0 )
=
=
%
#"t %
# "t
#e
|
e #" (t0 )
"e dt
t0
t0
# "t
=1#e
Eytan Modiano
Slide 7
P(t0 < T ! t0 + t)
P(T > t0 )
= P(T ! t)
Distribution of the time until the next arrival is independent of when the last
arrival occurred!
Example
When a customer arrives at the station the average amount of time until the
next arrival is 20 minutes
Eytan Modiano
Slide 8
Merging Property
1
2
k
!"
Splitting property
1-P
Eytan Modiano
Slide 9
"!
P
(1P)
Queueing Models
Customers
server
Queue/buffer
Model for
Want to know
Eytan Modiano
Slide 10
Littles theorem
Network (system)
(N,T)
Littles theorem: N = T
Eytan Modiano
Slide 11
(t), (t)
(t)
T2
T3
T1
t1 t2 t3 t4
T4
(t)
Eytan Modiano
Slide 12
Tt =
'T
i= 0
& (t)
= timeave.systemdelay, T = Limitt # $ Tt
Eytan Modiano
Slide 13
%
N=
! (t)
i=1
Ti
! (t )
i =1
Ti
T = lim t &'
!(t) % i=1 Ti
=(
)
= (T
t
! (t)
! (t)
! (t )
i =1
Ti
! (t)
$ % i=1 Ti = ! (t)T
! (t)
Example:
Customers
server
Queue/buffer
4) Transmitter + buffer
Eytan Modiano
Slide 14
!1
!2
!1
!3
!2
We have complex network with several traffic streams moving through it and
interacting arbitrarily
Eytan Modiano
Slide 15
N = i Ni & = i i
From Little's Theorem:
"
T=
"
i= k
!T
i=1 i i
i= k
i=1
!i
Server
packet per second
Service time = 1/
M/M/1
M/G/1
M/D/1
Eytan Modiano
Slide 16
1
0
As 0, we get:
P(0,0) = 1 - ,
P(j,j) = 1 -
P(j,j+1) =
P(j,j-1) =
Eytan Modiano
Slide 17
Equilibrium analysis
"
!
i=0
P(n) = 1
# "i =0 $ n P(0) =
!
# P(0) = 1 % $
P(n) = $ n (1% $)
Eytan Modiano
Slide 18
P(0)
=1
1% $
n=0
n=0
#
%/
%
=
=
1$ # 1$ % / $ %
T=
1
!"
T includes the queueing delay plus the service time (Service time = DTP = 1/ )
W=
#
1$ #
1
1
!
!"
Finally, the average number of customers in the buffer can be obtained from
littles formula
NQ = !W =
Eytan Modiano
Slide 19
!
!
" =N"#
"!
Customers arrive at a fast food restaurant at a rate of 100 per hour and
take 30 seconds to be served.
How much time do they spend in the restaurant?
N = T = 5
Eytan Modiano
Slide 20
W = T - 1/ = 2.5 minutes
= / = 5/6
/M
1 2 3
/M
M 1 2 3
/M
M(! / )
D = M / +
( " ! )
M/M/1
formula
/M
Statistical
Mutliplexer
/M
Eytan Modiano
Slide 21
Buffer
(! / )
D = 1/ +
( " !)
packets/sec
M/M/1
formula
100
TDM with 20
sources
Ideal Statistical
Multiplexing
(M/D/1)
10
1
0
0.2
0.4
0.6
0.8
Eytan Modiano
Slide 22
buffer
Server
M servers
packet per
second, per
server
Server
1
0
Eytan Modiano
Slide 23
m
3
m+1
M/M/m queue
Balance equations:
P(0)(m!)m
PQ = # P(n) =
m!(1" !)
n= m
n= *
mm !m + n
!
NQ = # nP(n + m) = # nP(0)(
) = PQ (
)
m!
1
"
!
n=0
n =0
n= *
W=
Eytan Modiano
Slide 24
n=*
NQ
, T = W + 1/ , N = + T = + / + NQ
+
$=
!
#1
m
Applications of M/M/m
VS
Eytan Modiano
Slide 25
Node
B
Node
A
Node
A
Node
B
Use
M/M/m
formula
Use
M/M/1
formula
When the system is lightly loaded, PQ~0, and Single server is m times faster
When system is heavily loaded, queueing delay dominates and systems are roughly the
same
M/M/Infinity
1
0
n+1
(n+1)
P(0)(! / )n
! P(n " 1) = n P(n), #n > 1, $ P(n) =
n!
"1
%
P(0) = '1 + & n =1 (! / )n / n!) = e" ! /
(
*
P(n) = (! / )n e" ! / / n! $ Poisson distribution!
N = Averagenumber in system = ! / , T = N / ! =1 / = servicetime
Eytan Modiano
Slide 26
Blocking Probability
M/M/m/m system
m servers m circuits
Last m indicated that the system can hold no more than m users
Erlang B formula
PB =
Eytan Modiano
Slide 27
(! / ) m / m!
n
(
!
/
)
/ n!
"n= 0
m
1
0
P(0)( ! / )n
!P(n " 1) = nP(n), 1 # n # m, $ P(n) =
n!
P(0) =
[%
m
n= 0
( ! / ) / n!
n
"1
(! / ) / m!
PB = P(Blocking ) = P(m) = m
%n= 0 (! / ) n / n!
m
Eytan Modiano
Slide 28
Erlang B formula
(A) m / m!
PB = m
n
(A)
/ n!
!
n= 0
Example
Arrival rate = 4 calls per minute, average 3 minutes per call => A = 12
Eytan Modiano
Slide 29
Circuits
PB
20
15
7
1%
8%
30%
K classes of customers
State of system: n = (n1, n2, , nk); nj = number of class j customers in the system
If detailed balance equations hold for adjacent states, then a product form solution
exists, where:
Eytan Modiano
Slide 30
Truncation
E.g., for the K M/M/1 queues, eliminate all states where n1+n2++nk > K1 (some constant)
Eytan Modiano
Slide 31
Example
When 1=! 2 need to know the number of calls in progress of each session type
Two dimensional markov chain state = (n1, n2)
Want P(n1, n2): n1+n2 <=m
Notice that the transition rates in the M/M/Inf queue are the same as those in a truncated
M/M/m/m queue
Eytan Modiano
Slide 32
i = m j = m "i
G= #
i =0
#( ! / i!)(!
j =0
i
1
j
2
Notice that the double sum counts only states for which j+i <= m
More general queueing systems have a more general state that may
include how much service each customer has already received
Eytan Modiano
Slide 33
Example:
Eytan Modiano
Slide 34
Eytan Modiano
Slide 35