Queuing Problems Answers
Queuing Problems Answers
SWEN 549
Name:
These questions are similar to what will be on the exam. Use these to study for the exam, but
you do not need to hand them in.
1. (10 points) Suppose we have a bartender handling customers who are arriving at 7 customers
per hour, following a Markovian process. What is the probability that a customer will be served
within a half hour?
Solution:
λ=7
x = 0.5
F7 (0.5) = 1 − e−7/2 = 96.98%
2. (10 points) Suppose we have a librarian handling patrons who are arriving every 20 minutes,
following a Markovian process. What is the probability that a patron will have to wait more
than an hour?
Solution:
by minutes...
1/λ = 20, so λ = 1/20 = 0.05
1 − F1/20 (60) = e−60/20 = 4.9%
or, by hour...
1/λ = 1/3, so λ = 3 customers per hour
1 − F3 (1) = e−3 = 4.9%
3. (10 points) Suppose we want to ensure that 85% of customers at an insurance agency should
not have to wait longer than 15 minutes. How many customers per hour must the agency be
able to process, on average, to achieve this goal?
Solution:
15 minutes is 1/4 an hour...
Fλ (1/4) ≤ 0.85
1 − e−λ/4 ≤ 0.85
1 − 0.85 ≤ e−λ/4
0.15 ≤ e−λ/4
ln(0.15) ≤ ln(e−λ/4 )
ln(0.15) ≤ −λ/4
−4ln(0.15) > λ
λ > 7.5 customers per hour
4. (10 points) The checkout at a bank has a customer arrival rate of 30 customers per hour, and
they have a service rate of 40 customers per hour. What is the mean queue length? Assume
both of these random variables are Markovian, and that the entire bank is handled by one
queue.
Solution:
ρ = 30/40 = 0.75
0.75
0.25 =3
5. (10 points) The checkout at a game store has an average of 5 minutes between each customer
arrival. You want to have a mean queue length of at most 2 customers. What mean service
rate per hour will we need to achieve this?
(Assume both arrival rate and service rate variables are Markovian.)
Solution:
convert to hours initially
1 5
λ = 60 , so λ = 60/5 = 12
ρ
1−ρ ≤2
ρ ≤ 2 − 2ρ
3ρ ≤ 2
ρ ≤ 2/3
λ
ρ= µ
2 12
3 = µ
λ > 18 customers per hour
Or... keep it all in minutes until the end...
1
µ = 5, so µ = 1/5 customers / hour
(same logic above)
ρ ≤ 2/3
λ
ρ= µ
2 0.2
3 = µ
2µ = 0.6
µ = 0.3 customers / minute
Or 0.3 ∗ 60 = 18 customers / hour
6. (10 points) The checkout at a cigar shop has a customer arrival rate of 4 customers per hour.
You currently have a service rate of 6 customers per hour, but would like to make your mean
Page 2
response time 70% of what it is now. By what percentage will you need to improve your current
service rate to achieve this goal?
(Assume both arrival rate and service rate variables are Markovian.)
Solution:
First find the current response time...
ρ = 4/6 = 0.6̄
ρ
n̄ = 1−ρ =2
In this system, X = λ = 4 because we are able to process everybody. So then we apply
Little’s Law:
4R = 2 or R = 0.5 hours
But! We want to improve our R, so...
0.70R = 0.35 hours
n̄ = 0.35 ∗ 4 = 1.4 is the desired queue length
ρ
1.4 = 1−ρ
1.4 − 1.4ρ = ρ
1.4 = 2.4ρ
1.4
ρ= 2.4 = 0.583̄ is our desired ρ
λ 4
0.583̄ = µ = µimproved
4
µimproved = 0.583̄
= 6.857 customers per hour
µimproved 6.857
Percentage improvement d is µold = 6 = 1.1428
d = 1.1428 or 14.3%
Page 3
7. (10 points) Suppose you have a central server system with a CPU, and IO devices of an SSD
and HDD. The CPU, SSD, and HDD all have mean service rates of 2 jobs/ms, 1 job/ms, and
0.6 job/ms, respectively. The global throughput of the system is 0.65 jobs/ms. The utilization
of the CPU is measured at 68.25% and the utilization of the SSD is measured at 39%. What
is the expected utilization of the HDD?
Solution:
We were given µ for each, so convert to S.
Scpu = 1/2 = 0.5, Sssd = 1, Shdd = 10/6 = 1.6̄
Now use Ui = Xglobal Di
0.6825 = 0.65Dcpu , so Dcpu = 0.6825/0.65 = 1.05
0.39 = 0.65Dssd , so Dssd = 0.35/0.6 = 0.6
Now use Di = Vi Si
0.5 ∗ Vcpu = 1.05, so Vcpu = 2.1
1 ∗ Vssd =, so Vssd = 0.6
And we know that Vcpu = 1 + Vssd + Vhdd
2.1 = 1 + 0.6 + Vhdd , so Vhdd = 0.5
Use Ui = Xglobal Di , i.e. Uhdd = Xglobal Vhdd Shdd
Uhdd = 0.65 ∗ 0.5 ∗ (10/6) = 54.16̄%
Page 4
8. (10 points) Suppose we have a system similar to the central server system, but with the fol-
lowing structure:
Now suppose that the mean service times for A,B,C, and D are: 0.5, 0.6, 0.7, and 0.4 ms/job
respectively. The B queue is visited three times as often as the C queue. The C queue is visited
half as many times as the A queue. What is the maximum throughput of this system?
Solution:
Based on the diagram, we can assume that the visit ratios VA = VD , and that VA =
2 + VB + VC
And since we know from the problem that:
VB = 3VC and
VC = 0.5VA
Then plugging in we get VA = 2 + 4VC = 4
So VD = 4
VC = 2
VB = 6
Multiply those by the service times to get demands:
DA = 4 ∗ 0.5 = 2
DB = 6 ∗ 0.6 = 3.6
DC = 2 ∗ 0.7 = 1.4
DD = 4 ∗ 0.4 = 1.6
Thus, Dmax = 3.6
1
So Xglobal < 3.6 = 0.27̄ jobs/ms
Page 5