M/M/1 and M/M/m Queueing Systems

M. Veeraraghavan; March 20, 2004
1. Preliminaries
1.1 Kendall’s notation: G/G/n/k queue
G: General - can be any distribution.
First letter: Arrival process; M: memoryless - exponential interarrival times - Poisson arrival pro-
cess
Second letter: Service times distribution - M: exponential, D - Deterministic
Third letter: Number of servers,
Fourth letter: Number in system (including number in queue and number being served)
Important: In all cases, service times are mutually independent of each other, and are also
independent of interarrival times. Successive interarrival times are iid with the distribution speci-
fied by the first letter. Successive service times are also iid with the distribution specified by the
second letter. This means the arrival process and departure process are both renewal processes -
iid random sequence.
1.2 Relation between M/M/1 queue and MC
Why can the process , the number of customers in the system at time in an M/M/1
queue, be modeled as a Markov chain?
Answer: [4, pg. 126] Given that the memoryless property PLUS the independence assumption of
interarrival and service times, the number of customers in the system at a future time only
depends upon the number in the system now (at time ) and the arrivals or departures that occur
within the interval . Past history of how the system got to its state at time is irrelevant. Addi-
tional time needed to complete service of customer being served observes the memoryless prop-
erty.
, (1)
where is the number of arrivals in the time interval , and is the number of
departures in the time interval . is dependent only on because the arrival process
n
s
n
N t ( ) t
t h +
t
h t
N t h + ( ) N t ( ) X h ( ) Y h ( ) – + =
X h ( ) t t h + , ( ) Y h ( )
t t h + , ( ) X h ( ) h
is Poisson. is 0 if the service time of the customer being served, . is 1, if
and , and so on. As the service times are independent, neither nor
depend on what happened prior to . Thus, only depends upon and not the
past history. Hence it is a CTMC.
2. Analysis of the M/M/1 queue using CTMC results: [3], page 365-371.
First consider a special case of an irreducible time-homogeneous MC, i.e., a birth-death process.
A homogeneous CTMC is a birth-death process if there exists constants , , and ,
such that the transition rates are given by:
, , and for . (2)
The reason is as follows: See (11) in Markov Chain lecture, which states that
, which for a homogeneous MC can be rewritten as (3)
(4)
Remembering that the sum of all transition probabilities out of a state is 1, should be
equal to . This is equal to . Therefore .
Use the global balance equations derived for steady-state solution of an irreducible, homogeneous
CTMC (eqn 32 of MC.pdf):
(5)
combined with the equation , where is the steady-state limiting probability of the
system being in state and and are the transition rates. Applying this to our birth-death
MC, we get
(6)
(7)
Y h ( ) s
1
h > Y h ( ) s
1
h ≤
s
2
s
1
+ h > s
1
s
2
… s
n
, , , X h ( )
Y h ( ) t N t h + ( ) N t ( )
λ
i
i 0 1 … , , = µ
i
i 0 1 … , , =
q
i i 1 + ,
λ
i
= q
i i 1 – ,
µ
i
= q
i
λ
i
µ
i
+ = q
ij
0 = i j – 1 >
q
i
λ
i
µ
i
+ =
p
jj
t t h + , ( ) 1 q –
j
t ( ) h o h ( ) + • =
p
jj
h ( ) 1 q –
j
h o h ( ) + • =
p
jj
t t h + , ( )
1 p
ji
t t h + , ( )
i ∀

– 1 λ
i
µ
i
+ ( )h – o h ( ) + q
j
λ
i
µ
i
+ =
p
k
q
kj
k j ≠

q
j
p
j
– 0 =
p
j
j

1 = p
j
j q
kj
q
j
λ
j
µ
j
+ ( )p
j
– p
j 1 +
µ
j 1 +
p
j 1 –
λ
j 1 –
+ + 0 =
λ
0
p
0
– µ
1
p
1
+ 0 =
Eqn. (7) is the same as the detailed balance equation we showed for a birth-death DTMC in
MC.pdf. See Fig. 1 for a birth-death CTMC.
Note the difference between the state diagram of a CTMC and the state diagram of a DTMC. In
the latter the arcs are labeled with conditional probabilities; in the former they are labeled with
transition rates - so the latter is sometime called transition-rate diagram - this from [3], page 367.
Rearranging (6), we get:
(8)
Similarly,
(9)
and so on until:
. (10)
Therefore:
(11)
From (7), since ,
and hence for (12)
Therefore:
for (13)
Since :
.......... ..........
Figure 1:CTMC for a birth-death process; interesting that we don’t show the self-loops
n
n+1
λ
0
µ
1
λ
1
λ
2
λ
n 1 –
λ
n
µ
2
µ
3
µ
n
µ
n 1 +
0
1
2
λ
j
p
j
µ
j 1 +
p
j 1 +
– λ
j 1 –
p
j 1 –
µ
j
p
j
– =
λ
j 1 –
p
j 1 –
µ
j
p
j
– λ
j 2 –
p
j 2 –
µ
j 1 –
p
j 1 –
– =
λ
1
p
1
µ
2
p
2
– λ
0
p
0
µ
1
p
1
– =
λ
j
p
j
µ
j 1 +
p
j 1 +
– λ
j 1 –
p
j 1 –
µ
j
p
j
– λ
j 2 –
p
j 2 –
µ
j 1 –
p
j 1 –
– … λ
0
p
0
µ
1
p
1
– = = = =
λ
0
p
0
µ
1
p
1
– 0 =
λ
j 1 –
p
j 1 –
µ
j
p
j
– 0 = p
j
λ
j 1 –
µ
j
-----------
\ .
| |
p
j 1 –
= j 1 ≥
p
j
λ
j 1 –
λ
j 2 –
…λ
0
µ
j
µ
j 1 –
…µ
0
-----------------------------------p
0
p
0
λ
i
µ
i 1 +
-----------
i 0 =
j 1 –

= = j 1 ≥
p
j
j

1 =
. (14)
The number of customers in an M/M/1 queue is a homogeneous, irreducible birth-death CTMC in
which for and for . Applying (13) and (14) to this case yields:
and , if . (15)
We define traffic intensity, . for a stable system. Server utilization
.
The mean number of customers in the system in the steady-state can be computed:
(16)
(17)
(18)
Derive (19)
Mean response time (using Little’s Law):
(20)
Mean waiting time in queue:
(21)
Mean number of customers in queue (again using Little’s Law):
; also (22)
p
0
1
1
λ
i
µ
i 1 +
-----------
i 0 =
j 1 –

j 1 ≥

+
---------------------------------------- =
λ
i
λ = i ∀ µ
i
µ = i ∀
p
j
λ
µ
---
\ .
| |
j
p
0
= p
0
1
1
λ
µ
---
\ .
| |
j
j 1 ≥

+
----------------------------
1
λ
µ
---
\ .
| |
j
j 0 ≥

------------------- 1
λ
µ
--- – = = =
λ
µ
--- 1 <
ρ λ µ ⁄ = ρ 1 <
U 1 p
0
– ρ = =
E N | | np
n
n 0 =



n
1 ρ – ( )
n 0 =


ρ 1 ρ – ( ) nρ
n 1 –
n 0 =


= = =
E N | | ρ 1 ρ – ( )
ρ ∂

ρ
n
\ .
| |
n 0 =


ρ 1 ρ – ( )
ρ ∂

ρ
n
n 0 =


\ .
|
|
| |
ρ 1 ρ – ( )
ρ ∂
∂ 1
1 ρ – ( )
-----------------
\ .
| |
= = =
E N | | ρ 1 ρ – ( )
1
1 ρ – ( )
2
-------------------
ρ
1 ρ – ( )
----------------- = =
Var N | |
ρ
1 ρ – ( )
2
------------------- =
E T | |
E N | |
λ
------------
ρ
λ 1 ρ – ( )
--------------------
1
µ λ –
------------ = = =
E W | | E T | |
1
µ
--- –
1
µ λ –
------------
1
µ
--- –
ρ
µ λ –
------------ = = =
E N
Q
| | λE W | |
ρ
2
1 ρ – ( )
----------------- = = E N
Q
| | E N | | ρ –
ρ
1 ρ – ( )
----------------- ρ –
ρ
2
1 ρ – ( )
----------------- = = =
Subtract and not 1 because is the probability that the server is busy.
Above results hold for disciplines other than FCFS. It holds for any scheduling discipline as
long as [3], page 370):
1. The server is not idle when there are jobs waiting for service (work conserving)
2. The scheduler is not allowed to use any deterministic a priori information about job service
times (e.g., Shortest Remaining Processing Time First - SPRT will reduce E[R]).
3. The service time distribution is not affected by the scheduling discipline.
3. Derivation of M/M/1 queue results using DTMC
Both [4] and [5] analyze the M/M/1 queue using a DTMC. Focus attention on the time instants:
, where is a small positive number. Let be the number of customers in the
system at time . The process is a DTMC with the same steady-state occu-
pancy distribution as those of the CTMC . The DTMC for an M/M/1 queue is shown in Fig.
2. It is a birth-death DTMC. The transition probabilities is indepen-
dent of for a time-homogeneous DTMC.
(Poisson arrival process) (23)
for , (24)
which is the prob. of 0 arrivals and 0 departures in interval .
for , (25)
which is the prob. of 1 arrival and 0 departures in interval
for , (26)
which is the prob. of 0 arrivals and 1 departure in interval
ρ ρ
0 δ 2δ 3δ … , , , , δ N
k
kδ N
k
k 0 1 … , , = { }
N t ( )
.......... ..........
Figure 2:DTMC for an MM/1 queue; transition probabilities are correct up to an term o δ ( )
n
n+1
1 λδ –
λδ
λδ λδ λδ λδ
1 λδ – µδ –
µδ
µδ µδ
µδ µδ
1 λδ – µδ – 1 λδ – µδ –
1 λδ – µδ –
P
ij
P N
k 1 +
j = N
k
i = { } =
k
P
00
1 λδ – o δ ( ) + e
λδ –
= =
P
ii
1 λδ µδ – – o δ ( ) + e
λδ –
e
µδ –
= = i 1 ≥
kδ k 1 + ( )δ , ( )
P
i i 1 + ,
λδ o δ ( ) + e
µδ –
λδe
λδ –
= = i 0 ≥
kδ k 1 + ( )δ , ( )
P
i i 1 – ,
µδ o δ ( ) + e
λδ –
µδe
µδ –
= = i 1 ≥
kδ k 1 + ( )δ , ( )
for (27)
Neglect all terms in the second order of .
With this DTMC, we can find the stationary distribution (steady-state) using the derivation in
MC.pdf for time-homogeneous irreducible DTMCs:
(28)
Using the detailed balance equations (see the lecture MC.pdf) - since it is a birth-death process:
(29)
Applying it to the DTMC of the M/M/1 queue shown in Fig. 2:
(30)
As ,
for (31)
Setting , we get the same results as with the CTMC derivation.
4. Distribution of response time
This DOES depend upon the scheduling discipline (unlike the average response time). We derive
the response time distribution assuming the FCFS (First Come First Serve) scheduling discipline.
Let the arriving job find jobs in the system. Response time , where
is the service time of the arriving job, is the remaining time of the job in service and ,
are the service times of the jobs in the queue. These are independent ran-
dom variables. Given the memoryless property of the exponential distribution, we can write the
Laplace transform of the conditional distribution of given as
(32)
Laplace transform of a nonnegative continuous random variable is defined as [3], page 196:
(33)
If is a nonnegative integer-valued discrete random variable, then we define its -transform as:
P
ij
o δ ( ) = i j – 1 >
δ
ν
n
P N
k
n = { }
k ∞ →
lim P N t ( ) n = { }
t ∞ →
lim = =
ν
n
p
n n 1 + ( )
ν
n 1 +
p
n 1 + ( )n
= n 0 1 … , , =
p
n
λδ o δ ( ) + p
n 1 +
µδ o δ ( ) + =
δ 0 →
p
n 1 +
p
n
λ
µ
---
\ .
| |
= n 0 1 2 … , , , =
ρ λ µ ⁄ =
n R S S'
1
S
2
… S
n
+ + + + =
S S'
1
S
i
i 2 … n , , = n 1 – ( ) n
R N n =
L
R N
s n ( )
µ
s µ +
------------
\ .
| |
n 1 +
=
X
L
X
s ( ) L s ( ) M
X
s – ( ) e
sx –
f x ( ) x d
0


= = =
X z
, (34)
where moment generating function is given by (if is a r.v., is also a r.v.):
(35)
The convolution theorem: Let be mutually independent random variables and let
. Then if exists for all , then:
, (36)
i.e., the moment generating function of a sum of independent random variables is the product of
the moment generating functions.
Proof:
by independence (37)
Hence (38)
Sum of mutually exclusive events and product of independent ran-
dom variables . So for a sum of independent random variables, we use
the theorem that the product of moment generating functions of the r.vs. is the moment generating
function of the sum.
Going back to (32), and applying the theorem of total Laplace transform (like the theorem of total
probability), and using (15) for , we get:
(39)
G
X
z ( ) G z ( ) E z
X
| | M
X
z ln ( ) p
X
i ( )z
i
i 0 =


= = = =
M
X
θ ( ) X Xθ
M
X
θ ( ) E e

| | =
X
1
X
2
… X
n
, , ,
Y X
i
i 1 =
n

= M
X
i
θ ( ) i
M
Y
θ ( ) M
X
1
θ ( )M
X
2
θ ( )…M
X
n
θ ( ) =
M
Y
θ ( ) E e
X
1
X
2
… X
n
+ + + ( )θ
| | E e
X
i
θ
i 1 =
n

E e
X
i
θ
| |
i 1 =
n

= = =
M
Y
θ ( ) M
X
i
θ ( )
i 1 =
n

=
P A B ∪ ( ) P A ( ) P B ( ) + =
P X
1
X
2
( ) P X
1
( )P X
2
( ) =
p
n
L
R
s ( )
µ
s µ +
------------
\ .
| |
n 1 +
1 ρ – ( )ρ
n
n 0 =


=
(40)
This means is exponentially distributed with parameter .
Laplace transform for an exponentially distributed random variable is:
(41)
5. M/M/m queue
The underlying Markov chain is again a birth-death process with
for and (42)
(43)
Plugging these into (13) yields:
for , and (44)
for . (45)
Here is the interesting thing regarding traffic intensity. We called traffic intensity in the M/M/
1 queue derivation as it is called in [3], page 368. In [6], page 824, is called traffic load. In an
M/M/1 queue, the utilization (i.e., probability that the server is not idle) turns out to be
equal to . For an M/M/m queue, the condition for stability is . Traffic load should not be
dependent on . But here both [3] and [4] set . NOTE THIS REDEFINITION OF
(confusing to redefine but it helps the analytics).
L
R
s ( )
µ 1 ρ – ( )
s µ +
--------------------
1
1
µρ
s µ +
------------ –
---------------------
\ .
|
|
| |
µ 1 ρ – ( )
s µ µρ – +
-------------------------
µ 1 ρ – ( )
s µ 1 ρ – ( ) +
----------------------------- = = =
R µ 1 ρ – ( )
X
L
X
s ( ) e
sx –
λe
λx –
x d
0


λ
s λ +
------------ = =
λ
k
λ = k 0 1 2 … , , , =
µ
k
kµ 0 k m < <
mµ k m ≥
¹
´
¦
=
p
k
p
0
λ
i 1 + ( )µ
-------------------
i 0 =
k 1 –

p
0
λ
µ
---
\ .
| |
k
1
k!
---- = = k m <
p
k
p
0
λ
i 1 + ( )µ
-------------------
λ

--------
j m =
k 1 –

i 0 =
m 1 –

p
0
λ
µ
---
\ .
| |
k
1
m!m
k m –
--------------------- = = k m ≥
ρ
ρ
1 p
0
– ( )
ρ
λ

-------- 1 <
m ρ λ mµ ( ) ⁄ =
ρ ρ
Using (45) and , we derive as:
(46)
(47)
(48)
(Exercise: derive this) (49)
If is an r.v. denoting the number of busy servers, then:
(50)
(51)
where (52)
Exercise: Show that . Therefore the utilization of any individual server is
, while the average number of busy servers is equal to traffic intensity .
I’d define utilization of the system to be and hence equal to the traffic intensity (same
as in M/M/1 queue). See [7], page 492: is called per-server utilization and is called
total traffic intensity. Unit of is defined in [7], page 492 as measured in the Erlangs.
is also referred to as total load on the system. Same as in [6].
p
k
k 0 =


1 = p
0
p
0
mρ ( )
k
k!
---------------
k 0 =
m 1 –

mρ ( )
k
m!m
k m –
---------------------
k m =


+
1 –
=
p
0
mρ ( )
k
k!
---------------
k 0 =
m 1 –

mρ ( )
m
m!
---------------- ρ
k m –
k m =


+
1 –
mρ ( )
k
k!
---------------
k 0 =
m 1 –

mρ ( )
m
m!
---------------- ρ
i
i 0 =


+
1 –
= =
p
0
mρ ( )
k
k!
---------------
k 0 =
m 1 –

mρ ( )
m
m!
----------------
1
1 ρ – ( )
----------------- +
1 –
=
E N | | kp
k
k 0 =


mρ ρ
mρ ( )
m
m!
----------------
p
0
1 ρ – ( )
2
------------------- + = =
M
E M | | kp
k
k 0 =
m 1 –

m p
k
k m =


+ kp
k
k 0 =
m 1 –

m p
0
mρ ( )
k 1
m!m
k m –
---------------------
\ .
| |
k m =


+ = =
E M | | kp
k
k 0 =
m 1 –

mp
0
m!
---------- mρ ( )
m 1
1 ρ –
------------
\ .
| |
+ kp
k
k 0 =
m 1 –

mp
m
1 ρ –
------------ + = =
p
m
p
0
mρ ( )
m 1
m!
------ =
E M | | mρ λ µ ⁄ = =
E M | | ( ) m ⁄ ρ = λ µ ⁄
E M | |
ρ ρm
λ µ ⁄ λ µ ⁄
Probability of an arriving job finding that all servers are busy is called Erlang-C formula and
is given by:
(see (51) and (52)) (53)
(54)
The above is a call queueing system in a telephone network with an infinite buffer. It’s also called
Erlang’s delayed-call formula.
Average number in queue (not in service) is:
(55)
(56)
Using (54) and , we can express the mean number waiting in queue
as
(57)
Using Little’s Law,
and (58)
Using , we get
(59)
Using Little’s Law,
, which is the same as (49). (60)
m
P queueing | | p
k
k m =


p
m
1 ρ –
------------ = =
P
Q
P queueing | |
mρ ( )
m
m!
----------------
p
0
1 ρ –
------------ = =
E N
Q
| | k m – ( )p
k
k m 1 + =


k m – ( )p
0
mρ ( )
k 1
m!m
k m –
---------------------
\ .
| |
k m 1 + =


= =
E N
Q
| | p
0
mρ ( )
m
m!
---------------- k m – ( )ρ
k m –
k m 1 + =


p
0
mρ ( )
m
m!
---------------- nρ
n
n 0 =


= =
1 ρ – ( ) nρ
n
n 0 =


\ .
|
|
| |
ρ
1 ρ –
------------ =
E N
Q
| | P
Q
1 ρ – ( )
ρ
1 ρ – ( )
2
------------------- P
Q
ρ
1 ρ – ( )
----------------- = =
E W | | P
Q
ρ
λ 1 ρ – ( )
-------------------- =
ρ λ mµ ( ) ⁄ =
E T | | E W | |
1
µ
--- +
1
µ
---
P
Q
mµ λ –
----------------- + = =
E N | |
1
µ
---
P
Q
mµ λ –
----------------- +
\ .
| |
λ mρ
ρP
Q
1 ρ –
------------ + = =
Compare M/M/1 queue with a fast server operating at with an M/M/m system:
Average packet delay (mean response time) in the M/M/m system is:
(61)
Average packet delay in an M/M/1 queue with service rate is:
(62)
In an M/M/1 queue
because . (63)
. (64)
Under light loads , then
(65)
Under heavy loads, and , then
(66)
The above is a comparison of statistical multiplexing (where whole link capacity can be used) and
TDM/FDM schemes where once a circuit capacity is assigned, it is not increased during the life-
time of the call.
6. M/M/
Suppose is the probability that telephone lines are busy at time . Assume that
infinitely many lines are available and that the call arrival rate is while average call duration is
. Find as . Let denote the average number of busy lines at time .
Find the value of when the system reaches steady state. Also find the average response
time for this queueing system in the steady state.
This is a M/M/ queueing system.

E T | |
1
µ
---
P
Q
mµ λ –
----------------- + =

E T
ˆ
| |
1
mµ λ –
-----------------
1

--------
P
Q
ˆ
mµ λ –
----------------- + = =
P
Q
ˆ mρ ( )
m
m!
----------------
p
0
1 ρ –
------------ ρ = = p
0
1 ρ – =
E T | |
1
mµ λ –
-----------------
1

--------
ρ
mµ λ –
----------------- +
mµ λ – ( ) ρmµ +
mµ mµ λ – ( )
----------------------------------------
1
mµ λ – ( )
---------------------- = = = =
ρ 1 « P
Q
P
Q
ˆ
= 0 ≅
E T | |
E T
ˆ
| |
------------ m ≅
P
Q
P
Q
ˆ
= 1 ≅ 1 µ ⁄ 1 mµ λ – ( ) ⁄ «
E T | |
E T
ˆ
| |
------------ 1 ≅

P X t ( ) n = ( ) n t
λ
1 µ ⁄ P X t ( ) n = ( ) t ∞ → E N t ( ) | | t
E N t ( ) | |

As , we have
(67)
Thus,
(68)
(69)
Since there are always enough telephone lines for any call, the response time follows exponential
distribution with the average value of .
References
[1] K. S. Trivedi, “Probability, Statistics with Reliability, Queueing and Computer Science Applications,” Second
Edition, Wiley, 2002, ISBN 0-471-33341-7.
[2] R. Yates and D. Goodman, “Probability and Stochastic Processes,” Wiley, ISBN 0-471-17837-3.
[3] K. S. Trivedi, “Probability, Statistics with Reliability, Queueing and Computer Science Applications,” First
Edition, Prentice Hall, 1982, ISBN 0-13-711564-4r.
[4] D. Bertsekas and R. Gallager, “Data Networks,” Prentice Hall, 1986, ISBN 0-13-196825-4.
[5] Prof. Boorstyn’s notes, Polytechnic University, NY.
[6] A. Leon Garcia and I. Widjaja, “Communication Networks,” McGraw Hill, 2000, First Edition.
[7] Mischa Schwartz, “Telecommunications Networks, Protocols, Modeling and Analysis,” Addison Wesley,
1987.
0 1 n
State transition diagram
λ λ
λ λ
µ 2µ nµ
n 1 + ( )µ
t ∞ →
P X n = ( )
λ

------P X n 1 – = ( )
λ
µ
---
\ .
| |
n
P X 0 = ( )
n!
---------------------- = =
P X 0 = ( )
1
λ
µ
---
\ .
| |
n
1
n!
-----
n 0 =


--------------------------- e
λ µ ⁄ –
e
ρ –
= = =
E N | | nP X n = ( )
n 1 =


λ µ ⁄ = =
1 µ ⁄

Analysis of the M/M/1 queue using CTMC results: [3]. t + h ) should be equal to 1 – ∑ p ji ( t. neither X ( h ) nor Y ( h ) depend on what happened prior to t . First consider a special case of an irreducible time-homogeneous MC. … such that the transition rates are given by: q i. where p j is the steady-state limiting probability of the system being in state j and q kj and q j are the transition rates. i + 1 = λ i . page 365-371.e. we get – ( λ j + µ j )p j + p j + 1 µ j + 1 + p j – 1 λ j – 1 = 0 – λ0 p0 + µ1 p1 = 0 (6) (7) . 2. i = 0.pdf): k≠j ∑ pk qkj – qj pj = 0 (5) combined with the equation ∑ pj j = 1 . and µ i . 1. Y ( h ) is 0 if the service time of the customer being served. i – 1 = µ i . This is equal to 1 – ( λ i + µ i )h + o ( h ) . q i = λ i + µ i and q ij = 0 for i – j > 1 .. Thus. t + h ) . …. p jj ( t. A homogeneous CTMC is a birth-death process if there exists constants λ i . As the service times s 1. Applying this to our birth-death MC. and so on. The reason q i = λ i + µ i is as follows: See (11) in Markov Chain lecture. Y ( h ) is 1. homogeneous CTMC (eqn 32 of MC. s 1 > h . s n are independent.is Poisson. s 2. 1. i = 0. t + h ) = 1 – q j ( t ) • h + o ( h ) . which for a homogeneous MC can be rewritten as p jj ( h ) = 1 – q j • h + o ( h ) (3) (4) (2) Remembering that the sum of all transition probabilities out of a state is 1. Therefore q j = λ i + µ i . which states that p jj ( t. if s 1 ≤ h and s 2 + s 1 > h . a birth-death process. i. N ( t + h ) only depends upon N ( t ) and not the past history. … . q i. ∀i Use the global balance equations derived for steady-state solution of an irreducible. Hence it is a CTMC.

p 0 = p 0 ∏ ----------.. In the latter the arcs are labeled with conditional probabilities. p j – 1 for j ≥ 1  µj  Therefore: λ j – 1 λ j – 2 …λ 0 λi p j = ----------------------------------... (7) is the same as the detailed balance equation we showed for a birth-death DTMC in MC. λj – 1 λ j – 1 p j – 1 – µ j p j = 0 and hence p j =  ---------. λj – 1 pj – 1 – µj pj = λj – 2 pj – 2 – µj – 1 pj – 1 and so on until: λ1 p1 – µ2 p2 = λ0 p0 – µ1 p1 ..so the latter is sometime called transition-rate diagram . µn λn – 1 n µn + 1 λn n+1.. in the former they are labeled with transition rates .pdf.... Note the difference between the state diagram of a CTMC and the state diagram of a DTMC.....for j ≥ 1 µ j µ j – 1 …µ 0 µi + 1 i=0 j–1 (8) (9) (10) (11) (12) (13) Since ∑ pj j = 1: . since λ 0 p 0 – µ 1 p 1 = 0 . we get: λj pj – µj + 1 pj + 1 = λj – 1 pj – 1 – µj pj Similarly. See Fig. Therefore: λj pj – µj + 1 pj + 1 = λj – 1 pj – 1 – µj pj = λj – 2 pj – 2 – µj – 1 pj – 1 = … = λ0 p0 – µ1 p1 From (7). 1 for a birth-death CTMC..Eqn. interesting that we don’t show the self-loops Rearranging (6)... λ0 0 µ1 1 µ2 λ1 2 µ3 λ2 .this from [3].. page 367.. Figure 1:CTMC for a birth-death process..

 p 0 and p 0 = ---------------------------.= ----------.– -... 1+ ∑ ∑  µ  µ j≥1 j≥0 (15) We define traffic intensity. ρ = λ ⁄ µ . if -. also E [ N Q ] = E [ N ] – ρ = ---------------. j–1 λi 1 + ∑ ∏ ----------µi + 1 j ≥ 1i = 0 (14) The number of customers in an M/M/1 queue is a homogeneous.1 p 0 = --------------------------------------. irreducible birth-death CTMC in which λ i = λ for ∀i and µ i = µ for ∀i .1 ρ E [ W ] = E [ T ] – -.  µ µ µ λ j λ j  -.< 1 .– ρ = ---------------(1 – ρ) (1 – ρ) (1 – ρ) 2 2 (17) (18) (19) (20) (21) (22) .= ---------------------λ λ(1 – ρ) µ–λ Mean waiting time in queue: 1 1 ..= ----------µ µ–λ µ µ–λ Mean number of customers in queue (again using Little’s Law): ρ ρ ρ E [ N Q ] = λE [ W ] = ---------------. ρ < 1 for a stable system. Applying (13) and (14) to this case yields: λ λ j 1 1 λ p j =  -. Server utilization U = 1 – p0 = ρ .= -----------------.= 1 – -.= ---------------2 (1 – ρ) (1 – ρ) ρ Derive Var [ N ] = -----------------2 (1 – ρ) Mean response time (using Little’s Law): ρ 1 E [ T ] = E [ N ] = -------------------. The mean number of customers in the system in the steady-state can be computed: ∞ ∞ ∞ n E[N] = ∑ npn n=0 ∞ = ∑ nρ n=0 (1 – ρ) = ρ(1 – ρ) ∑ nρ n=0 n–1 (16)  ∞  ∂ n 1 n E [ N ] = ρ ( 1 – ρ ) ∑  ρ = ρ ( 1 – ρ ) ∂  ∑ ρ  = ρ ( 1 – ρ ) ∂  ---------------- ∂ρ   ∂ρ ∂ ρ  ( 1 – ρ ) n = 0  n=0 1 ρ E [ N ] = ρ ( 1 – ρ ) -----------------.  -.

page 370): 1. The transition probabilities P ij = P { N k + 1 = j N k = i } is independent of k for a time-homogeneous DTMC.Subtract ρ and not 1 because ρ is the probability that the server is busy... P 00 = 1 – λδ + o ( δ ) = e – λδ (Poisson arrival process) – λδ – µδ (23) (24) P ii = 1 – λδ – µδ + o ( δ ) = e e for i ≥ 1 . It holds for any scheduling discipline as long as [3].... 2δ. of 1 arrival and 0 departures in interval ( kδ. ( k + 1 )δ ) P i. 3δ. The scheduler is not allowed to use any deterministic a priori information about job service times (e..... P i..SPRT will reduce E[R]). 3. The service time distribution is not affected by the scheduling discipline. µδ µδ µδ µδ 1 – λδ – µδ 1 – λδ – µδ λδ λδ n µδ n+1.. where δ is a small positive number.. The process { N k k = 0.. Derivation of M/M/1 queue results using DTMC Both [4] and [5] analyze the M/M/1 queue using a DTMC. The server is not idle when there are jobs waiting for service (work conserving) 2.. which is the prob. of 0 arrivals and 0 departures in interval ( kδ. δ. (26) which is the prob. It is a birth-death DTMC.. (25) which is the prob. ( k + 1 )δ ) . 3.. … } is a DTMC with the same steady-state occupancy distribution as those of the CTMC N ( t ) . Figure 2:DTMC for an MM/1 queue. 1. Shortest Remaining Processing Time First . transition probabilities are correct up to an o ( δ ) term 2. … . Focus attention on the time instants: 0.. i + 1 = λδ + o ( δ ) = e – µδ λδe – λδ for i ≥ 0 . 1 – λδ 1 – λδ – µδ 1 – λδ – µδ λδ λδ λδ . Above results hold for disciplines other than FCFS. The DTMC for an M/M/1 queue is shown in Fig..g. ( k + 1 )δ ) . i – 1 = µδ + o ( δ ) = e – λδ µδe – µδ for i ≥ 1 . of 0 arrivals and 1 departure in interval ( kδ. Let N k be the number of customers in the system at time kδ ..

Response time R = S + S' 1 + S 2 + … + S n . Given the memoryless property of the exponential distribution. we can write the Laplace transform of the conditional distribution of R given N = n as µ . …  µ Setting ρ = λ ⁄ µ . (27) With this DTMC. we can find the stationary distribution (steady-state) using the derivation in MC. where S is the service time of the arriving job.P ij = o ( δ ) for i – j > 1 Neglect all terms in the second order of δ . We derive the response time distribution assuming the FCFS (First Come First Serve) scheduling discipline. i = 2. 2: p n λδ + o ( δ ) = p n + 1 µδ + o ( δ ) As δ → 0 .n+1 L R N ( s n ) =  -----------  s + µ (32) (31) (30) Laplace transform of a nonnegative continuous random variable X is defined as [3]. 1. n are the service times of the ( n – 1 ) jobs in the queue. 1. Let the arriving job find n jobs in the system. for n = 0.since it is a birth-death process: ν n p n ( n + 1 ) = ν n + 1 p ( n + 1 )n n = 0. then we define its z -transform as: .pdf for time-homogeneous irreducible DTMCs: ν n = lim P { N k = n } = lim P { N ( t ) = n } k→∞ t→∞ (28) Using the detailed balance equations (see the lecture MC. … (29) Applying it to the DTMC of the M/M/1 queue shown in Fig. These are n independent random variables. 2.pdf) . page 196: ∞ LX ( s ) = L ( s ) = MX ( –s ) = ∫e 0 – sx f ( x ) dx (33) If X is a nonnegative integer-valued discrete random variable. λ p n + 1 = p n  -. Distribution of response time This DOES depend upon the scheduling discipline (unlike the average response time). …. we get the same results as with the CTMC derivation. 4. S' 1 is the remaining time of the job in service and S i .

then: i i=1 M Y ( θ ) = M X1 ( θ )M X2 ( θ )…M Xn ( θ ) .v.n+1 n  ----------- ( 1 – ρ )ρ  s + µ (39) . X 2.): MX ( θ ) = E [ e Xθ ] (35) The convolution theorem: Let X 1. i=0 i (34) where moment generating function M X ( θ ) is given by (if X is a r.v. is the moment generating function of the sum.vs.∞ G X ( z ) = G ( z ) = E [ z ] = M X ( ln z ) = X ∑ pX ( i )z . X n be mutually independent random variables and let n Y = ∑ Xi . Going back to (32). Xθ is also a r.e. …. we get: ∞ LR ( s ) = ∑ n=0 µ .. So for a sum of independent random variables.. and applying the theorem of total Laplace transform (like the theorem of total probability). and using (15) for p n . Then if MX ( θ ) exists for all i . the moment generating functions. Proof: MY ( θ ) = E [ e ( X 1 + X 2 + … + X n )θ n (36) i. the moment generating function of a sum of independent random variables is the product of ] = E ∏e i=1 Xiθ n = ∏ E[e i=1 Xi θ ] by independence (37) n Hence M Y ( θ ) = ∏ MX ( θ ) i (38) i=1 Sum of mutually exclusive events P ( A ∪ B ) = P ( A ) + P ( B ) and product of independent random variables P ( X 1 X 2 ) = P ( X 1 )P ( X 2 ) . we use the theorem that the product of moment generating functions of the r.

for k ≥ m . Traffic load should not be mµ dependent on m . probability that the server is not idle) turns out to be λequal to ρ . the utilization ( 1 – p 0 ) (i. -------------------. and  µ k! ( i + 1 )µ i=0 m–1 k–1 (42) (43) 0<k<m k≥m (44) pk = p0 ∏ i=0 λ λ k 1 λ-----------------. But here both [3] and [4] set ρ = λ ⁄ ( mµ ) . page 824. k–m  µ ( i + 1 )µ mµ m!m j=m k–1 (45) Here is the interesting thing regarding traffic intensity. page 368. ρ is called traffic load.= p 0  -. M/M/m queue The underlying Markov chain is again a birth-death process with λ k = λ for k = 0. the condition for stability is ------. = -----------------------. µρ s + µ(1 – ρ) s + µ – µρ   s+µ This means R is exponentially distributed with parameter µ ( 1 – ρ ) .= ---------------------------s + µ 1 – ----------. --.. 1. … and  kµ µk =  mµ Plugging these into (13) yields: λ k 1λ p k = p 0 ∏ -----------------. In an M/M/1 queue.e. 2. 1 µ ( 1 – ρ )µ(1 – ρ) L R ( s ) = -------------------.< 1 . .∏ ------. In [6].= p 0  -. Laplace transform for an exponentially distributed random variable X is: ∞ (40) LX ( s ) = ∫e 0 – sx λe – λx λdx = ----------s+λ (41) 5. For an M/M/m queue.for k < m . We called ρ traffic intensity in the M/M/ 1 queue derivation as it is called in [3].  µ ( 1 – ρ )  -------------------. NOTE THIS REDEFINITION OF ρ (confusing to redefine ρ but it helps the analytics).

page 492 as measured in the Erlangs. I’d define utilization of the system to be E [ M ] and hence equal to the traffic intensity (same as in M/M/1 queue).-----------------. then: m–1 ∞ m–1 ∞ E[M] = ∑ kpk + m ∑ k=0 m–1 k=m pk = ∑ kpk + m ∑ k=0 k=m 1  p ( mρ ) k -------------------- k – m  0 m!m mp m (50) E[M] = ∑ k=0 mp 0 1 m kp k + --------. page 492: ρ is called per-server utilization and ρm is called total traffic intensity.v.--------------m! k! –1 k m ∞ –1 i ∑ρ i=0 (47) m–1 p0 = ∞ ∑ k=0 k 1 ( mρ ) ( mρ ) .+ --------------m! ( 1 – ρ ) k! (48) E[N] = ∑ k=0 m ( mρ ) . Therefore the utilization of any individual server is ( E [ M ] ) ⁄ m = ρ .--------------m! k! ∑ k=m ρ k–m = ∑ k=0 m ( mρ ) .----------------------------. =  1 – ρ m! m 1 where p m = p 0 ( mρ ) ----m! m–1 k=0 ∑ kpk + -----------1–ρ (51) (52) Exercise: Show that E [ M ] = mρ = λ ⁄ µ . Same as in [6]. while the average number of busy servers is equal to traffic intensity λ ⁄ µ . we derive p 0 as: m–1 ∞ –1 p0 = k=0 m–1 k m ∑ -------------.∞ Using (45) and ∑ pk k=0 = 1 .+ ( mρ ) -------------.+ ( mρ ) -------------.p 0 kp k = mρ + ρ --------------. See [7]. . denoting the number of busy servers. Unit of λ ⁄ µ is defined in [7].( mρ )  ----------.(Exercise: derive this) m! ( 1 – ρ ) 2 (49) If M is an r.+ ∑ k! ∞ –1 ( mρ ) k ( mρ ) -------------------k–m m!m k=m m–1 k (46) p0 = ∑ k=0 ( mρ ) . λ ⁄ µ is also referred to as total load on the system.

It’s also called Erlang’s delayed-call formula.= -.+ ---------------. PQ ρP Q 1 E [ N ] =  -.. ρ E [ W ] = P Q -------------------.and λ(1 – ρ) Using ρ = λ ⁄ ( mµ ) .= P Q ---------------2 (1 – ρ) (1 – ρ) Using Little’s Law. λ = mρ + ----------.(see (51) and (52)) 1–ρ (53) m ( mρ ) .Probability of an arriving job finding that all m servers are busy is called Erlang-C formula and is given by: ∞ P [ queueing ] = ∑ k=m pm p k = ----------. -  µ mµ – λ 1–ρ (60) (59) (58) (57) .+ ---------------µ µ mµ – λ Using Little’s Law. we can express the mean number waiting in queue   1–ρ n = 0  as ρ ρ E [ N Q ] = P Q ( 1 – ρ ) -----------------.p 0 P Q = P [ queueing ] = --------------. we get PQ 1 1 E [ T ] = E [ W ] + -.----------m! 1 – ρ (54) The above is a call queueing system in a telephone network with an infinite buffer. Average number in queue (not in service) is: ∞ ∞ E [ NQ ] = ∑ k = m+1 ( k – m )p k = ∞ ∑ k = m+1 1 k ( k – m )p 0  ( mρ ) -------------------- k – m  m!m ( mρ ) = p 0 --------------m! m ∞ (55) ( mρ ) E [ N Q ] = p 0 --------------m! m ∑ k = m+1 ( k – m )ρ k–m ∑ nρ n=0 n (56)  ∞  n ρ  Using (54) and ( 1 – ρ ) ∑ nρ = ----------.. which is the same as (49).

Find the value of E [ N ( t ) ] when the system reaches steady state.Compare M/M/1 queue with a fast server operating at mµ with an M/M/m system: Average packet delay (mean response time) in the M/M/m system is: PQ 1 E [ T ] = -.+ ---------------µ mµ – λ Average packet delay in an M/M/1 queue with service rate mµ is: PˆQ 1 1 ˆ ] = ---------------. Find P ( X ( t ) = n ) as t → ∞ ..= ------.+ ---------------E[T mµ – λ mµ mµ – λ In an M/M/1 queue m ( mρ ) p 0 PˆQ = --------------. m! 1 – ρ (61) (62) (63) (64) 1 1 ρ ( mµ – λ ) + ρmµ 1 E [ T ] = ---------------. Assume that infinitely many lines are available and that the call arrival rate is λ while average call duration is 1 ⁄ µ . Also find the average response time for this queueing system in the steady state. This is a M/M/ ∞ queueing system.≅ 1 ˆ E[T] (65) (66) The above is a comparison of statistical multiplexing (where whole link capacity can be used) and TDM/FDM schemes where once a circuit capacity is assigned. mµ – λ mµ mµ – λ mµ ( mµ – λ ) ( mµ – λ ) Under light loads ρ « 1 . P Q = PˆQ ≅ 1 and 1 ⁄ µ « 1 ⁄ ( mµ – λ ) .= --------------------. . P Q = PˆQ ≅ 0 then E[T] ----------.+ ---------------.≅ m ˆ E[T] Under heavy loads. 6. M/M/ ∞ Suppose P ( X ( t ) = n ) is the probability that n telephone lines are busy at time t .= ------. then E[T] ----------. Let E [ N ( t ) ] denote the average number of busy lines at time t .= --------------------------------------.= ρ because p 0 = 1 – ρ .----------. it is not increased during the lifetime of the call.

Gallager.λ 0 µ 1 λ λ n 2µ nµ λ ( n + 1 )µ State transition diagram As t → ∞ .” Prentice Hall.” Second Edition. References [1] [2] [3] [4] [5] [6] [7] K. 2002. K. Wiley. Prof. R. First Edition. “Data Networks. S. ISBN 0-471-17837-3. “Probability. NY. “Probability and Stochastic Processes. Leon Garcia and I. the response time follows exponential distribution with the average value of 1 ⁄ µ . Queueing and Computer Science Applications. –λ ⁄ µ –ρ 1 P ( X = 0 ) = --------------------------.” First Edition. D. Prentice Hall. Queueing and Computer Science Applications. -------------------- µ nµ n! Thus.” Addison Wesley. Statistics with Reliability. Modeling and Analysis. ISBN 0-471-33341-7. Yates and D. “Probability. Goodman. Polytechnic University. A.P ( X = n – 1 ) =  -. 2000. Trivedi. Trivedi. Protocols. Boorstyn’s notes. . Bertsekas and R. Mischa Schwartz. 1986. Widjaja. ISBN 0-13-196825-4. 1982.” Wiley. we have λ λ n P(X= 0) P ( X = n ) = -----. ISBN 0-13-711564-4r. Statistics with Reliability. ---∑  µ n! n=0 ∞ (67) (68) E[N] = ∑ nP ( X = n=1 n) = λ ⁄ µ (69) Since there are always enough telephone lines for any call. “Communication Networks.= e = e ∞ λ n 1 -. 1987.” McGraw Hill. S. “Telecommunications Networks.