Professional Documents
Culture Documents
Carey Williamson
Department of Computer Science
University of Calgary
Fall 2017
Motivating Quote for Queueing Models
2
Outline: Queueing Models
3
Queueing Systems
Queueing models provide the analyst with a powerful tool for designing
and evaluating the performance of queueing systems
Typical measures of system performance:
— Server utilization, length of waiting lines, and delays of customers
— For relatively simple systems, compute results mathematically
— For realistic models of complex systems, simulation is usually required
4
Queueing Systems
5
Calling Population
6
System Capacity
7
Queue Behavior and Queue Discipline
8
Queueing Notation
9
Example: M/M/3/20/1500/FCFS
10
Common Distributions and Assumptions
11
Key Variables (1 of 3)
2
λ μ
m
nq ns
n
Time
w s
τ
r
12
Key Variables (2 of 3)
14
Outline
15
Fundamental Rules for All Queues
2. Server Utilization:
3. Mean Number of Busy Servers:
16
Fundamental Rules for All Queues (cont’d)
4. Occupancy:
If jobs are not lost due to insufficient capacity, then:
Similarly:
Mean number of jobs in the queue
= Arrival rate Mean waiting time
19
Little's Law
r2 r3
r1 r2 r3 r4
jtimes
Sum of response r is the total area under the curve
n
1 j
=
Thus, , or
Little’s Law 21
Application of Little's Law
Arrivals Departures
22
Example: I/O System Analysis
24
Outline
25
Stochastic Chains
Stochastic Process:
Collection of random variables indexed over time
27
Birth-Death Markov Chain
0 1 2 … j-1 j j+1
m1 m2 m3 mj j+1 j+2
State-transition diagram 29
Birth-Death Markov Chain
… n-1 n …
mn
30
Steady-State Probability Distribution
Normalizing Condition
31
Basic Solution Steps
Compute
mean arrival rate n0 n pn
Compute
E[n]
E[r ]
Use Little’s Law to obtain
32
Outline
33
M/M/1 Queue
0 1 2 … j-1 j j+1
m m m m
34
Results for M/M/1 Queue
35
Results for M/M/1 Queue (cont’d)
(geometric distribution!)
Utilization of the server
= Probability of having at least one job in the system
36
Results for M/M/1 Queue (cont’d)
37
Results for M/M/1 Queue (cont’d)
38
Effect of Server Utilization
40
Example: Router Design (cont’d)
42
M/M/1/K – Single Server, Finite Queuing Space
K
K
43
Analytic Results
State-transition diagram:
l l l l
0 1 … K-1 K
m m m m
Solution p n p0 ,
n
where
1
1
p0 n 0 n 1
K 1 K 1
1 1
K 1
44
M/M/m - Multiple Servers
45
Analytic Results
State-transition diagram:
l l l l l l
0 1 … m-1 m m+1
m 2m (m-1)m mm m m
Solution n 1
n 1 p0 nm
pn p0 j n!
j 0 j 1 1
p0 n
nm
m!m n m
46
M/M/ - Infinite Servers
47
Analytic Results
State-transition diagram:
l l l l l l
0 1 … j-1 j j+1
m 2m (j-1)m jm (j+1) (j+2)
1
Solution pn p0 n
n!
1
n 1
p0 n 0 e
n!
/ , p0 1
2 (1 2 2 ) 2 (1 2 2 )
E[ n ] , E[nq ]
2(1 ) 2(1 )
1 (1 / 2 2 ) (1 / 2 2 )
E[ r ] , E[ w]
2(1 ) 2(1 )
49
M/G/1 Queue
50
M/G/1 Queue Example
Example: Two workers are competing for a job. Alex claims to be faster
than Bo on average, but Bo claims to be more consistent.
— Poisson arrivals at rate per hour ( per minute).
— Alex: minutes and minutes2:
The proportion of arrivals who find Alex idle and thus experience no delay at all is .
— Bo: and :
The proportion of arrivals who find Bo idle and thus experience no delay at all is .
— Although working faster on average, Alex’s greater service variability results in
an average queue length about greater than Bo’s queue.
51
Effect of Utilization and Service Variability
For almost all queues, if lines are too long, they can be reduced by
decreasing server utilization () or by decreasing the service time
variability ()
— The larger is, the more variable is the distribution relative to its
expected value.
Pollaczek-Khinchin (PK) mean value formula:
2 (1 (CV ) 2 )
E[ n ]
2(1 ) 52
Effect of Utilization and Service Variability
53