Professional Documents
Culture Documents
3.baker Able PDF
3.baker Able PDF
com
www.getmyuni.com
Queueing Theory
Specification of a Queue
Source
• Finite
• Infinite
Arrival Process
Service Time Distribution
Maximum Queueing System Capacity
Number of Servers
Queue Discipline
www.getmyuni.com
Queueing Theory(cont.)
Specification of a Queue(cont.)
Traffic Intensity (l/m)
Note: E[s] / E[t] = lE[s] = l/m
Server Utilization
Probability that N customers are in the system at time t.
www.getmyuni.com
Queueing Theory(cont.)
Relationships:
L = lW (L: avg # in the system)
Lq = lWq (Lq : avg # in queue)
W = Wq + 1/m (W: avg waiting time in sys.)
(Wq: avg waiting time in queue)
Birth-And-Death Process
State:
l0 l1 lN-2 lN-1 lN
Birth-And-Death Process(cont.)
Equation Expressing This:
State Rate In = Rate Out
0 m1P1 = l0P0
1 l0P0 + m2P2 = (l1 + m1) P1
2 l1P1 + m3P3 = (l2 + m2) P2
.... ...................
N-1 lN-2PN-2 + mNPN = (lN-1 + mN-1) PN-1
N lN-1PN-1 + mN+1PN+1 = (lN + mN) PN
.... ...................
www.getmyuni.com
Birth-And-Death Process(cont.)
Birth-And-Death Process(cont.)
Birth-And-Death Process(cont.)
l n l n-1 l 0
P0
m n 1m n m1
To Simplify:
Let C = (ln-1 ln-2 .... l0) / (mn mn-1 ......... m1)
Then Pn = Cn P0 , N = 1, 2, ....
www.getmyuni.com
M/M/1
Recall:
= l/ m < 1 (for steady-state)
Cn = (l / m)n = n , for n = 1, 2, ...
Pn = Cn · P0
The requirement that Pn 1
n 0
[1 C
n 1
n ]P0 1
P0 1 /(1 C
n 1
n )
1/(1 )
n
n 1
1/( 0 )
n
n 1
(0 1)
www.getmyuni.com
M/M/1(cont.)
P0 1 ( n )
n 0
1
n
n 0
1 (1 )
1
1
i 0
if |x| < 1.
www.getmyuni.com
M/M/1(cont.)
Consequently,
L n (1 ) n
n 0
d n d n
(1 ) (1 )
n 0 d d n 0
d 1 1
(1 ) (1 )
d (1 ) (1 ) 2
(1 )
or
l (m l)
www.getmyuni.com
M/M/1(cont.)
Similarly,
L q (n - 1)Pn
n 1
nPn Pn
n 1 n 1
nPn ( Pn P0 )
n 0 n 0
L 1(1 P0 )
/(1 ) 1 (1 )
2 /(1 ), or
l2 / m(m l )
www.getmyuni.com
M/M/1 Example I
Traffic to a message switching center for one of the
outgoing communication lines arrive in a random
pattern at an average rate of 240 messages per
minute. The line has a transmission rate of 800
characters per second. The message length
distribution (including control characters) is
approximately exponential with an average length
of 176 characters. Calculate the following principal
statistical measures of system performance,
assuming that a very large number of message
buffers are provided:
www.getmyuni.com
M/M/1 Example II
A branch office of a large engineering firm has one
on-line terminal that is connected to a central
computer system during the normal eight-hour
working day. Engineers, who work throughout the
city, drive to the branch office to use the terminal to
make routine calculations. Statistics collected over
a period of time indicate that the arrival pattern of
people at the branch office to use the terminal has a
Poisson (random) distribution, with a mean of 10
people coming to use the terminal each day. The
distribution of time spent by an engineer at a
terminal is exponential, with a
www.getmyuni.com
Arrival Rate l = 1 / 48
(customer / min)
Server Utilization =l/m=5/
8 = 0.625
Probability of 2 or more customers in system
P[N 2] = 2 = 0.391
Mean steady-state number in the system L
= E[N] = / (1 - ) = 1.667
S.D. of number of customers in the system
sN = sqrt() / (1 - ) = 2.108
www.getmyuni.com
M/M/s (s > 1)
m 2m 3m (s-1)m sm sm
www.getmyuni.com
M/M/s (cont.)
M/M/s (cont.)
Ps+1 = (1/s) × (l / m) Ps =
(l m ) s
l
P0
s! sm
www.getmyuni.com
M/M/s (cont.)
2
(l / m ) s
l
Ps 2 (1 / s) (l / m)Ps 1 P0
s! sm
j
(l / m ) s
l
Ps j (1 / s) (l / m)Ps j1 P0
s! sm
www.getmyuni.com
M/M/s (cont.)
(l m)
n
s!s n s
www.getmyuni.com
M/M/s (cont.)
So, if l < sm >
P0 1
s1 (l m )n (l m )s n s
(l sm )
n 0 n! s! n s
1
s 1 (l m )n (l m )s 1
n 0 n! s! 1 (l sm)
(l m ) n
Pn P0 , if 0 n s
n!
(l m ) n
n s
P0 , if s n
s!s
www.getmyuni.com
M/M/s (cont.)
(l / m ) s j
j P0
j 0 s!
(l / m ) s d j
P0
s! j 0 d
www.getmyuni.com
M/M/s (cont.)
(l / m )s
d j
L q P0
s! d j0
(l / m ) s d 1
P0
s! d (1 )
(l / m ) s
P0
s! (1 ) 2
www.getmyuni.com
M/M/s (cont.)
(l / m ) s
L q P0 , = l / sm
s! (1 ) (Lq : avg # in queue)
2
= Lq + l / m
www.getmyuni.com
Steady-State Parameters of
M/M/s Queue
= l / sm
1
s 1 (l / m ) l 1 sm
n s
P0
n! m s! sm l
n 0
1
s 1 (s)
n
1
(s)
s 1
n 0 n! s! 1
P(L() s) = {(l/m)s P0} / {s!(1- l/sm)}
= {(s)s P0} / {s! (1 - )}
www.getmyuni.com
Steady-State Parameters of
M/M/s Queue (cont.)
L = s + {(s)s+1 P0} / {s (s!) (1 - )2}
= s + { P (L() s) } / {1 - }
W =L/l
Wq = W - 1/m
Lq = l Wq = {(s)s+1
P0} / {s (s!) (1 - )2} = { P (L()
s) } / {1 - }
L - Lq = l / m = s
www.getmyuni.com
0 1 2 3 .......
P0 1
(0.8)0 (0.8)1 (0.8)2 1
0! 1! 2! 1 0.4
= 0.429 (@ 43% of time, system is empty)
as compared to s = 1: P0 = 0.20
(l / m ) s
Lq P0
s! (1 ) 2
0.429 {0.8 0.4} /{2!(1 0.4) }
2 2
0.152
www.getmyuni.com
M/M/s Example II
P0
n 0 n! 3 2! 2(3 / 2) 2
= {1 + 4/3 + (16/9)(1/2)(3)} -1
= {15 / 3}-1 = 1/5 = 0.2
The probability that all servers are busy is given by
P(L() 2) = {(4/3)2 (1/5)} / {2!(1- 2/3)}
= (8/3) (1/5) = 0.533
www.getmyuni.com
m m m m m 0
Undefined
www.getmyuni.com
M/M/1/N (cont.)
1. Form Balance Equations:
2. Solve
N
for P0:
n 0
Pn or
1
P0 + (l/m)1 P0 + (l/m)N P0 = 1
P0 {1+ (l/m)1 +N (l/m)N } = 1
P0 = 1 / {
n 0
( l}/ m ) n
1
1 (l / m) N 1
1 (l / m )
= (1 - ) / (1 - N+1)
www.getmyuni.com
M/M/1/N (cont.)
1 n , for n = 0, 1, 2, ..., N
So, Pn N 1
1
Hence,
N
L nPn
n 0
1 N
d n
N 1
1 n 0 d
1 d N n
N 1
1 d n 0
www.getmyuni.com
M/M/1/N (cont.)
1 d 1 N 1
L N 1
1 d 1
N 1
( N 1) N 1
N
(1 N 1 )(1 )
N 1
( N 1)
N 1
(1 ) (1 )
www.getmyuni.com
M/M/1/N (cont.)
As usual (when s = 1)
Lq = L - (1- P0)
W = L / le , where le = l (1 - PN)
Wq = Lq / le
www.getmyuni.com
M/M/1/N Example
M/M/s/N
Undefined
Rate Diagram
l l l l l 0
m 2m sm sm sm 0
Undefined
www.getmyuni.com
Steady-State Parameters of
M/M/s/N
P0 1
s ( l / m ) n ( l / m )s N
1
n 1 n!
s! n s1
n s
( l / sm )
(l / m ) n
Pn P0 , for n = 1, 2, ... s
n!
(l / m ) n
n s
P0 , for n = s, s+1, ... N
s!s
0, for n > N
www.getmyuni.com
Steady-State Parameters of
M/M/s/N (cont.)
s 1 s 1
L nPn L q s(1 Pn )
n 0 n 0
Lq
s!(1 ) 2
P0 (l / m)s N s N s
1 ( N s) (1 )
Note: W and Wq are obtained from these
quantities just as shown for the single server
case.
www.getmyuni.com
Steady-State Parameters of
M/G/1 Queue
= l / m
L = + {l2 (m2 + s2)} / {2 (1 - )}
= + {2 (1 + s2 m2)} / {2 (1 - )}
W = m1 + {l (m2 + s2)} / {2 (1 - )}
Wq = {l (m2 + s2)} / {2 (1 - )}
Lq = {l2 (m2 + s2)} / {2 (1 - )}
= {2 (1 + s2 m2)} / {2 (1 - )}
P0 = 1 -
www.getmyuni.com
M/G/1 Example
For Able, l =
1/30 (per min), m1 = 24 (min), =l/
m 24/30 4/5 s2 202 =
400(min2) Lq = {l2 (m2 + s2)}
/ {2 (1 - )} = {(1/30)2 (242 + 400)} /
{2 (1-4/5)} = 2.711 (customers)
For Baker, l = 1/30
(per min), m1 = 25 (min), =l/m
25/30 5/6 s2 22 = 4(min2)
Lq = {(1/30)2 (252 + 4)} / {2 (1-5/6)}
= 2.097 (customers)
www.getmyuni.com
Steady-State Parameters of
M/Ek/1 Queue
l 1 k l2 1 k 2
L
m 2k m ( m l ) 2k 1
1 k 1 l 1 k m 1
W m 1
m 2k m ( m l ) 2k 1
1 k l 1 k m 1
Wq
2k m ( m l ) 2k 1
1 k l2 1 k 2
Lq
2k m ( m l ) 2k 1
www.getmyuni.com
M/Ek/1 Example
1 k l2 1 3 (1 / 60) 2
Lq
2k m ( m l ) 2 3 (1 / 45)(1 / 45 1 / 60)
2 135 3
( patients)
3 60 2
www.getmyuni.com
Steady-State Parameters of
M/D/1 Queue
l 1 l2 1 2
L
m 2 m (m l ) 2 1
1 1 l 1 m 1
W m 1
m 2 m (m l ) 2 1
1 l 1 m 1
Wq
2 m (m l ) 2 1
1 l2 1 2
Lq
2 m (m l ) 2 1
www.getmyuni.com
M/D/1 Example
Steady-State Parameters of
M/G/ Queue
P0 = e-l/m
Pn = {e-l/m (l/m)n} / n! , n = 0, 1,...
W =1/m
Wq = 0
L =l/m
Lq = 0
www.getmyuni.com
M/G/ Example
s
P(L() s) Pn
n 0
s
{e 1500 (1500) n } / n! 0.95
n 0
Steady-State Parameters of
M/M/s/K/K Queue
1
s 1 K l K
n
K! l
n
P0
n s
n 0 n m n s (K n )!s!s m
n
K l
Pn P0 , n = 0, 1, ..., s-1
n m
n
K! l
P0 , n = s, s+1, ... K
( K n )!s!s n s m
www.getmyuni.com
Steady-State Parameters of
M/M/s/K/K Queue (cont.)
K
L nPn
n 0
K
L q (n s)Pn
n s 1
K
l e (K n )lPn
n 0
W = L / le
Wq Lq / le
(L - Lq) / s
= le / sm
www.getmyuni.com
M/M/s/K/K Example
P0 n 2
n 0 n 20 n 2 (10 n )!2!2 20
= 0.065
Using P0 we can obtain the other P n, from which
we can compute the average number of machines
waiting for service
10
L q (n 2)Pn
n 2 1
1.46(machines)
www.getmyuni.com
0.342(machines / min)
and the average waiting time in the queue
Wq Lq / le 4.27 (minutes)
Similarly, we can compute the expected number of
machines being serviced or waiting to be served
K 10
L nPn nPn 3.17(machines)
n 0 n 0
www.getmyuni.com