download

Outline
204528
Queueing Theory and
Applications in Networks
z Overview
z Queueing
ดร. อนั นต ผ ลเพิ่ ม
z Queueing
Anan Phonphoem, Ph.D.
z Notation
[email protected]
http://www.cpe.ku.ac.th/~anan
Computer Engineering Department
Kasetsart University, Bangkok, Thailand
6/18/2003
z Basic
queueing system
2
6/18/2003
The Queue and I
Who like to wait?
z Real
z Customer
life situation
does not
z Entrepreneur does not like it either
Wait for buying lunch
– Wait for taking a ride in Disney World
– Wait for withdraw money from ATM
– Wait for a green light
– Wait for Bug 1113 to pick up our call
– Etc.
–
3
6/18/2003
Cost more money
– Cost more space for waiting
– Customers loss
– Unhappy customers
–
4
6/18/2003
So, why waiting?
Still Waiting …
z Demand
z Interesting
> Service available
z Why service is not enough?
6/18/2003
questions for customers?
How long do I need to wait?
How many people in the line?
– When should I come to get serve faster?
–
Not economic
– No space
– Unpredictable arrival
–
–
5
system
process characteristics
6
6/18/2003
1
Still Waiting …
Here comes …Queueing Theory
z Interesting
z Describe
questions for service
provider?
–
How big is the waiting area?
– How many customers leave?
– Should we add some more tellers?
– Should the system form 1 or 3 queues?
– Should the system provide a fast lane?
z Model
the system mathematically
z Try to answer those questions
–
7
6/18/2003
the queue phenomena
Waiting and serving
8
Queueing System
6/18/2003
General queueing system
z Arriving
for service
z Waiting for service
z Getting serve
z Leaving the system
Service
Facility
Queueing System
9
6/18/2003
10
Queueing process characteristics
Arrival pattern
z Arrival
z
pattern
z Service pattern
z Queue discipline
z System capacity
z Number of service channels
z Number of service stages
11
6/18/2003
6/18/2003
Stochastic
–
–
z
Probability distribution
Single or batch arrival
Behavior of customer
–
Patient customer
–
Impatient customer
z Wait
forever
z Wait
for a period and decide to leave
the long line and decide not to join
z Change the waiting line
z See
12
6/18/2003
2
Arrival pattern
Service pattern
z Is
z
Distribution for service time
Single or batch (parallel machine) service
z Service process depends on number of
customers waiting (state dependent)
z Very fast service Æ still have a line?
it time dependent?
Stationary arrival pattern (time
independent – probability distribution)
– Nonstationary arrival pattern
z
–
–
–
13
6/18/2003
14
6/18/2003
Queue discipline
System capacity
z Manner
z Finite
of customers to get serve
come, first serve
z Last come, first serve
z Random serve
z Priority serve
z First
–
–
–
capacity
Maximum system size
z Infinite
capacity
Preemptive
Nonpreemptive
15
6/18/2003
16
6/18/2003
Number of service channels
Stages of service
z Multiserver
z Single
–
–
17
Depends also on the arrival
May assume mutually independent
queueing system
stage
z Multiple stages
Single line service
Multiple line service
6/18/2003
Without feedback (Entrance Exam)
– With feedback (Manufacturing)
–
18
6/18/2003
3
Queueing Notation
z Kendall’s
Queueing Notation A/B/X/Y/Z
notation (1953)
A/B/X/Y/Z
Characteristics
A : Interarrival-time distribution
B : Service time distribution
X : # of parallel service channels
Y : System capacity
Z : Queue discipline
19
6/18/2003
Symbol
Explanation
A&B
(Interarrival /
Service Time)
M
D
Ek
G
Exponential (Memory less)
Deterministic
Erlang
General
X (# Servers)
1,2,…,∞
Y (Capacity)
Z (Q discipline)
20
1,2,…,∞
FCFS, PR
6/18/2003
Queueing Notation A/B/X/Y/Z
Queueing Notation A/B/X/Y/Z
z M/M/3/∞/FCFS
z M/D/1
–
–
–
–
–
Exponential interarrival time
Exponential service time
3 parallel servers
Unlimited space
First-come first-serve queue discipline
21
6/18/2003
–
–
–
–
–
Exponential interarrival time
Deterministic service time
1 server
(default) Unlimited space
(default) FCFS queue discipline
22
6/18/2003
Queueing Notation A/B/X/Y/Z
Basic queueing system
z M/M/1
z G/G/m
z M/M/c/k
–
z M/M/∞
–
Interarrival time with distribution A(t)
Service time with distribution B(x)
– m servers
z Ek/M/1
z M/G/1
z Cn:
z G/M/m
The nth customer enters system
z G/G/1
23
6/18/2003
24
6/18/2003
4
Basic queueing system
Basic queueing system
z τn:
z
z tn:
z
wn: waiting time in queue for Cn
sn: system time for Cn Î (wn + xn)
z λ : average arrival rate
z µ : average service rate
z ~
t = lim tn = 1λ
nÆ∞
~
1
z x = lim xn =
µ
xÆ∞
arrival time for Cn
Interarrival time (τn – τn-1)
z xn: service time for Cn
P[ tn ≤ t ] = A(t)
P[ xn ≤ x ] = B(x)
25
26
6/18/2003
Time diagram notation
Basic queueing system
sn+1
sn
Cn-1
xn
Cn
sn+2
xn+1
6/18/2003
Cn+1
xn+2
z
Cn+2
z
Servicer
–
wn+1
wn
τn
Queue
τn+1
τn+2
tn+1
–
Time Æ
wn+2 = 0
Cn
z
Cn+1
z
α(t)
z λt =
δ(t)
6
4
γ(t)
2
Time (t)
1
3
2
4
5
6
6
6/18/2003
5
λt : arrival rate
α(t)
t = # of arrival / time
z γ(t) : total time all customers spent in the system
(customer-seconds)
γ(t)
z Tt =
= system time / customer
α(t)
N(t)
8
6/18/2003
Basic queueing system
N(t) = α(t) – δ(t)
3
δ(t): # of departures in (0,t)
28
Basic queueing system
2
Î System idle
Î System busy
Cn+2
6/18/2003
1
U(t) = 0
U(t) > 0
z α(t): # of arrivals in (0,t)
tn+2
27
29
N(t): # of customers in the system @time t
U(t): Unfinished work @time t
4
30
6/18/2003
5
Basic queueing system
z
Nt =
Little’s Result
γ(t)
= avg.# customers in system
t
N = λT
= λtTt
z
As t Æ ∞
z λ = lim λt
z
The average number of customers in a
queueing system is equal to the arrival
rate of customers to that system, times
the average time spent in the system”
N = λT
tÆ∞
T = lim Tt
tÆ∞
31
32
6/18/2003
Little’s Result
6/18/2003
Little’s Result
Nq = λW
Ns = λx
z
Nq : avg.# customers in queue
z
Ns : avg.# customers in service fac.
z
λ : arrival rate
W : avg. time spent in the queue
z
λ : arrival rate
x : avg. time spent in the service fac.
z
33
z
34
6/18/2003
6/18/2003
Basic queueing system
z
T=W+x
ρ : Utilization factor
: rate of work / rate of max. capacity
z ρ = λx
; for a single server
z
35
z
ρ = λmx
z
for G/G/1 to be stable:
; for m servers
0≤ρ<1
6/18/2003
6