kendall's notation
TRANSCRIPT
1
Copyright 2002, Sanjay K. Bose 1
Basic Queueing Theory
M/M/-/- Type Queues
Copyright 2002, Sanjay K. Bose 2
Kendall’s Notation for Queues
A/B/C/D/E
Shorthand notation where A, B, C, D, E describe the queue
Applicable to a large number of simple queueing scenarios
2
Copyright 2002, Sanjay K. Bose 3
Kendall’s Notation for Queues A/B/C/D/E
A Inter-arrival time distribution
B Service time distribution
C Number of servers
D Maximum number of jobs that can be there in thesystem (waiting and in service)
Default ∞ for infinite number of waiting positions
E Queueing Discipline (FCFS, LCFS, SIRO etc.)
Default is FCFS
M exponentialD deterministicEk Erlangian (order k)G general
M/M/1 or M/M/1/∞ Single server queue with Poisson arrivals,exponentially distributed service times and infinite number ofwaiting positions
Copyright 2002, Sanjay K. Bose 4
Little’s Result
N=λW (2.9)
Nq=λWq (2.10)
Result holds in general for virtually all types of queueingsituations where
λ = Mean arrival rate of jobs that actually enter the system
Jobs blocked and refused entry into the system will not becounted in λ
3
Copyright 2002, Sanjay K. Bose 5
Time t
Num
ber
of c
usto
mer
s(a
rriv
als/
depa
rtur
es)
α(t), Arrivals in (0,t)
β(t), Departures in (0,t)
N(t
increments byone
Graphical Illustration/Verification of Little's Result
Little’s Result
Copyright 2002, Sanjay K. Bose 6
Little’s Result
Consider the time interval (0,t) where t is large, i.e. t→∞
∫ −t
dttt0
)]()([ βαArea(t) = area between α(t) and β(t) at time t =
Average Time W spent in system =)(
)(lim
t
tAreat α∞→
Average Number N in system =)(
)()(lim
)(lim
t
tArea
t
t
t
tAreatt α
α∞→∞→ =
Therefore, N= λWt
tt
)(lim
αλ ∞→=Since,
4
Copyright 2002, Sanjay K. Bose 7
The PASTAProperty
“Poisson Arrivals See Time Averages”
pk(t) =P{system is in state k at time t }
qk(t) =P{an arrival at time t finds the system in state k}
N(t) be the actual number in the system at time t
A(t, t+∆t) be the event of an arrival in the time interval (t, t+∆t)
{ }{ } { }
{ } )(,(
)(|)(|,(lim
,(|)(lim)(
0
0
tptttAP
ktNPktNtttAP
tttAktNPtq
kt
tk
=∆+
==∆+=
∆+==
→∆
→∆Then
because P{A(t, t+∆t)|N(t) = k} = P{A(t, t+∆t)}
Copyright 2002, Sanjay K. Bose 8
Equilibrium Solutions for M/M/-/- Queues
Method 1: Obtain the differential-difference equations as in Section 1.2or Section 2.2. Solve these under equilibrium conditions along with thenormalization condition.
Method 2: Directly write the flow balance equations for proper choiceof closed boundaries as illustrated in Section 2.2 and solve these alongwith the normalization condition.
Method 3: Identify the parameters of the birth-death Markov chain forthe queue and directly use equations (2.7) and (2.8) as given in Section2.2.
In the following, we have used this approach
5
Copyright 2002, Sanjay K. Bose 9
M/M/1 (or M/M/1/∞∞ ) Queue
,.......3,2,1
00
==
==
∀=
k
k
k
k
k
µ
µ
λλk
k
k ppp ρµλ
00 =
=
)1(0 ρ−=p
For ρ <1
ρρ
ρρ−
=−== ∑∑∞
=
∞
= 1)1(
00 i
i
ii iipN
)1(
1
ρµλ −==
NW
UsingLittle’sResult
)1(
1
ρµρ
µ −=−= WWq
)1(
2
ρρ
λ−
== qq WNUsingLittle’sResult
Copyright 2002, Sanjay K. Bose 10
M/M/1/∞∞ Queue with Discouraged Arrivals
,.......3,2,1
00
1
==
==
∀+
=
k
k
kk
k
k
µ
µ
λλ
For ρ = λ/µ < ∞
∏−
=
=
+=
1
000 !
1
)1(
k
i
k
k kp
ipp
µλ
µλ
)exp(0 µλ
−=p
(2.14)
(2.15)
µλ
== ∑∞
=0kkkpN ∑
∞
=
−−==
0
)exp(1k
kkeff pµλ
µλλ
Effective ArrivalRate
−−
==)exp(12
µλ
µ
λλeff
NW Little’s
Result
6
Copyright 2002, Sanjay K. Bose 11
M/M/1/∞ Queue with Discouraged Arrivals
In this case, PASTA is not applicable as the overall arrival process isnot Poisson
πr = P{arriving customer sees r in system (before joining the system)}∆E be the event of an arrival in (t, t+∆t)Ei is the event of the system being in state i
∑∞
=
∆
∆=
∆∆
=∆=
0
}|{}{
}|{}{
}{
}|{}{}|{
iii
rrrrrr
EEPEP
EEPEP
EP
EEPEPEEPπ
!
1}{ /
iepEP
i
ii
== −
µλµλ
1}|{
+∆
=∆i
tEEP i
λ
−+
= −
−+
µλ
µλ
µλ
π/
/1
1)!1(
1
e
e
r
r
r ∑∞
=−−
=+
=0
/2 )1(
1
kk
e
kW µλµ
λπ
µ
Copyright 2002, Sanjay K. Bose 12
M/M/m/∞∞ Queue (m servers, infinite number of waitingpositions)
kk ∀= λλmkm
mkkk
≥=
−≤≤=
µ
µµ )1(0
For ρ = λ/µ < m
mkformm
p
mkfork
pp
mk
k
k
k
>=
≤=
−!
!
0
0
ρ
ρ
11
00 )(!!
−−
=
−+= ∑
m
k
mk
mm
m
kp
ρρρ
(2.16)
(2.17)
∑∞
= −==
mk
m
k mm
mpmCp
)(!),( 0 ρ
ρρ (2.18)P{queueing} =
Erlang’sC-Formula
7
Copyright 2002, Sanjay K. Bose 13
M/M/m/m Queue (m server loss system, no waiting)
)(0 ConditionLossorBlockingotherwise
mkk
=
<= λλ
otherwise
mkkk
0
0
=≤≤= µµ
otherwise
mkfork
ppk
k
0!0
=
≤=ρ
∑=
=m
k
k
k
p
0
0
!
1
ρ
(2.19)
(2.20)
For
∞<=µλ
ρ
Copyright 2002, Sanjay K. Bose 14
M/M/m/m Queue (m server loss system, no waiting)
Simple model for a telephone exchange where a line is given onlyif one is available; otherwise the call is lost
Blocking Probability B(m,ρ) = P{an arrival finds all servers busyand leaves without service}
!),( 0 m
pmBmρ
ρ = Erlang’s B-Formula (2.21)
1),0( =ρB
m
mBm
mB
mB),1(
1
),1(
),(ρρ
ρρ
ρ−
+
−
= (2.22)
8
Copyright 2002, Sanjay K. Bose 15
M/M/1/K Queue (single server queue with K-1 waitingpositions)
)(0 ConditionLossorBlockingotherwise
Kkk
=
<= λλ
otherwise
Kkk
0=
≤= µµ
otherwise
Kkforpp kk
00
=≤= ρ
)1(
)1(10 +−
−=
Kp
ρρ
(2.23)
(2.24)
For
∞<=µλ
ρ
Copyright 2002, Sanjay K. Bose 16
M/M/1/-/K Queue (single server, infinite number ofwaiting positions, finite customer population K)
otherwise
Kkk
0=
≤= µµ
)(0
)(
ConditionLossorBlockingotherwise
KkkKk
=
<−= λλ
(2.25)
(2.26)
)!(
!0 kK
Kpp k
k −= ρ
∑= −
=K
k
k
kK
Kp
0
0
)!(
!
1
ρ
k=1,.….,KFor
∞<=µλ
ρ
9
Copyright 2002, Sanjay K. Bose 17
Delay Analysis for a FCFS M/M/1/∞∞ Queue(Section 2.6.1)
Q: Queueing Delay (not counting service time for an arrival
pdf fQ(t), cdf FQ(t), LQ(s) = LT(fQ(t)}
W: Total Delay ( waiting time and service time) for an arrival
pdf fW(t), cdf FW(t), LW(s) = LT(fW(t)}
W=Q+T
T: Service Timet
T etf µµ −=)( tT etF µ−=)(
)()(
µµ+
=s
sLT
Knowing the distribution of either W or Q, the distribution of theother may be found
SinceQ ⊥ T
][*)()()()(
)( tQWQW etftfsL
ssL µµ
µµ −=+
= (2.30)
Copyright 2002, Sanjay K. Bose 18
For a particular arrival of interest -
FQ(t) = P{queueing delay ≤ t} = P{queueing time=0} + [Σn≥1 P{queueing time≤ t | arrival found
n jobs in system}]pn
)1()1()1()1(
)!1(
)()1()1(
)!1(
)()1()1()(
)1()1(
0
1
1
0
1 0
1
ρµρµ
µ
µ
ρρµρρρ
ρµµρρρ
µµρρρ
−−−−
∞
=
−−
∞
= =
−−
−+−=−+−=
−−+−=
−−+−=
∫
∑∫
∑ ∫
txt
n
nx
t
n
t
x
xn
nQ
edxe
dxn
xe
dxen
xtF
Erlang-n distribution forsum of n exponential r.v.s
(2.31)
)1()1()1)(()(
)( ρµρλρδ −−−+−== tQQ et
dt
tdFtf (2.32)
tt
xxttW edxeeetf )(
0
))(1( )()1()1()( λµµρµµ λµµρλµρ −−−−−−− −=−+−= ∫
10
Copyright 2002, Sanjay K. Bose 19
Departure ofcustomer of
interest
Arrival ofcustomerof interest
Arrivals coming while thecustomer of interest is in the
system
Time spent in system by thecustomer of interest
Arrival/Departure of Customer/Job ofInterest from a FCFS M/M/1Queue
• PASTA applicable to thisqueue
• N and NQ seen by an arrivalsame as the time-averagedvalues
Let
N* = Number in the system that a job will see left behind when it departs
pn*=P{N*=n} for N*=0, 1,....,∞
Copyright 2002, Sanjay K. Bose 20
Departure ofcustomer of
interest
Arrival ofcustomerof interest
Arrivals coming while thecustomer of interest is in the
system
Time spent in system by thecustomer of interest
For a FCFS queue, number leftbehind by a job will be equalto the number arriving while itis in the system.
∫
∑ ∫∑∞
−−
∞
=
−∞
=
∞
=
−==
==
0
)1(
0 00
**
)()(
)(!
)()(
zLdttfe
dttfen
tzpzzG
WWzt
nW
t
t
nn
nn
n
λλ
λ
λ
λ
Wds
sdL
dz
zdGNE
s
W
z
λλ =−==== 01
** )()(}{
(2.36)
(2.37)
11
Copyright 2002, Sanjay K. Bose 21
An important general observation can also be made along the linesof Eq. (2.36).
Consider the number arriving from a Poisson process with rate λin a random time interval T where LT(s)=LT{fT(t)}. The generatingfunction G(z) of this will be given by
)()( zLzG T λλ −=
and the mean number will be E{N}= λ E{T}
This result will be found to be useful in various places in oursubsequent analysis.
Copyright 2002, Sanjay K. Bose 22
Delay Analysis for the FCFS M/M/m/∝∝ Queue(Section 2.6.2)
Using an approach similar to that used for the M/M/1 queue, we obtainthe following
)()!1(
)()(!
1)()(
00 tu
m
ept
mm
mptf
tmmm
Q
−+
−
−=−− ρµρµ
δρ
ρ
−−−−
−
−−=
−−−−
)1()!1(
][
)(!1)(
)(0
0 ρρµ
µρ
ρ µρµµ
mm
eepe
mm
mptf
ttmmt
m
W
(2.34)
(2.35)
See Section 2.6.2 for the details and the intermediate steps