7/29/2019 Queuing Theory LN 4
1/102
1
Queuing Theory
M S Prasad
LN 902
7/29/2019 Queuing Theory LN 4
2/102
2
Description
Each of us has spent a great deal of time waiting in lines.
In this chapter, we develop mathematical models for waiting
lines, or queues.
7/29/2019 Queuing Theory LN 4
3/102
3
8.1 Some Queuing Terminology
To describe a queuing system, an input process andan output process must be specified.
Examples of input and output processes are:
Situation Input Process Output Process
Bank Customers arrive at
bank
Tellers serve the
customers
Pizza parlor Request for pizza
delivery are received
Pizza parlor send out
truck to deliver pizzas
7/29/2019 Queuing Theory LN 4
4/102
4
The Input or Arrival Process The input process is usually called the arrival
process.
Arrivals are called customers.
We assume that no more than one arrival can occur
at a given instant. If more than one arrival can occur at a given instant,
we say that bulk arrivals are allowed.
Models in which arrivals are drawn from a small
population are called finite source models.
If a customer arrives but fails to enter the system,
we say that the customer has balked.
7/29/2019 Queuing Theory LN 4
5/102
5
The Output or Service Process To describe the output process of a queuing system,
we usually specify a probability distributiontheservice time distributionwhich governs acustomers service time.
We study two arrangements of servers: servers inparallel and servers in series.
Servers are in parallel if all servers provide the sametype of service and a customer needs only passthrough one server to complete service.
Servers are in series if a customer must pass throughseveral servers before completing service.
7/29/2019 Queuing Theory LN 4
6/102
6
Queue Discipline
The queue discipline describes the method used todetermine the order in which customers are served.
The most common queue discipline is the FCFS
discipline (first come, first served), in which
customers are served in the order of their arrival.
Under the LCFS discipline (last come, first served),
the most recent arrivals are the first to enter service.
If the next customer to enter service is randomlychosen from those customers waiting for service it
is referred to as the SIRO discipline (service in
random order).
7/29/2019 Queuing Theory LN 4
7/102
7
Finally we considerpriority queuing disciplines.
A priority discipline classifies each arrival into one
of several categories.
Each category is then given a priority level, andwithin each priority level, customers enter service
on a FCFS basis.
Another factor that has an important effect on the
behavior of a queuing system is the method that
customers use to determine which line to join.
7/29/2019 Queuing Theory LN 4
8/102
8
8.2 Modeling Arrival and Service
Processes
We define ti to be the time at which the ith customerarrives.
In modeling the arrival process we assume that the
Ts are independent, continuous random variables
described by the random variable A.
The assumption that each interarrival time is
governed by the same random variable implies that
the distribution of arrivals is independent of thetime of day or the day of the week.
This is the assumption of stationary interarrival
times.
7/29/2019 Queuing Theory LN 4
9/102
9
Stationary interarrival times is often unrealistic, butwe may often approximate reality by breaking the
time of day into segments.
A negative interarrival time is impossible. Thisallows us to write
We define1/to be the mean or average interarrival
time.
c
cdttacPdttacP
0)()(and)()( A
0
)(1
dttta
7/29/2019 Queuing Theory LN 4
10/102
10
We define to be the arrival rate, which will haveunits of arrivals per hour.
An important question is how to choose A to reflect
reality and still be computationally tractable. The most common choice forA is the exponential
distribution.
An exponential distribution with parameterhas a
density a(t) = e-t.
We can show that the average or mean interarrival
time is given by .
1)( E
7/29/2019 Queuing Theory LN 4
11/102
11
Using the fact that varA =E(A2)E(A)2, we canshow that
Lemma 1: IfA has an exponential distribution, then
for all nonnegative values oftand h,
2
1var
)()|( hPthtP A
7/29/2019 Queuing Theory LN 4
12/102
12
A density function that satisfies the equation is saidto have the no-memory property.
The no-memory property of the exponential
distribution is important because it implies that ifwe want to know the probability distribution of the
time until the next arrival, then it does not matter
how long it has been since the last arrival.
7/29/2019 Queuing Theory LN 4
13/102
13
Relations between Poisson
Distribution and Exponential
Distribution If interarrival times are exponential, the probability
distribution of the number of arrivals occurring in
any time interval of length tis given by the
following important theorem.
Theorem 1: Interarrival times are exponential with
parameterif and only if the number of arrivals to
occur in an interval of length tfollows the Poissondistribution with parametert.
7/29/2019 Queuing Theory LN 4
14/102
14
A discrete random variable N has a Poisson
distribution with parameterif, forn=0,1,2,,
What assumptions are required for interarrival times
to be exponential? Consider the following twoassumptions:
Arrivals defined on nonoverlapping time intervals are
independent.
For small t, the probability of one arrival occurring
between times tand t+tis t+o(t) refers to any
quantity satisfying
,...)2,1,0(!
)(
nn
enP
n
N
0)(
lim0
t
to
t
7/29/2019 Queuing Theory LN 4
15/102
15
Theorem 2: If assumption 1 and 2 hold, then Ntfollows a Poisson distribution with parametert,
and interarrival times are exponential with
parameter; that is, a(t) = e-t.
Theorem 2 states that if the arrival rate is stationary,
if bulk arrives cannot occur, and if past arrivals do
not affect future arrivals, then interarrival times will
follow an exponential distribution with parameter,and the number of arrivals in any interval of length t
is Poisson with parametert.
7/29/2019 Queuing Theory LN 4
16/102
16
The Erlang Distribution
If interarrival times do not appear to be exponential
they are often modeled by an Erlang distribution.
An Erlang distribution is a continuous random
variable (call it T) whose density functionf(t) is
specified by two parameters: a rate parameterR anda shape parameterk(kmust be a positive integer).
Given values ofR and k, the Erlang density has the
following probability density function:
)0()!1(
)()(
1
tk
eRtRtf
Rtk
7/29/2019 Queuing Theory LN 4
17/102
17
Using integration by parts, we can show that ifT is an Erlan
distribution with rate parameterR and shape parameterk,
then
The Erlang can be viewed as the sum of independent andidentically distributed exponential random variable with rate
1/
2varand)(
Rk
RkE T
7/29/2019 Queuing Theory LN 4
18/102
18
Using EXCEL to Computer Poisson
and Exponential Probabilities
EXCEL contains functions that facilitate thecomputation of probabilities concerning the Poisson
and Exponential random variable.
The syntax of the Poisson EXCEL function is asfollows:
=POISSON(x,Mean,True) gives probability that a
Poisson random variable with mean = Mean is less than
or equal to x. =POISSON(x,Mean,False) gives probability that a
Poisson random variable with mean =Mean is equal to x.
7/29/2019 Queuing Theory LN 4
19/102
19
The syntax of the EXCEL EXPONDIST function isas follows:
=EXPONDIST(x,Lambda,TRUE) gives the probability
that an exponential random variable with parameter
Lambda assumes a value less than or equal to x.
=EXPONDIST(x,Lambda,FALSE) gives the probability
that an exponential random variable with parameter
Lambda assumes a value less than or equal to x.
7/29/2019 Queuing Theory LN 4
20/102
20
Modeling the Service Process
We assume that the service times of different
customers are independent random variables and
that each customers service time is governed by a
random variable S having a density functions(t).
We let 1/ be the mean service time for a customer. The variable 1/ will have units of hours per
customer, so has units of customers per hour. For
this reason, we call the service rate.
Unfortunately, actual service times may not be
consistent with the no-memory property.
7/29/2019 Queuing Theory LN 4
21/102
21
For this reason, we often assume thats(t) is anErlang distribution with shape parameters kand rate
parameterk.
In certain situations, interarrival or service times
may be modeled as having zero variance; in thiscase, interarrival or service times are considered to
be deterministic.
For example, if interarrival times are deterministic,
then each interarrival time will be exactly 1/, and ifservice times are deterministic, each customersservice time is exactly 1/.
7/29/2019 Queuing Theory LN 4
22/102
22
The Kendall-Lee Notation for
Queuing Systems
Standard notation used to describe many queuingsystems.
The notation is used to describe a queuing system in
which all arrivals wait in a single line until one ofsidentical parallel servers is free. Then the first
customer in line enters service, and so on.
To describe such a queuing system, Kendall devised
the following notation. Each queuing system is described by six characters:
1/2/3/4/5/6
7/29/2019 Queuing Theory LN 4
23/102
23
The first characteristic specifies the nature of thearrival process. The following standard
abbreviations are used:
M= Interarrival times are independent, identically
distributed (iid) and exponentially distributed
D = Interarrival times are iid and deterministic
Ek= Interarrival times are iid Erlangs with shape parameter
k.
GI= Interarrival times are iid and governed by some
general distribution
7/29/2019 Queuing Theory LN 4
24/102
24
The second characteristic specifies the nature of theservice times:
M= Service times are iid and exponentially distributed
D = Service times are iid and deterministic
Ek= Service times are iid Erlangs with shape parameter
k.
G = Service times are iid and governed by some general
distribution
7/29/2019 Queuing Theory LN 4
25/102
25
The third characteristic is the number of parallel servers.
The fourth characteristic describes the queue discipline:
FCFS = First come, first served
LCFS = Last come, first served
SIRO = Service in random order
GD = General queue discipline
The fifth characteristic specifies the maximum allowable
number of customers in the system.
The sixth characteristic gives the size of the population from
which customers are drawn.
7/29/2019 Queuing Theory LN 4
26/102
26
In many important models 4/5/6 is GD//. If thisis the case, then 4/5/6 is often omitted.
M/E2/8/FCFS/10/ might represent a health clinic
with 8 doctors, exponential interarrival times, two-phase Erlang service times, a FCFS queue
discipline, and a total capacity of 10 patients.
7/29/2019 Queuing Theory LN 4
27/102
27
The Waiting Time Paradox
Suppose the time between the arrival of buses at thestudent center is exponentially distributed with a
mean of 60 minutes.
If we arrive at the student center at a randomly
chosen instant, what is the average amount of timethat we will have to wait for a bus?
The no-memory property of the exponential
distribution implies that no matter how long it hasbeen since the last bus arrived, we would still expect
to wait an average of 60 minutes until the next bus
arrived.
7/29/2019 Queuing Theory LN 4
28/102
28
8.3 Birth-Death Processes
We subsequently use birth-death processes to
answer questions about several different types of
queuing systems.
We define the number of people present in any
queuing system at time tto be the state of thequeuing systems at time t.
We call j the steady state, or equilibrium
probability, of statej.
The behavior ofPij(t) before the steady state is
reached is called the transient behavior of the
queuing system.
7/29/2019 Queuing Theory LN 4
29/102
29
A birth-death process is a continuous-timestochastic process for which the systems state at
any time is a nonnegative integer.
7/29/2019 Queuing Theory LN 4
30/102
30
Laws of Motion for Birth-Death Law 1
With probability jt+o(t), a birth occurs between timetand time t+t. A birth increases the system state by 1,
toj+1. The variable j is called the birth rate in statej. In
most queuing systems, a birth is simply an arrival.
Law 2 With probability jt+o(t), a death occurs between time
tand time t+t. A death decreases the system state by 1,
toj-1. The variablej is the death rate in statej. In most
queuing systems, a death is a service completion. Notethat0 = 0 must hold, or a negative state could occur.
Law 3
Births and deaths are independent of each other.
R l ti f E ti l Di t ib ti
7/29/2019 Queuing Theory LN 4
31/102
31
Relation of Exponential Distribution
to Birth-Death Processes
Most queuing systems with exponential interarrivaltimes and exponential service times may be
modeled as birth-death processes.
More complicated queuing systems withexponential interarrival times and exponential
service times may often be modeled as birth-death
processes by adding the service rates for occupied
servers and adding the arrival rates for differentarrival streams.
D i ti f St d St t
7/29/2019 Queuing Theory LN 4
32/102
32
Derivation of Steady-State
Probabilities for Birth-Death
Processes We now show how the js may be determined for
an arbitrary birth-death process.
The key role is to relate (for small t) Pij(t+t) toPij(t).
The above equations are often called the flow
balance equations, orconservation of flow
equations, for a birth-death process.
,...)2,1()(1111 jjjjjjjj
0011
The Flow-Balancing Approach (Entry-Exit
7/29/2019 Queuing Theory LN 4
33/102
33
The Flow-Balancing Approach (Entry-ExitRate Balancing Approach)
In the rate diagram given below, think of thefollowing:
Each circle representing a state (i.e., number ofcustomer in the system) has an unknown probability
pj, j= 0, 1, 2, associated with it
0 1 2 3
4
7/29/2019 Queuing Theory LN 4
34/102
34
We obtain the flow balance equations for a birth-death process:
1111
3311222
2200111
1100
)()equationth(
)()2(
)()1(
)0(
jjjjjjjj
j
j
j
7/29/2019 Queuing Theory LN 4
35/102
35
,...)2,1(0 jcjj
Cj = (012j-1)/(1 2 3.. j)
S l ti f Bi th D th Fl
7/29/2019 Queuing Theory LN 4
36/102
36
Solution of Birth-Death Flow
Balance Equations
If is finite, we can solve for0:
It can be shown that if is infinite, then no
steady-state distribution exists.
The most common reason for a steady-state failing
to exist is that the arrival rate is at least as large asthe maximum rate at which customers can be
served.
j
j jc1
j
j
jc1
0
1
1
j
j jc
1
8 4 The M/M/1/GD// Q e ing
7/29/2019 Queuing Theory LN 4
37/102
37
8.4 TheM/M/1/GD// Queuing
System and the Queuing Formula
L=W We define . We callp the traffic intensity
(utilization) of the queuing system.
We now assume that 0 p < 1 thus
Ifp 1, however, the infinite sum blows up.Thus, ifp 1, no steady-state distribution exists.
p
)10()1(
)10(10
ppp
pp
j
j
7/29/2019 Queuing Theory LN 4
38/102
38
Derivation ofL Throughout the rest of this section, we assume that
p
7/29/2019 Queuing Theory LN 4
39/102
39
Derivation ofLq
In some circumstances, we are interested in the expectednumber of people waiting in line (or in the queue).
We denote this number byLq.
)(11
22
p
pp
p
pLq
j
j
jq jL1
)1(
7/29/2019 Queuing Theory LN 4
40/102
40
Derivation ofLs
Also of interest isLs, the expected number ofcustomers in service.
ppLs )1(11)(10 0210
p
pp
p
pLLL sq
11
2
0
1
j
j
7/29/2019 Queuing Theory LN 4
41/102
41
The Queuing FormulaL=W
We define Was the expected time a customerspends in the queuing system, including time in line
plus time in service, and Wq as the expected time a
customer spends waiting in line.
By using a powerful result known as Littles
queuing formula, Wand Wq may be easily
computed fromL andLq.
We first define the following quantitiesL = average number of arrivals enteringthe system per
unit time
7/29/2019 Queuing Theory LN 4
42/102
42
L = average number of customers present in the queuing system
Lq = average number of customers waiting in line
Ls = average number of customers in service
W= average time a customer spends in the system
Wq = average time a customer spends in line Ws = average time a customer spends in service
Theorem 3For any queuing system in which a steady-
state distribution exists, the following relations hold:
L =WLq =Wq
Ls =Ws
7/29/2019 Queuing Theory LN 4
43/102
43
Example 4
Suppose that all car owners fill up when theirtanks are exactly half full.
At the present time, an average of 7.5 customers
per hour arrive at a single-pump gas station. It takes an average of 4 minutes to service a car.
Assume that interarrival and service times are both
exponential.
1. For the present situation, computeL and W.
7/29/2019 Queuing Theory LN 4
44/102
44
2. Suppose that a gas shortage occurs and panic buyingtakes place.
To model the phenomenon, suppose that all car owners now
purchase gas when their tank are exactly three-fourths full.
Since each car owner is now putting less gas into the tank
during each visit to the station, we assume that the average
service time has been reduced to 3 1/3 minutes.
How has panic buying affectedL and W?
7/29/2019 Queuing Theory LN 4
45/102
45
Solutions1. We have anM/M/1/GD// system with = 7.5
cars per hour and = 15 cars per hour. Thusp =7.5/15 = .50.L = .50/1-.50 = 1, and W=L/ =
1/7.5 = 0.13 hour. Hence, in this situation,
everything is under control, and long lines appear
to be unlikely.2. We now have anM/M/1/GD// system with =
2(7.5) = 15 cars per hour. Now = 60/3.333 = 18
cars per hour, andp = 15/18 = 5/6. Then
Thus, panic buying has cause long lines.
minutes20hours3
1
15
5andcars5
6
51
6
5
LWL
7/29/2019 Queuing Theory LN 4
46/102
46
Problems in which a decision maker must choosebetween alternative queuing systems are called
queuing optimization problems.
7/29/2019 Queuing Theory LN 4
47/102
47
More onL =W
The queuing formulaL =Wis very general andcan be applied to many situations that do not seem
to be queuing problems.
L = average amount of quantity present.
= Rate at which quantity arrives at system.
W = average time a unit of quantity spends in system.
ThenL =W or W = L/
7/29/2019 Queuing Theory LN 4
48/102
48
A Simple Example
Example Our local MacDonalds uses an average of 10,000 pounds
of potatoes per week.
The average number of pounds of potatoes on hand is
5000 pounds.
On the average, how long do potatoes stay in the
restaurant before being used?
Solution
We are given that L=5000 pounds and= 10,000
pounds/week. Therefore W = 5000 pounds/(10,000
pounds/week)=.5 weeks.
A Queueing Model Optimization
7/29/2019 Queuing Theory LN 4
49/102
49
A Queueing Model Optimization
Problems in which a decision maker must choose betweenalternative queueing systems
Example: An average of 10 machinists per hour arrive seekingtools. At present, the tool center is staffed by a clerk who is
paid $6 per hour and who takes an average of 5 minutes tohandle each request for tools. Since each machinist produces$10 worth of goods per hour, each hour that a machinists
spends at the tool center costs the company $10. The companyis deciding whether or not it is worthwhile to hire (at $4 perhour) a helper for the clerk. If the helper is hired the clerk willtake an average of only 4 minutes to process requirements fortools. Assume that service and arrival times are exponential.Should the helper be hired?
A Queueing Model Optimization
7/29/2019 Queuing Theory LN 4
50/102
50
A Queueing Model Optimization
Goal: Minimize the sum of the hourly service cost and expected hourly costdue to the idle times of machinists
Delay cost is the component of cost due to customers waiting in line Goal: Minimize Expected cost/hour = service cost/hour + expected delay
cost/hour
Expected delay cost/hour = (expected delay cost/customer) (expectedcustomers/hour)
Expected delay cost/customer = ($10/machinist-hour)(average hoursmachinist spends in the system) = 10W
Expected delay cost/hour = 10W
Now compute expected cost/hour if the helper is not hired and alsocompute the same if the helper is hired
A Queueing Model Optimization
7/29/2019 Queuing Theory LN 4
51/102
51
A Queueing Model Optimization
If the helper is not hired = 10 machinists per hour and = 12machinists per hour
W = 1/(-) for M/M/1/GD//. Therefore, W = 1/(12-10) = = 0.5 hour
Service cost /hour = $6/hour and expected delay cost/hour =10(0.5)(10) = $50
Without the helper, the expected hourly cost is $6 + $50 = $56
With the helper, = 15 customers/hour. Then W = 1/(-)=1/(15-10) = 0.2 hour and the expected delay cost/hour =10(0.2)(10) = $20
Service cost/hour = $6 + $4 = $10/hour
With the helper, the expected hourly cost is $10 + $20 = $30
8 5 The M/M/1/GD/c/ Queuing
7/29/2019 Queuing Theory LN 4
52/102
52
8.5 TheM/M/1/GD/c/ Queuing
System
TheM/M/1/GD/c/ queuing system is identical totheM/M/1/GD// system except for the fact that
when c customers are present, all arrivals are turned
away and are forever lost to the system.
The rate diagram for the queuing system can be
found in Figure 13 in the book.
WL
LW
LW
j
j
jc
c
q
q
c
0
)1(
)1(and
)1(
7/29/2019 Queuing Theory LN 4
53/102
53
j j j0 0
1
. .
. .
c 0
Effective Arrival Rate
1,1
1
1,1
1
0
10
0
ifc
ifc
j
j
Verification by Flow-Balancing Equations
7/29/2019 Queuing Theory LN 4
54/102
54
Verification by Flow-Balancing Equations
p0 = p1
p1+ p1 = p0 + p2
p2+ p2 = p1 + p3
p2= p3 p0 + p1 + p2 + p3 = 1
Substituting the values of = 1 and = 2, we have
2p1 = p0 p0 + 2p2 = 3p1 p1+2p3 = 2p2 p2 = 2p3 p0 + p1 + p2 + p3 = 1
p0 = 8/15, p1 = 4/15, p2 = 2/15, and p3 = 1/15
0 1 2 3
=1
=2
=1 =1
=2 =2
7/29/2019 Queuing Theory LN 4
55/102
55
For theM/M/1/GD/c/ system, a steady state willexist even if .
This is because, even if , the finite capacity of
the system prevents the number of people in the
system from blowing up.
The M/M/s/GD// Queuing
7/29/2019 Queuing Theory LN 4
56/102
56
TheM/M/s/GD// Queuing
System
We now consider theM/M/s/GD// system. We assume that interarrival times are exponential
(with rate), service times are exponential (with
rate), and there is a single line of customers
waiting to be served at one of thes parallel servers.
Ifjs customers are present, then allj customers
are in service; ifj >s customers are present, then all
s servers are occupied, andjs customers arewaiting in line.
j j j
7/29/2019 Queuing Theory LN 4
57/102
57
j j j
0 0
1
2
.
.
2
.
s s
s+1
.
.
s
.
s
7/29/2019 Queuing Theory LN 4
58/102
58
Summarizing, we find that theM/M/s/GD//
system can be modeled as a birth-death process withparameters
we definep= /s. Forp
7/29/2019 Queuing Theory LN 4
59/102
59
An M/M/s Queueing Optimization Example
1)(
/1/1//
/
)()(/,)1()(
)1(!
ss)P(j
2.....)s1,ss,(j!
s)1,2,....,(j!
)1(!!
1
0
0
j
0
)1(
0
0
s
sjP
WLLW
LL
sjs
sjPLWsjPL
s
sss
j
s
ss
is
q
sj
jqqq
s
sj
j
j
j
si
i
si
7/29/2019 Queuing Theory LN 4
60/102
60
M/M/s/GD/c/ - Multiple server waiting queueproblem with exponential arrival and service times
with finite capacity
An M/M/s Queueing Optimization Example
7/29/2019 Queuing Theory LN 4
61/102
61
An M/M/s Queueing Optimization Example
Bank Staffing Example: The manager of a bank must determine howmany tellers should work on Fridays. For every minute a customer standsin line, the manager believes that a delay cost of 5 cents is incurred. Anaverage of 2 customers per minute arrive at the bank. On the average ittakes, a teller 2 minutes to complete a customers transaction. It costs the
bank $9 per hour to hire a teller. Inter-arrival times and service times areexponential. To minimize the sum of service costs and delay costs, howmany tellers should the bank have working on Fridays?
= 2 customer per minute and = 0.5 customer per minute, /s requires
that 4/s < 1. Thus, there must be at least 5 tellers, or the number ofcustomers present will blow up.
Now compute for s = 5, 6. Expected service cost/minute + expecteddelay cost/minute
An M/M/s Queueing Optimization Example
7/29/2019 Queuing Theory LN 4
62/102
62
Q g p p
Each teller is paid $9/60 = 15 cents per minute.
Expected service cost/minute = 0.15s
Expected delay cost/minute = (expected
customers/minute) (expected delay cost/customer)
Expected delay cost/customer = 0.05Wq
Expected delay cost/minute = 2(0.05) Wq = 0.10 Wq
For s = 5, =/s = 2/.5(5) = 0.8
An M/M/s Queueing Optimization Example
7/29/2019 Queuing Theory LN 4
63/102
63
An M/M/s Queueing Optimization Example
P(j 5)=0.55
Wq = .55/(5(.5)-2) = 1.1 minutes For s = 5, expected delay cost/minute = 0.10(1.1) =11 cents
For s = 5, total expected cost/minute = 0.15(5) + 0.11
= 86 cents Since s = 6 has a service cost per minute of 6(0.15) =
90 cents, 6 tellers cannot have a lower total cost than5 tellers. Hence, having 5 tellers serve is optimal
TheM/M//GD// and
7/29/2019 Queuing Theory LN 4
64/102
64
e / / /G / / a d
GI/G//GD// Models
There are many examples of systems in which acustomer never has to wait for service to begin.
In such a system, the customers entire stay in the
system may be thought of as his or her service time.
Since a customer never has to wait for service, there
is, in essence, a server available for each arrival, and
we may think of such a system as an infinite-server
(or self-service).
7/29/2019 Queuing Theory LN 4
65/102
65
Using Kendall-Lee notation, an infinite serversystem in which interarrival and service times may
follow arbitrary probability distributions may be
written as GI/G//GD// queuing system.
Such a system operated as follows:
Interarrival times are iid with common distribution A.
DefineE(A) = 1/. Thus is the arrival rate.
When a customer arrives, he or she immediately entersservice. Each customers time in the system is governed
by a distribution S havingE(S)= 1/.
7/29/2019 Queuing Theory LN 4
66/102
66
LetL be the expected number of customers in thesystem in the steady state, and Wbe the expected
time that a customer spends in the system.
L
8.8 TheM/G/1/GD// Queuing
7/29/2019 Queuing Theory LN 4
67/102
67
Q g
System
Next we consider a single-server queuing system inwhich interarrival times are exponential, but the
service time distribution (S) need not be
exponential.
Let () be the arrival rate (assumed to be measured
in arrivals per hour).
Also define 1/ =E(S) and 2=varS.
In Kendalls notation, such a queuing system isdescribed as anM/G/1/GD// queuing system.
7/29/2019 Queuing Theory LN 4
68/102
68
Determination of the steady-state probabilities forM/G/1/GD// queuing system is a difficult matter.
Fortunately, however, utilizing the results of
Pollaczek and Khinchin, we may determineLq, L,
Ls, Wq, W, Ws.
7/29/2019 Queuing Theory LN 4
69/102
69
Pollaczek and Khinchin showed that for the
M/G/1/GD// queuing system,
It can also be shown that 0, the fraction of the time
that the server is idle, is 1-p.
The result is similar to the one for the
M/M/1/GD// system.
1
)1(2
222
q
q
q
q
q
WW
L
W
pLL
p
pL
/1/6/5)/1(22 hrhrmeanExpS
7/29/2019 Queuing Theory LN 4
70/102
70
77.2)6/51(2
)18/3(5)6/5(
18/3/)(
/1)18/3(/)(
)3,/18(~min),33.3(~,
27.2)6/51(2
)60/3(5)6/5(
)60/3(min),3min,10(~
083.2)1(2
0),6(tan~
16.4)1(
/1,/6,/5),/1(~
222
22
321
222
22
2
2
2
q
i
q
q
q
L
RKsV
RKsE
khrRErlangSmeanExpSSSSS
L
meanNS
p
pL
tConsS
p
pL
hrhrmeanExpS
8.9 Finite Source Models: The
7/29/2019 Queuing Theory LN 4
71/102
71
Machine Repair Model M/M/R/GD/K/K With the exception of theM/M/1/GD/c/ model,
all the models we have studied have displayed
arrival rates that were independent of the state of
the system.
There are two situations where the assumption ofthe state-independent arrival rate may be invalid:
1. If customers do not want to buck long lines, the arrival
rate may be a decreasing function of the number of
people present in the queuing system.2. If arrivals to a system are drawn from a small
population, the arrival rate may greatly depend on the
state of the system.
7/29/2019 Queuing Theory LN 4
72/102
72
Models in which arrivals are drawn from a small
population are called finite source models. In the machine repair problem, the system consists
ofKmachines andR repair people.
At any instant in time, a particular machine is in
either good or bad condition.
The length of time that a machine remains in good
condition follows an exponential distribution with
rate . Whenever a machine breaks down the machine is
sent to a repair center consisting ofR repair people.
7/29/2019 Queuing Theory LN 4
73/102
73
The repair center services the broken machines as if
they were arriving at anM/M/R/GD// system. Thus, ifj R machines are in bad condition, a
machine that has just broken will immediately be
assigned for repair; ifj >R machines are broken,j
R machines will be waiting in a single line for a
repair worker to become idle.
The time it takes to complete repairs on a broken
machine is assumed exponential with rate. Once a machine is repaired, it returns to good
condition and is again susceptible to breakdown.
7/29/2019 Queuing Theory LN 4
74/102
74
The machine repair model may be modeled as abirth-death process, where the statej at any time is
the number of machines in bad condition.
Note that a birth corresponds to a machine breaking
down and a death corresponds to a machine having
just been repaired.
When the state isj, there areK-j machines in good
condition. When the state isj, min (j,R) repair people will be
busy.
7/29/2019 Queuing Theory LN 4
75/102
75
Since each occupied repair worker completesrepairs at rate, the death ratej is given by
If we definep = /, an application of steady-state
probability distribution:
),...2,1(
),...,1,0(
KRRjR
Rjj
j
j
),...2,1(!
!
),...,1,0(
0
0
KRRjRR
jpj
K
Rjpj
K
Rj
j
jj
7/29/2019 Queuing Theory LN 4
76/102
76
Using the steady-state probabilities shown on theprevious slide, we can determine the following
quantities of interest:
L = expected number of broken machines
Lq = expected number of machines waiting for service
W= average time a machine spends broken (down time)
Wq = average time a machine spends waiting for service
Unfortunately, there are no simple formulas forL,Lq, W, Wq. The best we can do is express these
quantities in terms of the js:
7/29/2019 Queuing Theory LN 4
77/102
77
Kj
Rj
jq
Kj
j
j
RjL
jL
)(
0
)()(00
Lkjk
LW
L
W
j
K
j
j
K
j
j
q
q
7/29/2019 Queuing Theory LN 4
78/102
78
2 repairman, 3 machine, = 2/day, 1/ = 12 hours,
=4/day, 1/= 6 hours
j j j0 6, K 0
1 4,(K-1) 4,
2,R
.
K-1
2,(K-2)
.
(K-(K-1))
8,R
.
R3,K 0 8,R
2909.0
7/29/2019 Queuing Theory LN 4
79/102
79
0545.
2182.
4364.
3
2
1
0
Find the expected number of machines working
=3-L=3-(1(.4364)+2(.2182)+3(.0545))=3-1.0363=1.9637
Find the utilization of repairman
=.4909
Ls= 1(.4364)+2(.2182)+2(.0545)=.9818
Find the expected wait time for the repairman
0545.)0545(.1
4)0363.13(2)(
63.4/0545.
q
q
q
L
Lk
hoursL
W
8.10 Exponential Queues in Series
7/29/2019 Queuing Theory LN 4
80/102
80
and Open Queuing Networks
In the queuing models that we have studied so far, acustomers entire service time is spent with a single
server.
In many situations the customers service is not
complete until the customer has been served by
more than one server.
A system like the one shown in Figure 19 in the
book is called a k-stage series queuing system.
7/29/2019 Queuing Theory LN 4
81/102
81
Theorem 4If (1)interarrival times for a series
queuing system are exponential with rate , (2)
service times for each stageIserver are exponential,
and (3) each stage has an infinite-capacity waiting
room, then interarrival times for arrivals to eachstage of the queuing system are exponential with
rate .
For this result to be valid, each stage must have
sufficient capacity to service a stream of arrivalsthat arrives at rate ; otherwise, the queue will
blow up at the stage with insufficient capacity.
Open Queuing Networks
7/29/2019 Queuing Theory LN 4
82/102
82
Open Queuing Networks Open queuing networks are a generalization of
queues in series. Assume that stationj consists ofsjexponential servers, each operating at ratej.
Customers are assumed to arrive at station j from
outside the queuing system at rate rj.
These interarrival times are assumed to be
exponentially distributed.
Once completing service at stationI, a customer
joins the queue at stationj with probabilitypij andcompletes service with probability
kj
j
ijp1
1
7/29/2019 Queuing Theory LN 4
83/102
83
Define j, the rate at which customers arrive atstationj.
1, 2, kcan be found by solving the following
systems of linear equations:
This follows, because a fractionpij of the i arrivals
to station i will next go to stationj. Supposesjj > j holds for all stations.
),...,2,1(1
kjprki
i
iijjj
7/29/2019 Queuing Theory LN 4
84/102
84
Then it can be shown that the probabilitydistribution of the number of customers present at
stationj and the expected number of customers
present at stationj can be found by treating stationj
as anM/M/sj/GD// system with arrival rate jand service ratej.
If for somej,sjj j, then no steady-state
distribution of customers exists. The number of customers present at each station are
independent random variables.
7/29/2019 Queuing Theory LN 4
85/102
85
That is, knowledge of the number of people at allstations other than stationj tells us nothing about
the distribution of the number of people at stationj! This result does not hold, however, if either
interarrival or service times are not exponential.
To findL, the expected number of customers in thequeuing system, simply add up the expected numberof customers present at each station.
To find W, the average time a customer spends inthe system, simply apply the formulaL=Wto theentire system.
p
7/29/2019 Queuing Theory LN 4
86/102
86
p11
p22
p33
332211 ppp
ii
=8,s=1
=15,s=1
=12,s=1
=3,s=2
.5
.5
=5
=10
=5+.5(10)=10
=.5(10)=5
W=1/(12-10)=.5W=1/(8-5)=.333
W=1/(15-10)=.2
Network Models of Data
7/29/2019 Queuing Theory LN 4
87/102
87
Communication Networks Queuing networks are commonly used to model
data communication networks.
The queuing models enable us to determine the
typical delay faced by transmitted data and also to
design the network. We are interested, of course, in the expected delay
for a packet.
Also, if total network capacity is limited, a natural
question is to determine the capacity on each arcthat will minimize the expected delay for a packet.
7/29/2019 Queuing Theory LN 4
88/102
88
The usual way to treat this problem is to treat each
arc as if it is an independentM/M/1 queue anddetermine the expected time spent by each packet
transmitted through that arc by the formula
We are assuming a static routing in which arrival
rates to each node do not vary with the state of the
network. In reality, many sophisticated dynamic routing
schemes have been developed.
1W
8.11 TheM/G/s/GD/s/ System
7/29/2019 Queuing Theory LN 4
89/102
89
(Blocked Customers Cleared)
In many queuing systems, an arrival who finds allservers occupied is, for all practical purposes, lost to
the system.
If arrivals who find all servers occupied leave the
system, we call the system a blocked customerscleared, or BCC, system.
Assuming that interarrival times are exponential,
such a system may be modeled as anM/G/s/GD/s/system.
7/29/2019 Queuing Theory LN 4
90/102
90
In most BCC systems, primary interest is focused
on the fraction of all arrivals who are turned away. Since arrivals are turned away only whens
customers are present, a fraction s of all arrivals
will be turned away.
Hence, an average ofsarrivals per unit time will
be lost to the system.
Since an average of(1-s) arrivals per unit time
will actually enter the system, we may conclude that
)1( ssLL
8.12 How to Tell Whether
7/29/2019 Queuing Theory LN 4
91/102
91
Interarrival Times and Service
Times are Exponential How can we determine whether the actual data are
consistent with the assumption of exponential
interarrival times and service times? Suppose for example, that interarrival times oft1, t2,
tn have been observed.
It can be shown that a reasonable estimate of the
arrival rate is given by
ni
i
it
n
1
8.13 Closed Queuing Networks
7/29/2019 Queuing Theory LN 4
92/102
92
Q g For manufacturing units attempting to implement
just-in-time manufacturing, it makes sense to
maintain a constant level of work in progress.
For a busy computer network it may be convenient
to assume that as soon as a job leaves the system
another job arrives to replace the job. Systems where there is constant number of jobs
present may be modeled as closed queuing
networks.
Since the number of jobs is always constant the
distribution of jobs at different servers cannot be
independent.
8.15 Priority Queuing Models
7/29/2019 Queuing Theory LN 4
93/102
93
y Q g There are many situations in which customers are
not served on a first come, first served (FCFS)
basis.
Let WFCFS, WSIRO, and WLCFS be the random
variables representing a customers waiting time in
queuing systems under the disciplines FCFS, SIRO,LCFS, respectively.
It can be shown that
E(WFCFS) =E(WSIRO) =E(WLCFS)
Thus, the average time (steady-state) that a
customer spends in the system does not depend on
which of these three queue disciplines is chosen.
7/29/2019 Queuing Theory LN 4
94/102
94
It can also be shown thatvarWFCFS < varWSIRO < var(WLCFS)
Since a large variance is usually associated with a
random variable that has a relatively large chance of
assuming extreme values, the above equationindicates that relatively large waiting times are most
likely to occur with an LCFS discipline and least
likely to occur with an FCFS discipline.
7/29/2019 Queuing Theory LN 4
95/102
95
In many organizations, the order in which
customers are served depends on the customerstype.
For example, hospital emergency rooms usually
serve seriously ill patients before they servenonemergency patients.
Models in which a customers type determines the
order in which customers undergo service are call
priority queuing models. The interarrival times of type i customers are
exponentially distributed with rate i.
7/29/2019 Queuing Theory LN 4
96/102
96
Interarrival times of different customer types areassumed to be independent.
The service time of a typeIcustomer is described
by a random variable Si.
Nonpreemptive Priority Models
7/29/2019 Queuing Theory LN 4
97/102
97
Nonpreemptive Priority Models
In a nonpreemptive model, a customers servicecannot be interrupted.
After each service completion, the next customer to
enter service is chosen by given priority to lower-
numbered customer types (Lower numberedhigher priority).
In the Kendall-Lee notation, a nonpreemptive
priority model is indicated by labeling the fourthcharacteristic as NPRP.
Preemptive Priorities
7/29/2019 Queuing Theory LN 4
98/102
98
Preemptive Priorities In a preemptive queuing system, a lower priority
customer can be bumped from service whenever ahigher-priority customer arrives.
Once no higher-priority customers are present, the
bumped type i customer reenters service.
In a preemptive resume model, a customers
service continues from the point at which it was
interrupted.
7/29/2019 Queuing Theory LN 4
99/102
99
In a preemptive repeat model, a customer beginsservice anew each time he or she reenters service.
Of course, if service times are exponentially
distributed, the resume and repeat disciplines are
identical.
In the Kendall-Lee notation, we denote a
preemptive queuing system by labeling the fourth
characteristic PRP.
7/29/2019 Queuing Theory LN 4
100/102
100
For obvious reasons, preemptive discipline arerarely used if the customers are people.
8.15 Transient Behavior of QueuingS t
7/29/2019 Queuing Theory LN 4
101/102
101
Systems We have assumed the arrival rate, service rate and
number of servers has stayed constant over time.This allows us to talk reasonably about the existence
of a steady state.
In many situations the arrival rate, service rate, and
number of servers may vary over time.
An example is a fast food restaurant.
It is likely to experience a much larger arrival rate during
the time noon-1:30 pm than during other hours of theday.
Also the number of servers will vary during the day with
more servers available during the busier periods.
7/29/2019 Queuing Theory LN 4
102/102
When the parameters defining the queuing system
vary over time we say the queuing system is non-stationary.
Consider the fast food restaurant. We call these
probability distributions transient probabilities.
We now assume that at time tinterarrival times are
exponential with rate(t) and thats(t) servers are
available at time twith service times being
exponential with rate(t). We assume the maximum number of customers
present at any time is given by N.
Top Related