Appendix A Figures - Northwestern University
Download
Report
Transcript Appendix A Figures - Northwestern University
Chapter 8
Queueing models
1
Delay and Queueing
Main source of delay
Transmission (e.g., n/R)
Propagation (e.g., d/c)
Retransmission (e.g., in ARQ)
Processing (e.g., running time of protocols)
Queueing
Queueing Theory
Study of mathematical queueing models
Since early 1900’s by Erlang
2
Queue
Message,
packet,
cell
arrivals
Lost or
blocked
Delay box:
Multiplexer
switch
network
Message,
packet,
cell
departures
T seconds
Customer
System
Service
3
Queueing Discipline
One customer at a time
First-in first-out (FIFO)
LIFO
Round robin
Priorities
Multiple customers at a time
FIFO
Separate queues/separate servers
Blocking rule
Discard when full
Drop randomly
Block a certain class
4
Definitions
T: Time spent in the system
A(t): # of arrivals in [0,t]
B(t): # of blocked customers in [0,t]
D(t): # of departures in [0,t]
N(t): # of customers in the system at t
N(t)=A(t)-D(t)-B(t)
Long term arrival rate
Throughput
Average number in the system
Fraction of blocked customers
5
Arrivals
n+1
A(t)
n
n-1
•••
2
1
0 1
2
t
n
3
n+1
Time of nth arrival = 1 + 2 + . . . + n
Arrival
Rate =
n arrivals
1 + 2 + . . . + n seconds
=
1
(1+2 +...+n)/n
1
E[]
6
Little’s Law
Little’s Law
If the system does not block customers, then
E{N} = λ E{T}
If the block rate is Pb, then
E{N} = (1-Pb) λ E{T}
Proof
7
Arrivals and Departures
A(t)
Assumes
first-in
first-out
T6
T1
Arrivals
Departures
T2
T3
T4
T7
T5
D(t)
C1 C2 C3 C4 C5
C1 C2 C3
C6
C4 C5
C7
C6
C7
8
Examples
Let the arrival rate be 100 packets/sec. If 10
packets are found in the queue in average,
then the average delay is 10/100=0.1 sec.
Traffic is bad in a rainy day.
For the same volume of customers, a fast
food restaurant requires smaller dining area.
9
Example
E{N} = λ E{T}
10
Basic Queueing Models
Servers
Arrival process
Queue
A(t)
2
i+1
t
B(t)
D(t)
t
i
1
c
X
Service time
11
Arrival Processes
Interarrival times 1, 2,…
Arrival rate =1/E{}
Statistics
Deterministic
Exponential interarrival times
Poisson arrival process
12
13
Service Processes
Service times X1, X2,…
Processing capacity =1/E{X}
14
Queueing System Classification
Arrival Process / Service Time / # of Servers / Max Occupancy
Interarrival times
M = exponential
D = deterministic
G = general
Arrival Rate:
= 1/E[]
Service times X
M = exponential
D = deterministic
G = general
Service Rate:
= 1/E[X]
1 server
c servers
infinite
K customers
unspecified if
unlimited
Multiplexer Models: M/M/1/K, M/M/1, M/G/1, M/D/1
Trunking Models: M/M/c/c, M/G/c/c
User Activity:
M/M/, M/G/
15
Queueing System Variables
N(t) = Nq(t) + Ns(t)
Ns(t)
Nq(t)
1
Pb
Ns(t) = number in service
2
W
Nq(t) = number in queue
(1 – Pb)
N(t) = number in system
T=W+X
c
T = total delay
X
W = waiting time
X = service time
E{N}
E{Nq}
E{Ns}
Traffic load
Utilization
16
The M/M/1/K Model
Poisson arrivals
rate
K – 1 buffer
Exponential service
time with rate
Average packet transmission time
E{X} = E{L}/R
Maximum service rate
=R/E{L}
P{1 arrival in Δt} = Δt + o(Δt)
17
M/M/1 Steady State Probabilities
1 - t
1 - (t
t
0
1 - (t
t
t
1 - (t
t
2
1
t
1 - (t
t
n
n-1
t
1 - (t
n+1
t
Average number of customers in the system?
Average delay?
Average wait time?
18
Example: Effect of Scale
m
separate
systems
One
versus consolidated
system
m
m
What is the average delay of the combined
system?
19
The M/G/1 Model
Similar to M/M/1 except that the service time X
may not be exponentially distributed.
Infinite buffer
= 1/E[X]
Poisson arrivals
rate
The average wait time:
2}
E
{
X
E{W }
2(1 )
20
Proof
Wi Ri
i 1
j iN
i
X
j
21
Erlang B Formula: M/M/c/c
N(t)
1
= (1–Pb)
Pb
2
Many
lines
Limited
number of
trunks
Poisson
arrivals
c
E[X]=1/
Blocked calls are cleared from the system; no waiting allowed.
Performance parameter: Pb = fraction of arrivals that are blocked
Pb = P[N(t)=c] = B(c,a) where a=
The Erlang B formula, valid for any service time distribution
B(c,a)
ac
c!
c
j=0
aj
j!
22
State Transition Diagram
1 - t
1 - (t
t
2
1
t
1 - ((c-1) t 1 - ct
t
t
0
1 - (2t
2t
c
c-1
c t
23