k < m

Finite M/M/1 queue
Consider an M/M/1 queue with finite waiting room.
(The previous result had infinite waiting room)
~
We can have up to N packets in the system.
After filling the system, packets are returned, or blocked.
Balance equations:
1  

1    

0
1

1    



1  


~
N
~
N 1

 pn  o( )   pn1  o( )

~
 pn1  pn n  0,1,2,...., N  1

~
N
Since  pn  1 is true ,
n 0
 p0 
1 
1 
~
N 1
, pn   n
1 
1 
~
N 1
We have a steady state distribution for all . Of particular interest is
PN~  probabilit y that queue is full
 probabilit y of blocking
 PB
 (1   )
~
N

~
1   N 1
Load 
system
Rejection PB
r throughput
Consider any queue with blocking probability PB and load  packets/second.
Net arrival rate = (1- PB) .
Then  = (1- PB)  = throughput.
From a different point of view,
1
 average service time

  average customers/ second served if system is never empty.
But system is not empty with probabilit y of 1 - p 0 .
 throughput
   (1 - p 0 )
 μ( 1-p0 )  λ( 1-PB )
 PB  1 

(1 - p 0 )

For M/M/1 queue of finite length,
p0 
PB 
1 
1 
~
N 1
~
N
 (1   )
1 
~
N 1
 p N~
M/M/m Queue
There are m servers and the customers line up in one queue. The customer at the head of the queue is routed to the
available server.
pn 1  npn n  m
pn 1  mpn n  m
Balance equations:
 ( m ) n

1  
p0
nm
n!

pn 
 mm  n
 p0
nm
m!

1    

0

……….
1
2

1    m
1    (m  1)


…
m-1
( m  1)
where  
m
1    m
1    m


m+1
m
m

 1.
m

m+2
m
m
…
If   1, system has no steady state distributi on.
With   1, we can calculate p0 as follows :
m ( m ) n
 ( m ) n

1 
 
 p n  1  p0 1  

m! m n  m 
n 0
n  m 1
 n 1 n!

m ( m ) n
 ( m ) n

1 
p0  1  
 

m! m n  m 
n  m 1
 n 1 n!
1
1
m 1(m ) n
(m ) m 
 


m!(1   ) 
 n 1 n!
Pr (queueing)  probabilit y that a customer finds all servers busy
and has to wait in queue


nm
nm
 PQ   pn  
p0 m m  n
m!
p0 (m ) m  n  m


m!
nm
p0 (m ) m

m!(1   )
Erlang C Formula
N Q  expected number of customers in queue

  npn  m
W  average time in queue

NQ
n 0

  np0
n 0
m m ρ nm
m!
p0 ( m ) m 

 n n
m!
n 0
p0 ( m ) m
ρ
m!
( 1  ρ)2
ρ
 PQ
( 1  ρ)



PQ 
 (1   )
T  delay in system

1

W 
1


PQ 
 (1   )
Average number of customers in system  N  λT
M/M/ Queue
pn 1  npn
n  1,2,3,...
n
 1
pn  p0  
   n!

n  1,2,3,...
 p n  1  p0  e
with



n 0
Note that a steady state distributi on always exists.
n



 e
n  0,1,2,3,...
pn   
   n!
The number of customers in the system is Poisson wi th parameter /
N  Average number of customers in system 
T
N


1



M/M/m/m/ Queue
There are m servers. If a customer upon arrival finds all servers busy, it does not enter the
system and is lost. The m in •/•/•/m is the limit of the number of customers in the system.
This model is used frequently in the traditional telephony. To use in the data networks, we
can assume that m is the number of virtual circuit connections allowed.
Balance equations:
1  
1    (m  1)
1    

0

1

2
….
m-1
( m  1)
1    m


m
m
pn 1  npn
n  1,2,3,..., m
n
 1
pn  p0  
   n!
n  0,1,2,..., m
1
 m   n 1 

with  pn  1  p0     
n 0
 n 0   n!
Note that steady state distributi on exists for all / .

Erlang B Formula
p m  probabilit y that an arrival is lost
m
 1
 

m!
   n
m   1
  
n  0   n!
Multi-Dimensional Markov Chain
Consider transmission lines with m independent circuits of equal capacity. There are two
types of sessions:
1. Arrival rate 1 and service rate 1
2. Arrival rate 2 and service rate  2
We want to find steady state blocking probabilit y.
If 1   2 , when we have M/M/m/m with arrival rate   1  2 .
But for 1   2 , we have two different types of customers.
We need a state space that reflects this fact.
Two dimensiona l state is described by (n1 , n2 ) where n1 is the
number of customers of type 1 occupying circuits, and n2 is the
number of customers of type 2.
m, 0
m1
1
Transition Probability Diagram
2
m-1, 0
1
1
(m  1)1
2 1
2
1
.
.
.
2 1
1
1
2
 2
2
1
32
1
2
2 2
2
2
2 2
 2
1
Pr (n1,n2 )  0 for n1  0,n2  0, n1  n2  m.
(m  1)1
1
.
.
.
There exist unique values for
m-1, 1
2
1, m-1
(m 1)2
1
1
1
2
32
2
2
0, m-1
( m  1) 2
0, m
m 2
Suppose in the previous case, there is a limit k < m on the number of circuits that can be used by sessions of
type 1.
….
….
k-1, m-k-1
….
….
….
….
….
Blocking probabilities for call types:
Pr( B1 ) 
( n1 ,n2 )|

mk n1 m, n2 mn1 
Pr( n1 , n2 )
and
Pr( B2 ) 

( n1 ,n2 )| 0n1 m,
n2 min(k ,mn1 )
Pr( n1 , n2 )
Method of fining the steady state solutions for multi dimensional Markov Chain.
Assume there are l different call types. Let (n1 , n 2 , n 3 ,..., n l )
denote the state where ni is the number of customers of types i.
Then, if
1.the global balance equations can be written in the following form :
λi Pr (n1,...,ni-1,ni ,ni 1,...,nl )  μi Pr (n1,...,ni-1,ni  1,ni 1,...,nl )
2. the steady state distributi on has a product form.
l
Pr (n1,n2 ,n3 ,...nl )  Π Pr (ni )
i 1
 We can solve for stationary distributi on to get closed form solutions.
Truncation of Multi Dimensional System
Consider l M/M/1 in independent queues.
Pr( ni )  ini (1  i ) where i 
i
.
i
Then, for the joint queue, the following is true:
l
Pr (n1,n2 ,n3 ,...nl )  Π Pr (ni )
i 1
Above is also true for M/M/m, M/M/, M/M/m/m, and all other birth-death processes.
We now consider truncation of multi dimensional Markov Chain. Truncation is achieved by
eliminating (or not considering) some of the states with low probability. The truncated
system is a Markov Chain with the same transition diagram without some of the states that
have been eliminated.
Claim: Stationary distribution of the truncated system is in a product form.
Pr( n1 , n2 , n3 ,...nl ) 
1n  2n  ...  ln
1
l
2
where G 
G
n
n n
 1  2  ...  l
1
1
l
all ( n1 ,n2 ,...nl )
Proof: We have detailed balance equations:
i Pr(n1,..., ni 1, ni , ni 1,..., nl )  i Pr(n1,..., ni 1, ni  1, ni 1,..., nl )
Substituting
Pr( n1 , n2 ,...nl ) 
equations hold true with  i 
Since the solution
1n  2n  ...  ln
1
i
.
i
l
2
G
Pr( n1 , n2 ,...nl ) 
we can show that balance
,
1n 2n  ...  ln
1
it must the unique stationary distribution.
l
2
G
satisfies the balance equations,
Example: Blocking Prob of Two Call Types
m

Pr( B1 ) 
( n1 ,n2 )|

m-k  n1  m, n2  m  n1 
Pr( n1 , n2 )

k
k
 
n1 0 n2 0
k

Pr( B2 ) 
( n1 ,n2 )|

0 n1  m, n2  min(k ,m  n1 )
Pr( n1 , n2 )

n1 0
k
1n  2 mn
1
n1  k n1!
1n1  2 n2
n1! n2!
1
(m  n1 )!
m
  
n1  k 1 n2 0
1n  2 k n
1
m
1
n1! (m  n1 )!
k
 
n1 0 n2 0
1n  2 n
1
m  n1
2
n1! n2!
 
n1  k 1
m
1n  2n
1
2
n1! n2!
1n  2 mn
1
1
n1! (m  n1 )!
m  n1
  
n1  k 1 n2 0
1n  2n
1
2
n1! n2!
Important Results for M/G/1 Queue
Pollaczek-Khinchin Formula:
X2
W
2(1   )
(Expected customer w aiting time)
Where
X  EX  
 
1

 average service time
X 2  E X 2  second moment of service time


X
