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

Queueing Systems: Learning Objectives

Little's law states that the average number of customers in a stable queueing system (L) equals the product of the average throughput rate (TH) and the average time spent in the system by a customer (W). It can be proven by considering that in the long run, the rate at which customers enter the system must equal the rate at which they depart. Formally, L = TH × W.

Uploaded by

Nouman Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Queueing Systems: Learning Objectives

Little's law states that the average number of customers in a stable queueing system (L) equals the product of the average throughput rate (TH) and the average time spent in the system by a customer (W). It can be proven by considering that in the long run, the rate at which customers enter the system must equal the rate at which they depart. Formally, L = TH × W.

Uploaded by

Nouman Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 69

Chapter 6

Queueing systems
Learning objectives :
Little's law
Impact of the randomness on performances of queueing systems
Product-form solutions

Textbook :
C. Cassandras and S. Lafortune, Introduction to Discrete Event
Systems, Springer, 2007
S.M. Ross, Stochastic Process, John Wiley & Sons 1
Plan

• Introduction
• Classification of queueing systems
• Little's law
• Single stage queuing systems
• Queuing networks

2
Introduction

3
Definition of a queueing system

Departure of
Customer
served customers
arrivals

Departure of impatient
customers

• A queueing system can be described as follows:


"customers arrive for a given service, wait if the service cannot start
immediately and leave after being served"

• The term "customer" can be men, products, machines, ...

4
History of queueing theory

• The theory of queueing systems was developed to provide


models for forecasting behaviors of systems subject to random
demand.
• The first problems addressed concerned congestion of
telephone traffic (Erlang, "the theory of probabilities and
telephone conversations ", 1909)
• Erlang observed that a telephone system can be modeled by
Poisson customer arrivals and exponentially distributed
service times
• Molina, Pollaczek, Kolmogorov, Khintchine, Palm,
Crommelin followed the track
5
Interests of queueing systems

Queueing theory found numerous applications in:

– Trafic control (communication networks, air traffic, …)


– Planing (manufacturing systems, computer programmes, …)
– Facility dimensioning (factories, ...)

6
Classification of queueing
systems

7
Characteristics of simple queueing systems

Queueing systems can be characterized with several


criteria:

• Customer arrival processes


• Service time
• Service discipline
• Service capacity
• Number of service stages

8
Notation of Kendall

The following is a standard notation system of queueing systems

T/X/C/K/P/Z with

– T: probability distribution of inter-arrival times


– X: probability distribution of service times
– C: Number of servers
– K: Queue capacity
– P: Size of the population
– Z: service discipline

9
Customer arrival process
T/X/C/K/P/Z

• T can take the following values:


– M : markovian (i.e. exponential)
– G : general distribution
– D : deterministic
– Ek : Erlang distribution
–…

• If the arrivals are grouped in lots, we use the notation T[X] where X is the
random variable indicating the number of customers at each arrival epoch
– P{X=k} = P{k customers arrive at the same time}

• Some arriving customers can leave if the queue is too long


10
Service times
T/X/C/K/P/Z

• X can take the following values:


– M : markovian (i.e. exponential)
– G : general distribution
– D : deterministic
– Ek : Erlang distribution
–…

k exponential servers with parameter m

Erlang distribution Ek with parameter m

11
Number of servers
T/X/C/K/P/Z

In simple queueing systems, servers are identical

12
Queue capacity
T/X/C/K/P/Z

Loss of customers if
the queue is full

Capacity K

13
Size of the population
T/X/C/K/P/Z

The size of the population can be either finite or infinite

For a finite population, the customer arrival rate is a


function of the number of customers in the system:
l(n).

14
Service discipline
T/X/C/K/P/Z

Z can take the following values:


• FCFS or FIFO : First Come First Served
• LCFS or LIFO : Last Come First Served
• RANDOM : service in random order
• HL (Hold On Line) : when an important customer arrives, it takes the head
of the queue
• PR ( Preemption) : when an important customer arrives, it is served
immediately and the customer under service returns to the queue
• PS (Processor Sharing) : All customers are served simultaneously with
service rate inversely proportional to the number of customers
• GD (General Discipline)

15
The concept of customer classes

A queueing system can serve several classes of customers


characterized by:
• different arrival processes
• different service times
• different costs
• service priority according to their class (preemption or no
for example)

16
Simplified notation

We will use the simplified notation T/X/C when we consider


a queue where:
• The capacity is infinite
• The size of the population is infinite
• The service discipline is FIFO

• Hence T/X/C = T/X/C///FIFO

17
Ergodicity

• A system is said ergodic if


its stationary performances
equal
the time average of any realisation of the system, observed
over a sufficiently long period
T
1
E  X      lim  X  t  dt
T  T
t 0

• A regenerative system, i.e. a system with a given state s0 that is


visited infinitely often, is ergodic.
• Finite, irreducible and aperiodic CMTC are ergodic.

• Only ergodic systems will be considered in this course


18
Ergodicity

• A non ergodic system : X(t) = reward of the state at time t


1
2 3 unit reward
1 1
1 1

1 unit reward
4 5
2

E  X     does not exist


1
T
1/ 2, with proba 0.5
lim X  t  dt  
T  T 
t 0 1, with proba 0.5
19
Little's law

20
Some transient performances

THe(T) THs(T)
L(T)

W(T)
• A(T) : number of customers arrived from 0 to T
• D(T) : number of departures between 0 to T
• THe(T) = A(T)/T : average arrival rate between 0 to T
• THs(T) = D(T)/T : average departure rate between 0 to T
• L(T) : average number of customers between 0 to T
• Wk: sojourn time of k-th customer in the system
• 1  
AT
W T   
A T  k 1
Wk average sojourn time between 0 to T
21
Stability of the queueing system

THe(T) THs(T)
Queueing
system

Definition : A queueing system is said stable if the number of


customers in the system remains finite.

Implication of the stability:


lim TH e T   lim TH s T 
T  T 

D T 
lim 1
T  A T 
22
Little's law

For a stable and ergodic queueing system,

L = TH×W

where
• L : average number of customers in the system
• W : average response time
• TH : average throughput rate

Queueing system
TH TH
L

W 23
Proof

Nb in system
A1 A2 A3 A4 A5 A6
W1
W2
W3
W4

e(T)

0 Time
D1 D2 T D3 D4

24
Proof

 1 AT    D T    D T   1 A T 

R T  TH T   
   Rk     
 

 T  Rk 
 A T k 1  T   A T  k 1 
AT  A T   
AT
1 1 1
  1 k still there at t  dt   rk T 
T

T k 1
Rk 
T k 1
t 0 T k  AT   N T  1
1
 Q T   e T 
T
where N(T) is the number of customers at time T, e(T) total
remaining system time of customers present at time T.

Letting T go to infinity, the stability implies the proof.


25
Single stage queueing systems

26
M/M/1 queue

N(t) : number of customers


in the system

l
Poisson
arrivals
Exponentially
distributed service tim

27
Stability condition of M/M/1 queue

The M/M/1 queue is stable iff


l<m
or equivalently
r<1
where
• r  l/m is called the traffic ratio or traffic intensity.

The number of customers in the system is unlimited and hence


there is no steady state when the system is not stable.

28
Markov chain of the M/M/1 queue

When the system is stable, stationary probability


distribution exists as the CTMC is irreducible.

Let
 n  lim P N t   n, n  0
t 

29
Steady state distribution of M/M/1 queue

state 0 : 1m   0 l

state 0-1:  2 m   1l

Balance equations 
state 0-1-...-n:  n 1 m   n l



Normalization equations:   n  1
n=0

With r  l/m,
0  1  r
n = rn 0
30
Performance measures of M/M/1 queue
(online proof and figures)

Ls/N = Number of customers in the system = r/1r) = l/(ml)


Ws/T = Sojourn time in the system = 1/1r)m = 1/(ml)
Lq/Q = queue length = l2/(ml)m  Ls  r
Wq/W = average waiting time in the queue = l/(ml)m  Ws  1/m
TH = departure rate = l
Server utilization ratio = r
Server idle ratio = P0 = 1 - r
P{n > k} = Probability of more than k customers = rk+1

31
M/M/C queue

Exponentially distributed
service tim

l
Poisson
N(t) : number of customers
arrivals
in the system

N(t) is a birth and death process with


• The birth rate l.
• The death rate is not constant and is equal to N(t)m if N(t)
 C and Cm if N(t) > C.
Stability condition : l< cm.

32
Steady state distribution of M/M/C queue
Distribution :
r l/m
n = rn/n! 0,  0 < n  C
n
r
 n C     C , n  0
C
1
 C 1 r n rC 
0     
 n 0 n! C !1  r C  
 

m m m m

0 1 2 3

l l l l

Markov chain of M/M/2 queue


33
Performance mesures of M/M/C queue

Ls = Number of customers in the system


= Lq + r

Ws = Sojourn time in the system


= Wq + 1/m

Lq = Average queue length


=
r C
C
1  r C 
¨2

Wq = Average waiting time


= Lq / l

 = Average number of busy server,  = r

U = Waiting probability
= C + C+1 + ...
= C/(1-r/C)
34
M/M/C with impatient customers i.e. M/M/C/C

• Similar to M/M/C queue except the loss of customers


which arrive when all servers are busy.

m m

0 1 2

l l

Markov chain of M/M/2 queue with


impatient customers

35
M/M/C with impatient customers i.e. M/M/C/C
Steady state distribution :
r  l/m
Pn = rn/n! P0,  0 < n  C
1
 C rn 
P0    
 n  0 n! 
 

Percentage of lost customers = PC

Server utilization ratio = (1 – PC) l/Cm

Insensitivity of Erlang Loss system M/GI/C without queue


(see Gross & Harris or S. Ross, proof by reserved system) :
Pn depends on the distribution of service time T only through its
mean, i.e. with m = E[T]
36
M/G/1 queue

Service time Ts
Poisson arrival

37
M/G/1 queue

As the service time is generally distributed, the departure of a


customer depar depends on the time it has been served.

The stochastic process N(t) is not a Markov chain.

38
M/G/1 queue: an embeded Markov chain

• Consider the stochastic process {Xk}k≥1 , the number of


customers after the departure of the k-th customer at tk

4 arrivals

{Xk}k≥1 is a CTMC and Xk+1 = (Xk -1)+ + number of


customers arrived during the service of the (k+1)-th customer.

Distribution of {Xk} is also the steady state distribution.


39
M/G/1 queue: Pollaczek-Khinchin formula

• Pollaczek-Khinchin formula or PK formula


r r2
Ls 
1 r

2 1  r 
 cv 2
 1

• From the PK formula, other performance measures such as


Ws, Lq, Wq can be easily derived.

• From PK formula, we observe that randomness always hurt


the performances of a system. The larger the randomness
(i.e. larger cv2), the longer the queue length is.

40
G/G/1 queue

• Inter-arrival times An between customer n and n+1 :


E[An] = 1/l
 A2  Var  An 

• Service time Tn of customer n :


E[Tn] = 1/m
 T2  Var Tn 

• Waiting time Wn in the queue of customer n (Lindley equation)

Wn+1 = max{0, Wn + Tn - An}

41
G/G/1 queue

• Bounds of Waiting time


1
l T2   2  r  l  A2   T2 
m
 E W  
2 1  r  2 1  r 

• If E[A - t | A > t] < 1/l, then


l  A2   T2  1  r l  A2   T2 
  E W   tightless check with Lq
2 1  r  2l 2 1  r 

• Waiting time approximation (Kingman's equation or VUT equation)

E W  
  2
A   T   r
2
 1
 
2  1  r  m
Varability Utilization Time
42
Queueing networks

43
Definition of queueing networks

A queueing network is a system composed of several


interconnected stations, each with a queue.

Customers, upon the completion of their service at a station,


moves to antoher station for additional service or leave the
system according some routing rules (deterministic or
probabilitic).

44
Example of deterministic routing

Shortest queue rule

45
Open network or closed network

Open network

N customers

Closed network 46
Multi-class network

47
A production line

Raw Finished
parts parts

48
Open Jackson Network

An open Jackson network (1957) is characterized by:


• One single class of customers
• A Poisson arrival process at rate l equivalent to independent external
Poisson arrival at each station)
• One server at each station
• Exponentially distributed service time with rate mi at station i
• Unlimited capacity at each queue
• FIFO service discipline at all queues
• Probabilistic routing

49
Open Jackson Network
routing

• pij (i ≠0 and j≠ 0) : probability of moving to station j after


service at station i
• p0i : probability of an arriving customer joining station i
• pi0 : probability of a customer leaving the system after service
at station i

50
Open Jackson Network
stability condition

• Let li be the customer arrival rate at station i, for i = 1, ..., M


where M is the number of stations.
• The system is stable if all stations are stable, i.e.
li < mi, i = 1, ..., M

• Consider also ei the average number of visits to station i for


each arriving customer:
ei = li/l

51
Open Jackson Network
arrival rate at each station

• These arrival rates can be determine by the following system


of flow balance equations which has a unique solution.

Example: ???

52
Open Jackson Network
Are arrivals to stations Poisson?

as the departure
process of
M/M/1 queue
is Poisson.

Feedback
keeps
memory.

53
Open Jackson Network
State of the queueing network

• Let n(t) = (n1(t), n2(t), …, nM(t)), where ni(t) is the number of


customers at station i at time t
• The vector n(i) describes entirely the state of the Jackson
network
• {n(t)}t≥0 is a CTMC
• Let (n) be the stationary probability of being in state n
• Notation: ei = (0, …, 0, 1, 0, …, 0)

i-th position

54
Open Jackson Network
Underlying Markov Chain

Attention: Some transitions are not


possible when ni = 0, for some i
55
Open Jackson Network
Stationary distribution - Product form solution

Theorem: The stationary distribution of a Jackson queueing


network has the following product form :
M
  n     i  ni 
i 1

where i(ni) is the stationary distribution of a M/M/1 queue


with arrival rate li and service rate mi, i.e.
li
 i  ni   r 1  ri  , ri 
ni

mi
i

56
Open Jackson Network
Performance measures

TH i  li
ri
Performance measures Lsi 
of each M/M/1 queue 1  ri
ri
Wsi 
mi 1  ri 

TH  l
M

of the queueing network



Performance measures Ls  Ls
i 1
i

M
Ls
Ws   ei  Wsi 
i 1 TH
57
Open Jackson Network
Extension to multi-server stations

• Assume that each station i has Ci servers


• The stability condition is
li < Cimi, i = 1, …, M
• The stationary probability distribution still has the
product form:
M
  n     i  ni 
i 1

where i(ni) is the stationary distribution of a M/M/Ci


queue with arrival rate li and service rate mi.

58
Open Jackson Network
Proof of the product form solution

Reversed Markov chain of a Markov chain is obtained by looking back in


time.
Transition rates m*ij are defined such that
im*ij = jmji
where mij and i are transition rates and stationary distribution of the original
CTMC.
From the balance eq, Sj m*ij = Sj mij (same state sojourn time)
Theorem of reversed CTMC: For an irreducible CTMC, if we can find a
collection of numbers m*ij and a collection of numbers xi ≥ 0 summing to
unity such that
xim*ij = xjmji and Sj m*ij = Sj mij
then m*ij are the transition rates of the reversed chain and xi are the steady
state probabilities for both chains. (Home work) 59
Open Jackson Network
Proof of the product form solution

Guessed Reversed Markov chain of the Jackson network :


a Jackson network with
(1) arrival rate at station i including 0 : l*i = li
(2) prob. of joining station j after service at i : l*ip*ij = ljpji or p*ij = ljpji/li
(3) service rate at station i : m*i = mi

Guessed Probability distribution to prove :


M
x  n    xi  ni 
i 1
li
xi  ni   r 1  ri  , ri 
ni
i
mi
60
Open Jackson Network
Proof of the product form solution

Checking conditions of the reversed CTMC theorem


1/ Same sojourn time at the same state at any state n
Trivial as l*0 = l0 and m*i = mi ;
2/ xnm*n,n' = xn'mn',n for all couple of states n, n'.
Case n = (n1, ..., ni, …, nM) and n' = (n1, ..., ni+1, …, nM)
m*n,n' = l*0p*0i = lipi0; mn',n = mipi0
Case n = (n1, ..., ni, …, , nj, ..., nM) and n' = (n1, ..., ni+1, …, , nj-1, ..., nM)
m*n,n' = m*jp*ji = mjlipij/lj; mn',n = mipij
Case n = (n1, ..., ni, …, nM) and n' = (n1, ..., ni-1, …, nM)
m*n,n' = m*ip*i0 = milp0i/li; mn',n = lp0i

Hence, x(n) is the distribution of the Jackson network.


61
Closed Queuing Network
Definition

• Similar to Jackson network but


• with a finite population of N customers
• without extern arrivals.

As a result,
• l=0
M
• p
j 1
ij  1, i  1,..., M

•  n t   N , t  0
i 1
i

62
Closed Queuing Network
Arrival rates

• The arrival rates li satisfy the following flow balance


equations
M
li   l j pij , i  1,..., M
j 1

• Unfortunately, the above system of flow balance


equations has one free variable.

63
Closed Queuing Network
Product form solution
Product form solution of Gordon and Newell (1967)
1
  n1 , n2 ,..., nM   r1n1 r 2n2 ...r MnM
where CN

• ri = li/mi with li obtained from the solution of the flow


balance equations with a free constant chosen arbitrarily
• C(N) is a normalizing constant such that the sum of
probability equals 1, i.e.
1

C  N  n1 ,..., nM
r1 r
n1 n2
2 ...r M 1
nM

Direct computation of C(N) is very tedious when the state


space is large. 64
Closed Queuing Network
Computation of the normalization constant C(N)

Buzen's algorithm (1973) uses relations (home work)


Ci(k) = Ci-1(k) + riCi(k-1), i=2, ..., M, k = 2, ..., N
where
Ci  k   
n1 ... ni  k
r1n r2n ...rin
1 2 i

with initial conditions


C1(k) = (r1)k, Ci(1) = 1
from which C(N) is obtained as
C(N) = CM(N)

65
Closed Queuing Network
Computation of the normalization constant C(N)

It can be shown that the utilization of station i is given by


C  N  1
1   i  0   ri
CN
The marginal distribution can be determined as follows
(home work):
rik
P ni  k   C  N  k   ri C  N  k  1 
CN
N CN  k
E  ni    r k

CN
i
k 1

66
Closed Queuing Network
Mean Value Analysis (MVA)
• Suppose we are only interested in throughput THi and mean number of
customers at station i Li (i.e. Lsi)and mean system time Wi (i.e. Wsi)
• The MVA method of Reiser and Lavenberg (1980) bypasses te
computation of C(N).
• It relies on the following simple relations :
1 1
Wi   Li
mi mi
TH i  aN li
where
Wi is the average system time experienced by a customer arriving at i
Li is the average queue length seen by a customer arriving at i
li is any solution of the flow balance equation
aN is the missing factor.
67
Closed Queuing Network
Mean Value Analysis (MVA)
• It can be shown that Li is the same as the average queue length at i in a
network with (N-1) customers.
• Let Li(N), THi(N), Wi(N) be the queue length, the throughput and the
system time of a network with N customers.
• The following system can be iteratively solved to obtain the results:
Wi  N   1  Li  N  1  , i  1,..., M , N
1
1
mi
(2) Li  0   0, i  1,..., M
N
(3) N   Li  N , N
i 1

(4) Li  N    li aN Wi  N  , i  1,..., M , N


where equation (4) is from Little's law for station i.

• At each iteration N = 1, 2, ..., (1) is used to determine Wi(N),


combination of (3) & (4) determines aN and THi(N), (4) gives Li(N). 68
Closed Queuing Network
Example

p m2
m1
1-p m3

p = 0.5, m1 = 4, m2 = 1, m3 = 2
N= 2, 3, 4

69

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy