Queueing Theory
Queueing Theory
PS #3 out this afternoon Due: October 19 (graded by 10/23) Office hours Odoni: Mon. 2:30-4:30
- Wed. 2:30-4:30 on Oct. 18 (No office hrs 10/16) _ Or send me a message
Quiz #1: October 25, open book, in class Old quiz problems and solutions:
posted on 10/19
Lecture Outline
Introduction to queueing systems Conceptual representation of queueing
Introduction to Queues Littles Law Markovian Birth-and-Death Queues The M/M/1 and Other Markovian Variations The M/G/1 Queue and Extensions Priority Queues Some Useful Bounds Congestion Pricing Queueing Networks; State Representations Dynamic Behavior of Queues
systems Codes for queueing models Terminology and notation Littles Law and basic relationships Birth-and-death models The M/M/1 queueing system
Reference: Chapter 4, pp. 182-203
Queues
Queueing theory is the branch of operations research
concerned with waiting lines (delays/congestion) A queueing system consists of a user source, a queue and a service facility with one or more identical parallel servers A queueing network is a set of interconnected queueing systems Fundamental parameters of a queueing system: - Demand rate - Capacity (service rate) - Demand inter-arrival times - Service times - Queue capacity and discipline (finite vs. infinite; FIFO/FCFS, SIRO, LIFO, priorities)
- Myriad details (feedback effects, balking,
jockeying, etc.)
C C C C C C C
C C CC CC
Arrivals process Size of user source Queue discipline and Queue capacity Service process Number of servers
Queueing system 2 Queueing system 1 Point where users make a choice Queueing system 4
In
Optimal cost
Optimal capacity
Airport Capacity
and simplification of reality Results give a sense of order of magnitude, changes relative to a baseline, promising directions in which to move Closed-form results essentially limited to steady state conditions and derived primarily (but not solely) for birth-and-death systems and phase systems Some useful bounds for more general systems at steady state Numerical solutions increasingly viable for dynamic systems
//
Distribution of interarrival time
CCCCCC
C C C C
S S S S
Service facility
Some standard code letters for A and B: _ M: Negative exponential (M stands for memoryless) _ D: Deterministic _ Ek:kth-order Erlang distribution _ G: General distribution
queueing system Number in queue or Queue length: number of customers waiting for service Total time in system and waiting time N(t) = number of customers in queueing system at time t Pn(t) = probability that N(t) is equal to n at time t n: mean arrival rate of new customers when N(t) = n n: mean (total) service rate when N(t) = n
of initial state of the system m: number of servers (parallel service channels) If n and the service rate per busy server are constants and , respectively, then n=, n= min (n, m); in that case:
_ Expected inter-arrival time = 1/
_ Expected service time = 1/
Littles Law
A(t): cumulative arrivals to the system C(t): cumulative service completions in the system
= arrival rate
= service rate per service channel
A(t)
Unknowns:
L = expected number of users in queueing system _ Lq = expected number of users in queue _ W = expected time in queueing system per user (W = E(w)) _ Wq = expected waiting time in queue per user (Wq = E(wq)) 4 unknowns We need 4 equations
_
N(t) C(t)
Time
LT = 0
N (t ) dt T
A(T ) 0 T A(T )
N (t ) dt
= T WT
L = W (Littles law) Lq = Wq W = Wq +
1
queue plus in service) arrivals are Poisson at rate of n per unit of time. 4. Whenever n users are in system, service completions are Poisson at rate of n per unit of time. 5. FCFS discipline (for now).
Time: t
nt
1-(n+ n)t
Time: t+t n+1 users Pn(t) = Prob [n users in system at time t] n users
(1)
n users
nt
(2)
n-1 users
Pn (t + t) = Pn +1 (t) n +1 t + Pn 1 (t) n 1 t + Pn (t) [1 ( n + n ) t]
The system of equations (1) and (2) is known as the Chapman-Kolmogorov equations for a birth-and-death system
system has reached steady state, i.e., t is large enough to have Pn (t) = Pn , independent of t, or dPn (t) = 0 dt
Then, (1) and (2) provide the state balance equations:
1
2
m-1
m
m
m+1
m+1
m+1
m+2
0 P0 = 1 P1 (n + n ) Pn = n 1 Pn 1 + n +1 Pn +1
from the state transition diagram
n=0
(3)
n = 1, 2, 3,.. (4)
We are interested in the characteristics of the system under equilibrium conditions (steady state), i.e., when the state probabilities Pn(t) are independent of t for large values of t Can write system balance equations and obtain closed form expressions for Pn, L, W, Lq, Wq
Solving..
Solving (3) and (4), we have:
P = 0 P0 ; P2 = 1 P = 1 0 P0 1 1 1 2 2 1
and, in general, ..... 1 0 P0 = K n P0 Pn = n 1 n 2 n n 1 ..... 2 1 But, we also have: Giving,
etc.
P0 = P ( + )P = P0 + P2 1 1
0 1
n-1 n
n+1
1=
n =0
Pn = P0 (1 + K n )
n =1
From point 2:
P0 = P 1
P1 = P2
1 2
Pn = Pn+1
n-1 n
P0 = 1+
1
n =1
Kn
n+1
Step 1:
P= 1
Step 2:
P
n=0
= 1, P0 = 1 P0 = n=0
d n d 1 = (1 ) = (1 ) d n=0 d 1
n
1
n=0
Step 3:
, then
P0 =
=
n=0
n=0
1 1 = (Q < 1) 1 1
1 = = (1 ) (1 ) 2 = (1 ) = 1 L 1 1 W= = =
1 Wq = W =
( )
Step 4:
n=0
= 1
n
and Pn = n (1 )
Lq = Wq =
2 = ( ) ( )
Expected delay
W =
n=0
(n +1)
Pn = E[
N +1
(2)
]=
E[N ] +1
L +1
(1)
L = W
Demand Capacity
L=
W =
=1
f w (w) = (1 ) e (1 ) w = ( )e ( )w for w 0
Thus, as already shown, W = 1/( -) = 1/[ (1-)] The standard deviation of N, w, Nq, wq are all proportional to 1/(1-), just like their expected values (L, W, Lq, Wq, respectively) The expected length of the busy period, E[B], is equal to 1/( -)
I B I B I
P0 =
But,
1 = 1
Therefore,
(1 )