0% found this document useful (0 votes)
71 views27 pages

Lec13 - MMs - Queueing System 1-4 y 13-Final

This document describes an M/M/s queueing model with the following characteristics: 1) Interarrival and service times are exponentially distributed 2) There are s identical parallel servers with random assignment of customers 3) The system has an infinite queue size 4) Customers are served on a first-come, first-served basis It provides the steady-state distribution equations and their solution to calculate the probability Pn that there are n customers in the system in steady state. The key result is that Pn is a function of P0, where P0 is calculated as the normalization factor to ensure the probabilities sum to 1.

Uploaded by

Jandres
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views27 pages

Lec13 - MMs - Queueing System 1-4 y 13-Final

This document describes an M/M/s queueing model with the following characteristics: 1) Interarrival and service times are exponentially distributed 2) There are s identical parallel servers with random assignment of customers 3) The system has an infinite queue size 4) Customers are served on a first-come, first-served basis It provides the steady-state distribution equations and their solution to calculate the probability Pn that there are n customers in the system in steady state. The key result is that Pn is a function of P0, where P0 is calculated as the normalization factor to ensure the probabilities sum to 1.

Uploaded by

Jandres
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

4.

3 M/M/s Queueing Model


Characteristics
1. Interarrival time is exponential with rate λ
▪ Arrival process is Poisson Process with rate λ
2. Interarrival time is exponential with rate µ
▪ Number of services is Poisson Process with rate µ
3. Multiple Server:
▪ Number of servers = s
▪ Independent servers
▪ Parallel service channels Notation
▪ Identical servers M / M / s / ∞ / FCFS
▪ Random choice of idle servers
4. System size is infinite → ∞
5. Queue Discipline : FCFS
OR372-Dr.Khalid Al-Nowibet 1
4.3 M/M/s Queueing Model
Steady-State Distribution

State of the system


system is in state n if there are n customers in the
system (waiting or serviced)

Let Pn be probability that there are n customers in the


system in the steady-state. n = 0 , 1 , 2 , 3 , …

OR372-Dr.Khalid Al-Nowibet 2
4.3 M/M/s Queueing Model
Steady-State Distribution
Rate Diagram: v ice
Ser
Consider an M/M/3 system l
Queue is Open n en
tia µ
p o 1
system size → ∞ Ex
µ
λ = λe 2

µ
3
system in state n = 1 ⇒ 1 server busy ⇒ total service speed = µ
system in state n = 2 ⇒ 2 servers busy ⇒ total service speed = 2µ
system in state n = 3 ⇒ 3 servers busy ⇒ total service speed = 3µ
system in state n = 4 ⇒ 3 servers busy ⇒ total service speed = 3µ

system in state n > 3 ⇒ 3 servers busy ⇒ total service speed = 3µ
OR372-Dr.Khalid Al-Nowibet 3
4.3 M/M/s Queueing Model
Steady-State Distribution
Rate Diagram:
1. Arrival rate = λ for all states of the system
2. Service rate = nµ if n ≤ s
Service rate = sµ if n > s
λ λ λ λ λ λ λ
0 1 2 . . . s-1 s s+1 . . .
µ 2µ 3µ (s-1)µ sµ sµ sµ
λ λ λ λ
. . . n-1 n n+1 . . .
OR372-Dr.Khalid Al-Nowibet sµ sµ sµ sµ 4
4.3 M/M/s Queueing Model
Average Average
Steady-State Distribution Rate out of = Rate in to
State n State n
Balance Equations:
λ λ λ λ λ λ λ
0 1 2 . . . s-1 s s+1 . . .
µ 2µ 3µ (s-1)µ sµ sµ sµ

n = 0 ⇒ λP0 = µP1
n = 1 ⇒ λP1 + µP1 = λP0 + 2µP2 ⇔ (λ+µ)P1 = λP0 + 2µP2
n = 2 ⇒ λP2 + 2µP2 = λP1 + 3µP3 ⇔ (λ+2µ)P2 = λP1 + 3µP3
n = 3 ⇒ λP3 + 3µP3 = λP2 + 4µP4 ⇔ (λ+3µ)P3 = λP2 + 4µP4
.... .......
n = s ⇒ λPs + sµPs = λPs-1 + sµPs+1⇔ (λ+sµ)Ps = λPs-1 + sµPs+1

OR372-Dr.Khalid Al-Nowibet 5
4.3 M/M/s Queueing Model
Average Average
Steady-State Distribution Rate out of = Rate in to
State n State n
Balance Equations:
λ λ λ λ
. . . n-1 n n+1 . . .
sµ sµ sµ sµ
.... .......
n = s ⇒ λPs + sµPs = λPs-1 + sµPs+1⇔ (λ+sµ)Ps = λPs-1 + sµPs+1
n = s+1 ⇒ λPs+1 + sµPs+1 = λPs + sµPs+2
⇔ (λ+sµ)Ps+1 = λPs + sµPs+2
.... .......
n > s ⇒ λPn + sµPn = λPn-1 + sµPn+1
⇔ (λ+sµ)Pn = λPn-1 + sµPn+1
OR372-Dr.Khalid Al-Nowibet 6
4.3 M/M/s Queueing Model
Steady-State Distribution
Solution of Balance Equations:

Eq-1: λP0 = µP1


Eq-2: (λ+µ)P1 = λP0 + 2µP2
Eq-3: (λ+2µ)P2 = λP1 + 3µP3
..... ......
Eq-n: (λ+nµ)Pn = λPn-1 + (n+1)µPn+1 n< s
..... ......
Eq-n: (λ+sµ)Pn = λPn-1 + sµPn+1 n≥ s

OR372-Dr.Khalid Al-Nowibet 7
4.3 M/M/s Queueing Model
Steady-State Distribution
Solution of Balance Equations:

Eq-1 ⇔ λ P0 = µP1 ⇔ P1 = (λ/µ) P0


Eq-2 ⇔ λP1 = 2µP2 ⇔ P2 = (λ/2µ)P1
Eq-3 ⇔ λP2 = 3µP3 ⇔ P3 = (λ/3µ)P2
..... ...... ......
Eq-n ⇔ λPn-1 = nµPn ,n < s ⇔ Pn = (λ/nµ)Pn-1
..... ...... ......
Eq-n ⇔ λPn-1 = sµPn , n ≥ s ⇔ Pn = (λ/sµ)Pn-1

OR372-Dr.Khalid Al-Nowibet 8
4.3 M/M/s Queueing Model
Steady-State Distribution
Solution of Balance Equations:
Make all equations functions of P0 only:

Eq-1 ⇔ P1 = (λ/µ) P0 ⇔ P1 = (λ/µ) P0


Eq-2 ⇔ P2 = (λ/2µ)P1 ⇔ P2 = (λ2/2µ2)P0
Eq-3 ⇔ P3 = (λ/3µ)P2 ⇔ P3 = (λ3/6µ3)P0
..... ...... ......
n n
Eq-n ⇔ Pn = (λ/nµ)Pn-1 ,n < s ⇔ Pn = (λ /n!µ )P0
..... ...... ......
n n
Eq-n ⇔ Pn = (λ/sµ)Pn-1 , n ≥ s ⇔ Pn = [λ /(s! sn-sµ )]P0

OR372-Dr.Khalid Al-Nowibet 9
4.3 M/M/s Queueing Model
Steady-State Distribution
Solution of Balance Equations:
Make all equations functions of P0 only:

Let ρ = λ
µ
Eq-1 ⇔ P1 = ρ P0
2
Eq-2 ⇔ P2 = (ρ /2)P0
Eq-3 ⇔ P3 = (ρ3/6)P0
......
Eq-n ⇔ Pn = (ρn/n!)P0 n<s
......
n
Eq-n ⇔ Pn = [ρ /(s! sn-s)]P0 n≥s
OR372-Dr.Khalid Al-Nowibet 10
4.3 M/M/s Queueing Model
Steady-State Distribution
Solution of Balance Equations:

∑P
Computing P0 :
n =1
∀n
P0 + P1 + P2 + … +Ps +Ps+1 + … + Pn +Pn+1 + … = 1

P0 + ρP0 + (ρ2/2) P0 + (ρ3/3!)P0 + … + (ρs/s!)P0 + …+ (ρn/s! sn-s )P0 = 1

P0 [ 1 + ρ + (ρ2/2) + (ρ3/3!) + … + (ρs/s!) + …+ (ρn/s! sn-s ) + … ] = 1

P0 = [ 1 + ρ + (ρ2/2) + (ρ3/3!) + … + (ρs/s!) + …+ (ρn/s! sn-s ) + … ]−1

OR372-Dr.Khalid Al-Nowibet 11
4.3 M/M/s Queueing Model
Steady-State Distribution
Pn is a function of P0
Solution of Balance Equations: if P0 = 0 ⇒ system is infinite
system is finite if an only if P0 > 0
Computing P0 : −1
⎡ ρ
s −1 n ∞
ρ ⎤
n
P0 = ⎢∑ + ∑ n − s ⎥
⎣ n =0 n! n = s s! s ⎦
ρn n → ∞
finite sum ⇒ finite value infinite sum ⇒ n−s
0
constant s! s
ρn ⎛ ss ⎞ ρ n ρ n
ρ
n−s
= ⎜⎜ ⎟⎟ n ⇒ n → 0 if <1
s! s ⎝ s! ⎠ s s s
Steady-State ρ λ
Condition = <1
OR372-Dr.Khalid Al-Nowibet s sµ 12
4.3 M/M/s Queueing Model
Steady-State Distribution
Solution of Balance Equations:

Pn Formula:
−1
⎡ λ sµ s
λ ⎤ s −1 n

P0 = ⎢ +∑ n ⎥
ρ λ
= <1
⎣ s!µ s
s µ − λ n =0 n!µ ⎦ s sµ

λn ρn
Pn = P n<s Pn = P0 n<s
n! µ n 0
n!
λn ρn
Pn = n−s
P0 n≥s Pn = P
n−s 0 n≥s
s! s µ n
s! s

OR372-Dr.Khalid Al-Nowibet 13
4.3 M/M/s Queueing Model
Performance Measures
In steady state
λ , µ , P0
LB = E[busy servers] = E[#Cust. in service]
Ls = Lq + LB
Ws = Wq + (1/µ)
System is
Ls = λWs in Steady Stead
Lq = λWq
LB = λWB

Know 4 measures ⇒ all measures are known


OR372-Dr.Khalid Al-Nowibet 14
4.3 M/M/s Queueing Model
Performance Measures

1. Average Customers in System Ls:


∞ s −1 ∞
L s = ∑ n ⋅ Pn = ∑ n ⋅ Pn + ∑ n ⋅ Pn
n =0 n =0 n =s

ρn
s -1 ∞
ρn P0 ⎛ s-1 ∞
ρ n

= ∑ n P0 + ∑ n n − s P0 = ⎜⎜ ∑ n ⋅ ρ + s ∑ n n ⎟⎟
n s

n =0 s! n =s s! s s! ⎝ n =0 n =s s ⎠

λ ⎡ (λ / µ) s λµ ⎤ ⎡ ρ s +1 ⎤
Ls = + ⎢ P = ρ+ ⎢
2⎥ 0
P
2⎥ 0
µ ⎣ ( s − 1)! ( sµ − λ) ⎦ ⎣ ( s − 1)!( s − ρ) ⎦ ρ= λ
µ
OR372-Dr.Khalid Al-Nowibet 15
4.3 M/M/s Queueing Model
Performance Measures

2. Average Busy servers LB:


LB = E[busy servers] = E[#Cust. in service]
LB = 0.P0 +1.P1+ 2.P2 + …+ s.Ps + s.Ps+1+s.Ps+2+s.Ps+3 +…
LB = 0.P0 +1.P1+ 2.P2 + …+ s ( Pr{ n ≥ s })
LB = 0.P0 +1.P1+ 2.P2 + …+ s (1− Pr{ n < s })
s −1
⎛ ∞

L B = ∑ n ⋅ Pn + s ⎜1 − ∑ Pn ⎟
n =0 ⎝ n =s ⎠
OR372-Dr.Khalid Al-Nowibet 16
4.3 M/M/s Queueing Model
Performance Measures

2. Average Busy servers LB:


LB = E[busy servers] = E[#Cust. in service]
Using Little’s Formula: LB = λWB

WB = Average time server is busy


= Expected service = E[S] = 1/µ

⇒ LB = λWB = λ (1/µ) = ρ

OR372-Dr.Khalid Al-Nowibet 17
4.3 M/M/s Queueing Model
Performance Measures
3. Average Customers in Queue Lq:
Lq = Ls − LB
or
Number of customer in queue = 0 with Pr{n ≤ s} = P0+P1+P2+…+Ps
Number of customer in queue = 1 with Pr{n = s+1} = Ps+1
Number of customer in queue = 2 with Pr{n = s+1} = Ps+2
…. …
Lq = 0.(P0 +P1+P2+…+Ps )+ 1.Ps+1 + 2.Ps+2 + 3.Ps+3 …

= ∑ (n − s) ⋅ Pn = Ls – λ/µ
n =s
OR372-Dr.Khalid Al-Nowibet 18
4.3 M/M/s Queueing Model
Performance Measures

4. Utilization of the System U:

U = Pr{ n > 0 } = P1 + P2 + P3 + … = 1 − P0

5. Utilization of the Service SU:

SU = Pr{ all servers busy } = Pr{ n ≥ s }

SU = 1 − (P0 + P1 + P2 +…+ Ps−1)

OR372-Dr.Khalid Al-Nowibet 19
4.3 M/M/s Queueing Model
Performance Measures

6. Average Time Spent in System Ws:

Ls
Ls = λ .Ws ⇔ Ws =
λ

7. Average Waiting time in Queue Wq:

Lq
Lq = λ .Wq ⇔ Wq =
λ
OR372-Dr.Khalid Al-Nowibet 20
4.3 M/M/s Queueing Model
Example: Consider a bank with two tellers. An average of
90 customers per hour arrive at the bank and wait in a
single line for an idle teller. The average time it takes to
serve a customer is 1.2 minutes. The bank opens daily at
9:00 am and closes at 4:00 pm. Assume that interarrival
times and service times are exponential. Determine
1. The expected number of customers present in the bank
2. The expected length of time a customer spends in the bank
3. Average number of busy tellers.
4. The expected total time that all tellers are busy.
5. The expected total time that a teller #1 is idle.
6. The manager decided to hire a 3rd teller if the average queue
length is more than 9 customers or the waiting time exceeds
5 minutes. Should a 3rd be hired?
OR372-Dr.Khalid Al-Nowibet 21
4.3 M/M/s Queueing Model
Example:
Arrivals: λ = 90 cust/hr Poisson
Service: E[S] = 1.2 min. Exponential
⇒ µ = 1/E[S] = 1/1.2 cust/min
= 60/1.2 = 50 cust/hr
Servers: s = 2 ⇒ M/M/2 ρ/s = 90/(2(50)) = 0.9 < 1

1. The expected number of customers present in the bank


= E[Customers in System] = Ls
⎡ ρ s +1 ⎤ ⎡ (1.8)3 ⎤
Ls = ρ + ⎢ P
2⎥ 0 = 1.8 + ⎢ P
2⎥ 0
⎣ (s − 1)!(s − ρ) ⎦ ⎣ (1)!(2 − 1.8) ⎦
OR372-Dr.Khalid Al-Nowibet 22
4.3 M/M/s Queueing Model
Example:
1. The expected number of customers present in the bank
−1 −1
⎡ λ sµ ss −1
λ ⎤ n ⎡ρ s s
ρ ⎤
s −1 n
P0 = ⎢ s +∑ n ⎥
= ⎢ +∑ ⎥
⎣ s!µ sµ − λ n =0 n!µ ⎦ ⎣ s! s − ρ n =0 n! ⎦
−1
⎡ (1.8) 2 2 2 −1
(1.8) ⎤n

= ⎢ +∑ ⎥ = 0.0526
⎣ 2! 2 − 1 . 8 n =0 n! ⎦

⎡ (1.8)3 ⎤
Ls = 1.8 + ⎢ P
2⎥ 0 = 9.4737 customers
⎣ (1)!(2 − 1.8) ⎦

OR372-Dr.Khalid Al-Nowibet 23
4.3 M/M/s Queueing Model
Example:
2. The expected time a customer spends in the bank

Ws = Ls/λ = (9.4737)/80 = 0.1053 hours = 6.318 min.

3. Average number of busy tellers

LB = λ/µ = 90/50 = 1.8 servers

OR372-Dr.Khalid Al-Nowibet 24
4.3 M/M/s Queueing Model
Example:
4. The expected total time that all tellers are busy

E[busy time for all servers]


= (work hours) Pr{all servers busy}

Total working hours = 4:00 pm – 9:00am = 7 hours


Pr{all servers busy} = Pr {n ≥ 2 } = 1 – Pr{ n < 2 }
= 1 – P0 – P1 = 1– 0.0526 – (1.8)0.0526
= 1– 0.14728 = 0.85272

E[busy time for all servers] = (0.85272)(7 hr) = 5.97 hrs


OR372-Dr.Khalid Al-Nowibet 25
4.3 M/M/s Queueing Model
Example:
5. The expected total time that teller #1 is idle.

E[idle time for teller #1]


= (work hours) Pr{teller #1is idle}
Total working hours = 7 hours
P1 = Pr{one customer in system} = Pr{one teller is idle}
= Pr{teller #1 is idle or teller #2 is idle}
= Pr{teller #1 is idle} + Pr{teller #2 is idle}
independent and identical tellers
= 2 Pr{teller #1 is idle}

Pr{teller #1 is idle} = 0.5 P1 = 0.5 (0.09426) = 0.04734


E[idle time for teller #1] = (0.04734)(7 hr) = 0.33138 hrs = 19.88 min
OR372-Dr.Khalid Al-Nowibet 26
4.3 M/M/s Queueing Model
Example:
6. The manager decided to hire a 3rd teller if the average
queue length is more than 9 customers or the waiting time
exceeds 5 minutes. Should a 3rd be hired?

If (Lq > 9cust or Wq > 5min) then (hire 3rd teller)


= (work hours) Pr{teller #1is idle}

Lq = Ls − LB = 9.4737− 1.8 = 7.6737 < 9 ⇒ OK!

Wq = Lq /λ = 7.6737/90 = 0.0853 hrs = 5.118 min > 5


⇒ Manager should hire a 3rd teller
OR372-Dr.Khalid Al-Nowibet 27

You might also like