0% found this document useful (0 votes)
73 views

M/M/1 and M/M/M Queueing Systems: 1. Preliminaries 1.1 Kendall's Notation: G/G/N/K Queue

This document summarizes queueing models and analyses the M/M/1 queue. It begins with preliminaries on Kendall's notation for queueing systems and why the M/M/1 queue can be modeled as a Markov chain. It then analyzes the M/M/1 queue using a continuous-time Markov chain (CTMC) approach, deriving expressions for key metrics like mean number of customers and waiting time. It also analyzes the M/M/1 queue using a discrete-time Markov chain (DTMC) approach. Finally, it notes that the response time distribution depends on the scheduling discipline, deriving it for first-come first-served queues.

Uploaded by

Binesh Jose
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

M/M/1 and M/M/M Queueing Systems: 1. Preliminaries 1.1 Kendall's Notation: G/G/N/K Queue

This document summarizes queueing models and analyses the M/M/1 queue. It begins with preliminaries on Kendall's notation for queueing systems and why the M/M/1 queue can be modeled as a Markov chain. It then analyzes the M/M/1 queue using a continuous-time Markov chain (CTMC) approach, deriving expressions for key metrics like mean number of customers and waiting time. It also analyzes the M/M/1 queue using a discrete-time Markov chain (DTMC) approach. Finally, it notes that the response time distribution depends on the scheduling discipline, deriving it for first-come first-served queues.

Uploaded by

Binesh Jose
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

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

M. Veeraraghavan; March 20, 2004


1. Preliminaries
1.1 Kendalls 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 dont show the self-loops
n
n+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 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 Littles Law):
(20)
Mean waiting time in queue:
(21)
Mean number of customers in queue (again using Littles 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
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
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
| | =
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 + ( )
-------------------

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

i 0 =
m 1

p
0

---
\ .
| |
k
1
m!m
k m
--------------------- = = k m

1 p
0
( )


m
-------- 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 .
Id 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. Its also called
Erlangs 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 Littles Law,
and (58)
Using , we get
(59)
Using Littles 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.
m
E T | |
1

---
P
Q
m
----------------- + =
m
E T

| |
1
m
-----------------
1
m
--------
P
Q

m
----------------- + = =
P
Q
m ( )
m
m!
----------------
p
0
1
------------ = = p
0
1 =
E T | |
1
m
-----------------
1
m
--------

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. Boorstyns 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 = ( )

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

You might also like