Professional Documents
Culture Documents
Lecture 14 - Queuing Systems
Lecture 14 - Queuing Systems
Systems
Topics
Basic structure and components
Performance measures
Steady-state analysis and Littles law
Birth-death processes
Single-server and multi-server examples
Flow balance equations
Input
source
Arriving
customers
Queue
Service
mechanism
Exiting
customers
Note
1. Customers need not be people; other possibilities
include parts, vehicles, machines, jobs.
2. Queue might not be a physical line; other
possibilities include customers on hold, jobs waiting
to be printed, planes circling airport.
Components of Model
Input Source The size of the calling population
may be modeled as infinite or finite.
Calculations are easier in the infinite case and
in many cases this is a reasonable approximation
(bank, pizza parlor, blood bank).
Queuing Discipline First-come first-served (FCFC or
FIFO) is the most frequent assumption, but
priority ordering is important in some settings.
Service Mechanism One or more servers may be
placed in parallel.
Queuing Applications
System
Arrival Process
Service Process
Bank
Customers Arrive
Pizza
parlor
Blood
bank
Patients use up
pints of blood
Shipyard
Printers
Documents are
printed
= # of parallel servers
Littles Law
For any queuing system that has a steady state
and has an average arrival rate of ,
L = W
For example, if the average waiting time is 2 hours
and customers arrive at a rate of 3 per hour then,
on average, there are 6 customers in the system.
Similarly,
Lq = Wq
1
2
Flow into k
0
= ,
1
1
1
10
1
= + = =
2
2
2
2 1
k k 1 L 0
. . . k
0
k k 1 L 1
=0
k k 1 L 0
Let Ck
, k 1,... and let C0 1
k k 1 L 1
Thus k = Ck0 , k = 1, 2, . . . and kk = 1
so (C0 + C1 + C2 + )0 = 1 or 0 = 1 / (1 + k Ck)
Lq = k=s+
(ks)k = expected # of customers in queue
1
= k=0
kk = average (effective) arrival rate
E = Ls / s = efficiency of system (utilization)
Component
Probability
0.102
&
Expectedwaitingtimeinthesystem
Wq = Lq /
Expectedwaitingtimeinthequeue
= (0 + 1 + 2 + 3 + 4 + 5)
= (1 6) = 5(1 0.102) = 4.488 / hour
Consequently,
Ws = Ls / = 0.5 hours
Wq = Lq / = 0.156 hours
W = L / = 0.656 hours
M/M/1 Queue
M /M /1
arrivalservice #of
processprocessservers
M stands for Markovian, meaning
exponential inter-arrival & exponential service times.
. . . so, k = , k = 0,1,
k = , k = 1,2,
k 1 L 0
Thus Ck
k
k L 1
where =
Utilization factor or
traffic intensity
1
Recall x
provided x 1
1 x
k 0
k
Now k Ck 0 , where 0 1/ k 0 Ck
1
k
Ck
1
k 0
k 0
k 0
provided1, i.e.,
Thus,0 =1andk=k(1).
L=
provided
Lq = L (1 0) =
1
W =L
and
1
W=
and Wq =
Evaluating Performance
1. Model the system as a birth-and-death process.
2. Develop the balance equations.
3. Calculate the steady-state distribution k .
4. Calculate and interpret L, Lq, W, Wq .
5. What is the proportion of time the repairman is
busy ?
6. What is the proportion of time that a given
machine, e.g., machine #1, is working ?
State-Transition Diagram
= rate at which a single machine breaks down
= 1/10 hr
= rate at which machines are repaired
= 1/8 hr
State of the system = # of broken machines.
2
Rate network:
2
2
1 = 2
state 0
state 1
state 2
normalize
0+ balance
1+ 2
We can solve these
equations for 0, 1 and 2,
but in this case, we can simply use the formulas
for general birth-and-death processes:
Ck =
k-10
k 1
k = Ck0 and 0 = 1 / Ck
k=0
Here,
0 = 2
1 =
1 =
2 =
2 = 0
0 2
10 2 2
C1
, C2
2 , and C0 1 (by definition). Thus
1
2 1
1
2
0
0.258, 1
0 0.412
2
2 2
1
2
2 2
2 2 0 0.330
1
1
L
(1.072)
0.0928
= 11.55 hours
Averageamountoftime
thatamachinehastowait
toberepaired,including
thetimeuntiltherepairman
initiatesthework.
= (2)0 + 1 = 0.0928
1
1
Wq
Lq
(0.33)
0.0928
= 3.56 hours
Averageamountoftimethata
machinehastowaituntilthe
repairmaninitiatesthework.
A
Queue Station
Entity Arrival Rate
Service Rate/Channel
Number of Servers
Max. Number in System
Number in Population
Type
Mean Number at Station
Mean Time at Station
Mean Number in Queue
Mean Time in Queue
Mean Number in Service
Mean Time in Service
Throughput Rate
Efficiency
Probability All Servers Idle
Prob. All Servers Busy
Prob. System Full
Critical Wait Time
P(Wait >= Critical Wait)
P(0)
P(1)
P(2)
B
M_M_1_2_2
0.100000001
0.125
1
***
2
M/M/1/2/2
1.072164893
11.55555534
0.329896897
3.555555582
0.742268026
8
0.092783503
0.742268026
0.257731944
0.742268085
0.329896897
1
0.392220885
0.257731944
0.412371117
0.329896899
1
2
M/M/s Queue
Measure
Formula
( s )n
(s )s
n ! s !(1 )
n0
s 1
(s ) n 0
n!
n, 1 n s
n , n s
s ns =
s s n 0
s!
s/(1)
PB
s
Lq
ss s 1 0
=
s!(1 )2
(1 )2
Ls
s =
Pr{Tq = 0}
(s ) s 0
n = 1 s!(1 )
n0
Pr{Tq > t}
s 1
for t 0
Lq
6.821
2.247
0.951
Wq
0.682
0.225
0.0.95
0.909
0.833
0.767
Pr{ Tq = 0 }
0.318
0.551
0.715
Pr{ Tq > 1 }
0.251
0.061
0.014
Number of servers: s = 1
Maximum number in system: K = 4
Size of calling population: N =
Arrival rate: = 1.5/min
Service rate: = 2/min
Utilization: = /= 0.75
Model: M/M/1/4
M/M/1/K Queue,
K 1
1
Measure
M /M /1/ K
M /M /1
1
1 K 1
,1 n K
n
n
0
n
0
(1 K )
P
B
Lq
1 K
2 [( K 1 ) K K K 1 1 ]
(1 )(1 K 1 )
(1 )
K
L s
( K 1) K 1
1
K 1
2
1
(1 )
K
(1 )
K
A
B
Queue Station
M_M_1_4
Arrival Rate
1.5
Service Rate/Channel
2
Number of Servers
1
Max. Number in System
4
Number in Population
***
Type
M/M/1/4
Mean Number at Station 1.444302
Mean Time at Station
1.074286
Mean Number in Queue 0.772087
Mean Time in Queue
0.574286
Mean Number in Service 0.672215
Mean Time in Service
0.5
Throughput Rate
1.34443
Efficiency
0.672215
Probability All Servers Idle 0.327785
Prob. All Servers Busy
0.672215
Prob. System Full
0.103713
Critical Wait Time
1
P(Wait >= Critical Wait)
0.225043
P(0)
0.327785
P(1)
0.245839
P(2)
0.184379
P(3)
0.138284
P(4)
0.103713
= 1.5/min, = 2/min
= /= 0.75
K=4
Steady state probabilities (see page 566 in text)