2nd Chapter
2nd Chapter
to Queueing
Theory
ples of queueing in order to prepare the reader for the quantitative material
that follows.
Queueing arises very naturally in a study of packet-switched networks:
Packets, arriving either at an entry point to the network or at an intermediate
node on the way to the destination, are buffered, processed to determine the
appropriate outgoing transmission link connected to the next node along the
path, and then read out over that link when their time for transmission comes
up. The time spent in the buffer waiting for transmission is a significant measure
of performance for such a network, since end-to-end time delay, of which this
wait time is a component, is one element of the network performance experi-
enced by a user. The wait time depends, of course, on nodal processing time and
packet length. It also depends on the transmission link capacity, in packets/sec
capable of being transmitted, on the traffic rate in packets/sec arriving at the
node in question, and on the service discipline used to handle the packets. Our
queueing theory formulation will in fact consider most of these items. In oun _
quantitative study of packet-switched networks we shall neglect nodal process-
ing time for the most part, for the sake of simplicity. In our study of circuit-
switched networks in Chapter l l, however, we shall consider the processing of
calls at a node.
Queueing theory also arises naturally in the study of circuit-switched net-
works, not only in studying the processing of calls but in analyzing the relation at
a node or switching exchange between trunks available (each capable of han-
dling one call) and the probability that a call to be ser up will be blocked or
queued for service at a later time. In fact, historically, much of modern queueing
theory developed out of telephone traffic studies at the beginning of the twen-
tieth century. Integrated networks, which combine aspectsof packet switching
and circuit switching, will be considered later in this book, and the discussion
there will of necessity involve the use of queueing concepts.
Consider the simplest model of a queue, as depicted in Fig. 2 - l. To keep
the discussionconcrete, the queue in this caseis shown handling packetsof data.
These packets could also be calls queueing up for service in a circuit-switched
system. More generally, in the queueing literature jargon, they would be "cus-
B u fe
fr
P a c k e t sa r r i v i n g
X Packetsdeparting
l. The packet arrival process (the arrival statistics of the incoming packets),
2- 1 PoissonProcess
As noted in the previous section, the Poisson process is the arrival process used
most frequently to model the behavior of queues. It has been used extensively in
2-1 . PoissonProcess 25
F-^'-*l
>Time
, |
t t+At
With this last definition the Poisson process is seen to be a special caseof a
Marhou process, one in which the probability of an event at time t * At depends
on the probability at time / only [PAPO], [COX]. Note that with defining
relations I and 2, more than one arrival or occurrence of an event in the interval
Lt (A,t-> 0) is ruled out, at least to O(At).
If one now takes a larger finite interval T, one finds the probability p(k) of k
arrivals in T to be given by
p(k): (17)Le-^r/kl k: 0, I,2, (2-l)
* o(At) implies that other terms are higher order in At and that they go to zero more
rapidly than At asA, -'0.
IPAPO] A. Papoulis,Probability, RandornVariables, andStochasticProcesses,McGraw-Hill,
New York, 2d ed., 1984.
[COX] D. R. Cox and H. D. Miller, TheTheoryof StochasticProcesses, Methuen,London,
I 965.
26 Introductionto Queueing Theory
AI At
(T)nu-
F@): (2-4)
2-1 t PoissonProcess 27
with
/n\
= mt'/(rn- k)tht'
\o/
Now let At --+ 0, but with T : mLt fixed. Using the defining equation for
the exponential,
tt + at)h/t:,an
|5
and approximating factorial terms by the Stirling approximation, onc gets Eq.
(2- l). Details are left to the reader.
Now consider a large time interval, and mark off the times at which a
Poissonevent (arrival) occurs. One gets a random sequenceof points as shown in
Fig. 2 - a. The time between successivearrivals is represented by the symbol z. It
is apparent that u is a continuously distributed positive random variable. For
Poisson statistics, it turns out that z is an exbonentialh distributedrandom vari-
able; i.e., its probability density functionf,(i) is given by
E(r):
r rf,(r)dt: l/1 (2-6)
Figure 2 -4 Poissonarrivals
28 Introductlonto Queuelng Theory
I
1/r
Figure 2-5 Exponential interarrival distribution
P(t=x):l-s-tx
But this is just the cumulative probability distribution F,(x) of the random
variable ?. Hence we have
F"(*):L-e-^' (2-8)
from which the probability density function f"(*): dF"(x)/d,x: )s-xx follows
immediately.
The close connection between the Poissonarrival processand the exponen-
tial interarrival time can be exploited immediately in discussing properties of
the exponentialseruice-timedistribution. Thus consider a queue with a number
of customers (packets or calls) waiting for service. Focus attention on the out-
put of the queue, and mark the time at which a customer completes service. This
is shown schematically in Fig. 2-7 . Let the random variable representing time
between completions'be r, is shown. This must also be the service time if the
next customer is served as soon as the one in service leaves the system. In
particular, take the case where r is exponentially distributed in time, with an
average value E(r) : l/p. Thus
time
f+-Service
Output
, + AD: 0]
prob.[N(t,t + Lt): 0] : fl p.ob.[N(')(r,
':-' (2- lo)
:,q tt - )",L,t+ : -
o(At)l | llt + o(Lt),
The symbol M in particular, from the Markov process, is used to denote the
Poisson process or the equivalent exponential distribution. AnM/M/nl queue
is thus one with Poissonarrivals, exponential service statistics,and m servers.An
M/G/I queue has Poisson arrivals, general service distribution, and a single
server. A special case is the M/D/I queue, with D used to represent fixed
(deterministic) or constan,service time. We shall have more to say about these
other queueing structures in later sections.
As noted in the introduction to this chapter, the statistical properties of the
M/M/l queue, the average queue o..rrpu..y, the probability of blocking for a
finite queue, average throughput, and so forth, are readily determined once we
find the probabilities of state p, at the queue. By definition, pnis the probability
that there are ,? customers (packets or calls) in the queue, including the one in
service. By implication the system is operating at steady state so that these
probabilities do not vary with time. Starting from some initial defined values (for
example, an empty queue state), one expects these probabilities to approach
steady-state, stationary, non-time-varying values as time goes on, if the arrival
and service-time distributions are invariant with time. We shall show later on
that these stationary probabilities are readily determined from simple flow
balance arguments. At this point we use a more general, time-dependent
argument.
Specifically, let the arrival processto the single-server queue of Fig. 2 - 8 be
Poisson, with parameter.l. Let the service-time process (packet length or call
holding time) be exponential, with parameterl, as shown. Then the probability
p"(t + At) that there are n customers (packets or calls) in the queue at time
(t + Lt) may readily be found in terms of corresponding probabilities at time l.
Referringtothestate-timediagramofFig.2-9,itisapparentthatifthequeueis
in state n at time t + Lt,it could only have been in statesn - l, h, or n * I at time
I n f i n i t eb u f f e r
Exponentialservice,p
n+1
Buffer
occupancy n
(state)
n-1
t t+at
t. (We assumehere for simplicity that z > l.) The probability p * Lt) that the
"(t
queue is in state n at time t + Lt must be the sum of the (mutually exclusive)
probabilitiesthat the queue was in statesz -1, f,, or n* I at time l, each
multiplied by the (independent)probability of arriving at statez in the interven-
ing At units of time. We thus have, as the generating equation for p^(t + 44,
p"(t + Al) : /"0)[(l - AAiXI - tr&t)* p^,t ..LAt + o(44]
+ p"-t(t)ll&t(r - ltAt)+ o(At)l (2-r2)
* p"*r(t)[pLt(L - )"Lt)+ o(Au)]
The transition probabilities of moving from one state to another have been
obtained by considering the ways in which one could move between the two
statesand calculating the respectiveprobabilities, using the properties of the
arrival and service-timedistributions. As an example, if the systemremains in
staten, n 2 l, there could have been either one departure and one arrival, with
probability lt&t' LAt, or no departure and no arrival, with probability
(l - pAt)(l - lLt),as shown.The other terms in Eq. (2 - l2) are obtainedsimi-
larly.
Since o(At) includes terms of order (At)2and higher, the terms involving
(At)2in Eq. (2- 12) should be incorporated in o(At). (They were retained and
shown explicitly to help the reader understandEq. (2- l2).) Simplifying Eq.
(2-12) in this way, and dropping o(Al) terms altogether, one gets
p"(t+ AD: [ - (1+ tt)At)p"(t)
+ AAtp"-r(t)* pAtp"*r(t)(2-r2a)
Eq. (2 - l2a) can be usedto study the time-dependent(transient)behavior of the
M/M/I queue given that the queue is started at time I : 0 in someknown state
2-2 a The M/M/1 Queue 33
4!_{,\
:-Q+ p)p"(t)+Ap"-t(t)*tt4"*'(t) (2-r4)
dF
This is the differential-difference equation to be solved to find the time varia-
tion of p"(t) explicitly.
As stated earlier, p"(l) should approach a constant, stationary value 1, as
time goes on. Assuming that this is the case (it will be shown later that the
condition /. ( p ensures this in the case of the infinite queue), we must have
dp"(t)/dt: 0 at the stationary value of p,as well. Equation (2- 14), for the case
of stationary, non-time-varying probabilities, then simplifies to the following
equation involving the stationary state probabilities p, of t}re M/M/l queue:
-v "' . ,,'.-}\.-1\.v...
oX-z ix-zi\ n_N__/r\_/*itr-
pp Itp
2p":r
Surface2
n +1
Surface 1
For the case of an infinite M/M/I queue, one finds very simply that po:
(l - p), tf p 1 t, and one gets, finally,
0.5
+ oo
II
n
- 0l
n: 0 and n: N. Equation (2-17) is still the solution. The only difference now
is that the probability pq that the queue is empty changes to accommodate the
normalization condition summed over a finite number of states:
2p": t
n-O
Po:Q-p)/(r-pN+t) ( 2- 1e)
in this case,so that
p": (t _ p)p"/(t _ pN+t) (2-20)
for the finite M/M /l queue.
In particular, the probability that the queue is full is pr, given by
p*: (l - p)p*/(t - pN+t) (2-21)
But this should be the same as dhe probability of blocking: the probability that
customers (packetsor calls)are turned away and not accepted by the queue. This
may be demonstrated by the following simple argument, which will be found
useful later in some of our data network performance analysis. Consider the
picture of a queue shown in Fig. 2 - L3. This does not have to be a finite M /M/ |
queue. It can be any queueing system that blocks customers on arrival. A load,t,
2-2 . TheM/M/1 Queue 37
\ = load -Pa)
r=throughput=X1
\PA
+
I
I
PB
1
(N+1)
1
N
Normalized ( A ,+ 1 )
throughput,
lp
01
load,p
Normalized
p : r ' Above this value of load, the normalized throughput levels off to values
approaching I more and more closely.
We focus now on the uncongested region, p < l, for which it is sufficient to
use the infinite buffer analysis. From the state probabilities p", given by Eq.
(2 - l8), one can calculate various statisticsof interest. In particular, consider the
average number of customers E(n) (packets or calls queued) appearing in the
queue, including the one in service. From the definition of the mean value of
random variables, we have immediately
areal, finite queue system, the number would, of course, not shoot up as fast in
the vicinity of p 11, but Eq. (2-27) for the infinite queue does provide a good
model for the finite queue case. Equati on (2 -27) is plotted in Fig. 2 - 17 .
From a comparison of Figs. 2-15 to 2-I7, one can make some state-
ments about queueing performance that will be reiterated elsewhere in the book
in discussing the performance of networks. As the load on the system increases,
the throughput increasesas well. More and more customers are blocked, how-
ever, and the average number of customers in the queue E(n) also increases
rapidly. This increase in E(n) translates itself into increased time delay in the
queue. There is thus a typical trade-offin performance: As the load increasesthe
throughput goes up ( a desirable characteristic) but blocking and time delay also
increase (undesirable characteristics). In Chapter 5, in discussingcongestion in
more detail, we shall in fact seethat queueing deadlocks can occur at high load.
In this case,only apparent when two or more queues forming a network attempt
to passcustomers (packets) to one another, nothingwlll move, and the through-
put drops to zero!
To find the time delay through the queue (this includes time spent waiting
on the queue in addition to the service or transmission time), one invokes a
simple formula that we shall be using throughout this book. The formula, called
appropriately Little's formula after the individual who first proved it [LITT],
sayssimply that a queueing system, with average arrival rate ,t and mean time
delay E(T) through the system, has an average queue length E(rz)given by the
expression
rate into the system.It thus correspondsto our throughput y. This should be
apparentsincecustomersthat are turned awaycannotcontributeto delaysin the
system.
Applying Eq.(2-28) to theM/M/l queueunder discussion as shownin
Fig. 2- 19, one hasimmediately,usingEq. (2-27) for E(n),
E(r): E(n)/).: r/p/(r - p) (2-2e)
This expression for the average time delay E(Z) through theM/M/I queue has
an interesting interpretation. For p <. l, E(T) : | /p, exactly the average ser-
vice time. This is the case,from Eq. (2 -27), when there are few customers on the
average in the queue. Hence very little time is spent waiting in the queueing
system on the average, and the time delay is almost always due to service or
transmission time. As the normalized load or tramc intensity increases, how-
ever, typical queueing behavior is experienced, with E(T) beginning to rapidly
increase. This is shown in Fig. 2 -20 for E(7) as a funcrion ofp. The normalized
delay, nQ)/l/p-or ltE(T), the time delay relative to rransmission time-is
plotted in the figure. For p:0.5, for example, the average delay doubles, to
2/p.The average wait time in the queue at this point equals the average service
time. Forp : 0.8, the average delay is 5 / p,so that, on the avera ge, thereare 4/ p
units of wait time.
It is apparent that for the single-server queue the following simple relation
between the average wait time E(W) and the average delay E(T) through the
queue must hold:
1
pE(T\
P=\lp
0.4 0.6 0.8 1.0
customers E(q) waiting in the queue (seeFig. 2- l9). This must be given by
E(q):LE(w):LE(r)- 1/p
(2-31)
E(n)- p
(Recall that Little's formula is very general and that it can also be applied to a
portion of a queueing system,as shown in Fig. 2 - I 9.) As a check, p in Eq. (2 - 3 I )
must represent the average number of customers in service. This is obviously
lessthan one, since a customer is either in service or not. Focusing on the service
station itself, there is a probability po: | - p that no one is in service (the queue
is empty), hence a probability (l - Fo): p that one customer is in service. The
average is thus just p. The result for the M/M/I queue, Po: | - p, may be
generalized to an) single-server queue. * From Eq. (2 - 3 I ), p is always the aver-
age number in service. Hence Po: 0 - p) must always be true.
Becauseof the great utility and generality of Little's formula, we devote the
next section to a simple derivation.
2-3 Liffle'sFormulo
, L: lW
Consider a queueing system as shown in Fig. 2 -21 . For simplicity we consider
the waiting section only. Let A(/) represent the cumulative arrivals to the queue
at time /, and let D(t) represent the cumulative departures that go into service
after waiting. Then L(t) : A(t) - D(l)is the number waiting in the systemar rime
/. No assumptions need be made about the arrival process or the departure
process. We only stipulate that all customers entering the system are ultimately
served (this is then a work-conserving system).
Inparticular, letcustomersarriveat time ti,j : 1,2, . . . .A(f) thenrepre-
sents the number of such arrival times, up to the time l. A typical state of the
function A(t) appears in Fig. 2 -22. At each arrival, A(t) increasesby l. Let the
customers depart, moving to the service station, at times tj =ti. To simplify
the discussioninitially, say that the service discipline is FIFO (ihe iesult obtained
will be shown to be general, independent of this initial assumption). For this
case, the departure times must increase monotonically, ti 1 t;< ti< . . . . A
typical set of departure times appears in Fig. 2-22 with the corresponding
curve for the cumulative departures D(l) indicated as well. Note that departures
coincide with arrivals when the system is empty. The wait times, Wr, for cus-
tomers are also indicated. These obviously represent the time each customer
spends in the system between arrival and departure. From Fig.2-22 one can
write, by inspection, simple relations between the different quantities shown
that lead directly to Little's formula. Consider a starting time 0 and a later time
z, at both of which A(t) : D(t). Examples in Fig. 2 - 22 include t'r,tu,and {. Let
n(r) : A(r) - A(0) be the number of arrivals in rhe interval z. Then rhe mean
arrival rate in the interval (0,2) is just
Arrivals--> t (Time)
Departures----+ t\ ti t6 th f6 t6
(An examplein Fig. 2 - 22 would be six arrivalsin the intervalbetweent, and tu.)
Focusnow on the cross-hatched areasin Fig. 2 -22. The cumulativeareain
the interval (0,c) isjust the function
It
t L(t)dt
Jo
since Z(/) : A(t) - D(t), as noted earlier and as indicated in Fig. 2-22. Since this
area is made up of a series of rectangles of unity height and width VIl;as shown we
obviously must have the equality
9.*,:
' ["r1ryo,
Jo
(z-33)
(2- 33)
J--
But considerthe quantity
n(r)
w(t) = \\ /n(r) (2-34)
j--r
This is the aaerage uaiting time in the interval (0, z).
6 Infroducrionto QueueingTheory
numberof customersin
(2- 35)
2w,:2aj- t)
j:r j:r
2 w , : 2j:r t j - 2j-r t i
j-r
Written in this form, it is apparent that ) IV, depends only on the sum of the
departure times and not on the differen ci tj - t, used in the derivation assuming
FIFO service. The individual departure times may depend on the service disci-
pline, but Little's formula applied to any discipline holds nonetheless.
As an example, consider the last come- first served (LCFS) discipline. Typi-
cal plots for this caseappear in Fig. 2-23. The reader is asked to demonstrate,
using this figure, that the equality Eq. (2 - 33) holds here as well.
2-4 . Stote-dependentQueues:Dirth-deorhProcesses 47
3
2
1
t (Time)
Arrivals+ t1
Departures----> t1 th ti
2-4 Stote-dependentQueues:
Birth-deothProcesses
TheM/M/ I queueanalysiscarried out in detail earlier is readily extendedto
single-queuesystemsin which arrival and departure (service)ratesare depen-
dent on the stateof the system.The processes are often calledbirth-deathpro-
cesses[COX]. We carry out a simpleanalysis
of such a systemin this sectionand
provide sometypicalexamples.A multiserverexponentialqueueingsysrem,of
the type M/M/m, will be found to fall in this class.A blocking systemwith no
waiting room for customers,which often arisesin the modeling of circuit-
switched systems,will provide another example. Other examplesappear in
chaptersthat follow, particularly Chapter 5, on congestioncontrol in packet-
switchednetworks,and Chapter 10, on the traffic analysisof circuit-switched
networks.
The state-dependent generalizationof our previousM/M/l model, with
Poissonarrivals and exponentialservicedistribution, is made for a systemin
staten simply by defining the probability of one arrival in the infinitesimal
interval (t, t + Lt) to be,l"At * o(At),with the probability of no arrivalsdefined
to be (l - )""A,t)* o(At). The memorylessassumptionis again invoked so that
arrivals in the interval (t, t * At) are independentof arrivalsin other intervals.
The arrival processis thus another example of a Markov process[COX],
[PAPO]. A specialcaseis our earlier Poissonprocess,with i" : ,., a constant,
48 Introductionto QueueingTheory
independent of state. This arrival process is often called a birth process, since
l,Lt can be visualized as representing the probability of "birth" of a customer,
given n customers already in the system. Note, as previously, that with this
model at most o??acustomer at a time can arrive in the system in the interval
(t, t + Lt).
In a similar manner, the state-dependent departure or death process is
generalized from our previous Poisson departure process to be one for which
the probability of departure of one customer in the infinitesimal interval
(t,t+ Lt) is defined tobe 1t,Lt * o(At), given the number of customers in the
system is n. The probability of departure of no customers is ( I - 1t"Lt) -t o(Lt),
and the memoryless assumption is again invoked. The state-dependent depar-
ture or death process is similarly an example of a Markov process.
Combining these two processes,as was done in the case of the M/M/I
queue, again letting Al --- 0 and taking the system to be in statisticalequilibrium,
the balance equation governing the operation of the combined birth-death
process or state-dependentqueueing system, at equilibrium (see Fig. 2-24),
may be written by inspection:
(1,* lt,)p,: Ln-tpo-r * ltn+r?o+r (2- 38)
Equation (2-15) for the M/M/l queue is a special case.The corresponding
state diagram appears in Fig. 2-25. The parameter.e, represents the rate of
arrival of a customer, given the system is in state n;p" is the equilibrium probabil-
ity that the system is in state n; p^is the rate of departure of a customer, given the
system is in state n.The balance equation may again be obtained by equating the
rate of departurey'om state n (the left-hand side of Eq. (2 - 38)) to the rate of
arrival at state rz (the right-hand side of Eq. (2-38)). Alternatively, from Fig.
2-25, one can obtain Eq. (2 - 38) by enclosingthe staterzwith a closedsurface,
as was done in Fig. 2 - I l, and then equating the "flux" leaving the state to the
"flux" entering it.
The sameargument indicates that the solution to Eq. (2 - 38), extending the
earlier M/M/l analysis,is given by
(Arrivalrate) (Departure
rate)
trn-t In \n+1
. .\.i\.^.7.. .
-r'\.,__z-r__z__.
n-1 Pn
ttal
" ltn+'l
z-l
\€
p^: zlt, n > 2. For the M/M/z queue' then, one has,from Eq. (2 -40),
p./po:Q/2p)'-'
(l): ,n, n> | P= 1/2P (2-4r)
The parameterphas been defined in terms of 2p here, since the effective service
rate is 21t for the state n > 2. With at least two packets in the queue, the system
serves at twice the rate of a single-trunk system, reducing the effective traffic
intensity correspondingly, and hence acting to reduce queue congestion (as
measured by the time delay) as well. These qualitative considerations will be
borne out quantitatively. Allowing the queue to be an infinite one for simplicity,
one finds, from the normalization condition, that
- p = 1/2tt (2-42)
Fo: (r p)/(t + p)
and
2(l - o\
P":ffiP" n>l (2-43)
This is, of course, always less than the M/M/l result. Note in addition that
becauseof the 2pservice rate for the state ??) l, the M /M /zqueue can operate
out to twice the arrival rate of the M /M / | queue: 7 I Zp.Adding the additional
server thus improves both the time delay and the throughput performance. This
is diagrammed in Fig. 2-27, which shows the normalized time delay 1tE(T)
plotted versus the normalized arrival rate ),/21t. Also shown is a time-delay load
curve for an M/M/l queue with twice the service capacity, 21t. The perfor-
mance of this system is always better than that of either of the other two systems.
In terms of performance, it is always more effective to double the transmission
capacity than to add a second trunk at the original capacity, if justifed by cost
considerationsor required by reliability considerations. The reason is obvious:
The packet transmission time is halved, so that at low utilization (p << l) more
packets are being served per unit time. For at least two packets in the system,the
probability of completion is the same in the two systems(the M/M/2 queue with
service rate p and the M /M / | queue with service rate 2p). As the traffic utiliza-
tion increases, the average time delays of the two strategies (the one adds a
second server, the other doubles the service rate) approach one another.
Consider now, in the M/M/2 case, the significance of the traffic intensity
parameter p, defined here as )./2p. As in the case of tl:'e M/M/I queue, one
argues that the maximum possible throughput is 2p. This is not attained here
rE(T)
0
o 0.2 0.4 0.6 0.8 1.0
that given by F;q.Q - a7). For an infinite queue, ps is given by Eq. (2 - 48) as well.
The two examples, the M/M/o queue and the queue with discouragement,
thus have the same solution for the probability of state. The average state
occupancy is given in both casesby
either by using Eqs. (2 - a7) and (2 - 48) and carrying out the summation indi-
cated or by invoking the property of the Poisson distribution noted earlier (Eq.
(2-2)).This average number of customers is always less than p/(l - p), the
average number in the M/M/I model, showing the benefit to be derived by
either increasing the number of servers or controlling the input arrival rate.
The two examples do differ, however, in their time delay-throughput char-
acteristics. This should be the case since, despite the identical solution for the
probability of state in the two cases,they do represent different physical situa-
tions. Take the M/M/o queue first. Its throughput is just l, the applied load,
:
since ,1., )" for all values of n. From Little's formula, then, the average time
delay is
usingthePoissondistributionofEqs. (2-a7)and(2-48)forp",thedefinitionof
i" in this case,and carrying out the indicated summation. In this casethe
throughput could have been obtained much more simply,as indicatedby the
54 Introducfionto QueueingTheory
2p":t
n-O
that
p" /n!
F":-fr P: i/P (2-54)
2 P'/ct
4:O
2-1 . Stote-dependentQueues: Birthdeoth Processes 55
invoking the definitions oflto and of E(n), respectively. As the traffic builds up,
the throughput approaches its maximum value of Np. This corresponds to the
case p:l/p ) N, in which situation most of the calls arriving are being
blocked as well; thus P3 + l. The average delay through the system, for those
calls accepted, isjust l/p,the service time (called the holding time in telephone
practice). As a check, we have, invoking Little's formula,
E(T): E(")/y: r/tt ( 2- 5e)
from Eq. (2-58).
Other examples of state-dependent queue analysis will be encountered
throughout the book, in analyzing quantitatively the performance of packet-
switched, circuit-switched, and integrated networks.
and
These are called the Pollaczek-Khinchine formulas after two well known mathe-
maticians. The paramerer p is again given by ),1p,= lE(r), with I the average
(Poisson) arrival rate and E(r):ll p" the average service time. The pa.amete.
as is the variance of the service-time distribution.
Note that both expressions appear closely related to the corresponding
results in the M/M / | case.(These are the leading terms, before the brackets, ii
both equations.) This is a remarkable result: The average queue occupancy (and
corresponding time de lay) for a queue with Poissonarrivals and any sCrvice-time
distribution is given by the result obtained for an exponential service distribu-
tion with the same average service time, multiplied by a correction factor. This
correction factor, the rerm in brackets in Eqs. (2-60) and (2-61), is seen ro
depend on the ratio of the variance o2 of the sirvice distribution to the average
value squarea, | /p2.
Recafl that the variance of the exponential distribution is o2 : | / p2, i.e., the
square of the average value. Setting o2 : | / ltz in Eqs. (Z - 60) and (2 = 6l then,
),
one obtains the results derived earlier for the M/M/ | queue. As oz increases,
with o2 > r/p2, the corresponding average queue occupancy and time delay
increase as well. For o2 I | / p2,on the other hand, the aveiage querr. occupancy
and time delay decrease relative to the M/M/l result. As i special.ur.,l"t uil
customers (packets or calls) have the same service length | /1t. Thenfor 02 : 0,
This is to be expected since the increased variance means a large spread in the
service times, with a correspondingly higher probability Lhat longer service
times, leading to more congestion, will be encountered.
Equation (2-61) may be used to obtain a compact, general form for the
average wait time E(IV) on the queue. Specifically, recall that E(T) and E(W) are
related by the expression
E(w): EQ)- r/p (2-64)
SubstitutingEq. (2-61) for E(Z) into Eq. (2-64) and simplifying,one obtains
the following simpleresult for the averagewait time E(I{z)in anM/G/I queue:
The term E(22) is the second moment of the service-time distribution, given by
E(tz):o2*l/1t2
* If the queue empties at (j - l), we wait until the next customer arrives and in turn
completes service. During this service yi customers may arnve.
2-5 t M/G/l Queue: Meon Volue Anolysis 59
( i - 1 )c u s t o m e r l t hc u s t o m e r N u m b e ro f c u s t o m e r s
servicecompletion servicecompletion In queue
i-1 i
I i+1
Time
S e r v i c et i m e , c u s t o m e rI
Here p,is, as throughout this chapter, the probability that the queue is in state n.
From Eq. (2-68) we thus havep6: (I - p)> 0, as found first in theM/M/l
case.
60 Introductionfo QueueingTheory
E(n):+.# ( 2- 6e)
We have used E(v) : p here; o], yet to be found, is the variance of the number of
customers arriving in a service interval.
To proceed, i.e., to find of specifically, we now invoke the Poisson arrival
assumption. We also let the (general) service-time probability density function
be given byf,(t), with the parameter z representing the service time. To find o$
and E(v) we must know the probability P(v : l) that exactly frcustomers arrive in
a service interval. For example, it is apparent from their definitions that
and that
o3: 2 fk - E(v))z
P(v: k) (2-7r)
t:o
Defining the conditionalprobabilityP(u : Alz)asthe probabilityof ftarrivalsin z
sec,P(v: ft) is obviouslygiven by
utilization p is thus validated anorher way: Eq. (2-74) indicares that E(v) is, for
Poisson arrivals, given by the average customer arrival rate l. times the average
service time E(r), extending the definition used in the M/M /l case.
The calculation of al for the case of Poisson arrivals proceeds in a manner
similar to that of the calculation of E(z). Again inserting F;q. (2-73) into Eq.
(2-72) and then inserting the result into Eq. (2-7I) (the defining equarion for
o|), interchanging summation and integration, and then simplifying the result,
one finds that
2-6 NonpreemptivePriority
QueueingSystems
The need to provide priority to certain classesof customers in a queueing system
arises in many applications. Priority classesare used in many computer systems,
in the computer control of digital switching exchanges,for deadlock prevention
in packet-switching networks, and so forth. A simple example taken from packet
switching serves to provide the necessary motivation at this point. Consider a
packet-switching network that transmits, in addition to the normal data packets,
control packets of much shorter length that carry out the vital operations of
signaling, congestion notification, fault notification, routing change informa-
tion, and so on. (Some of these control functions will be explored in the chapters
following.) It is vital in many casesto ensure rapid distribution of these conrrol
messages.Yet without establishing a priority, they could easily queue up behind
much longer data packets, delaying their arrival at the necessarydestination
points.
As a specific example, consider a network connected by 9600 bps transmis-
62 Introductionto QueueingTheorY
sion links. We designate data packets by the label 2, control packets by the label
1. Data packets are on the average 960 bits long, or l/pz:0.1 sec, with a
variance o/: 2(l / p2)2,or E(22) : 3(l / ttz)z.Control packets, on the other hand,
are all 48 bits long, so that | / p, : 5 msec. In this case of fixed packet lengths
o?: O.Focus on a single queue, served FIFO, that drives the outgoing trans-
mission link. Let 20 percent of the total traffic be due to the short control
packets, 80 percent to the much longer data packets. We thus have ,lt : 0.27,
),2:0.84, with rt the composite arrival rate at the queue in packets/sec. It is
apparent that without priority the queueing of the combined traffic stream can
be modeled asanM/G/ I queue. The combined traffic intensity is p: pr l pr.
Since pagkets of either kind arrive randomly, with rates ,1rand i2, respectively,
the second moment of the composite stream is given by the weighted sum of the
second moments:
Ekz\:\urrtt+4nrr3t
i "' l "''
Say that the effectivep is 0.5, to be specific. The total arrival rate is then.l : 6.17
packets/sec, and using Eq. (2-65), the average waiting time for either type of
packet is readily found to be 148 msec. The 48-bit control packets, requiring 5
msec for transmission, frequently may be trapped behind the much longer
1OO-msecdata packets, and must wait, on the average, 148 msec for transmis-
sion! The obvious solution is to provide a higher priority to the control packets,
enabling them to bypass the lower priority data packets on arrival and to move
directly to the head of the queue.
Two types of priority are normally employed: nonpreemptive and pre-
emptive. In the former case, higher-priority customers (packets in our exam-
ple) move ahead of lower-priority ones in the queue but do not preempt lower-
priority customers already in service. In the preemptive priority case,service on
a lower-priority customer is interrupted and only continued after all arriving
high-priority customers have been served. We focus here on the nonpreemptive
priority case only.
Returning to the example just given, the caseof short control packets and
longer data packets, we shall show that providing nonpreemptive priority to the
control packets essentially halves their wait time to 74.5 msec, on the average,
while increasing the wait time of the data by an inconsequential amounr. If this
reduction is not sufficient in a real situation, preemptive priority may have to be
employed. (There is a price paid, however: Customers whose service is inter-
rupted must be so tagged. This entails added processing time and overhead,
which may reduce some of the benefits theoretically obtained through pre-
emption.)
To be more general, say there are r classesof customers to be served at a
queue. Their respective arrival rates are )4, A2, , 7r, each representing
2-6 . Nonpreemplive PriorityQueuelng Systems 63
a Poisson stream. The average service time is l/p1 for the ftth class, fr: l,
2, . , r. The highest-priority classis taken to be I , the lowest r, in descending
order as labeled. We now show how one computes the average waiting time for
any class,assuming nonpreemptive service. Consider classp ( I < p < r) in partic-
ular. Let a typical customer of this classarrive at an arbitrary time 16. Its random
waiting time Wo (Fig. 2-30), measured from its arrival time until it enters
service, is due to contributions from three sources. It must wait a random
amount of time To until the customer currently in service completes service. It
must wait a random number T1 units of time until all customers of priority ft
lower than or equal to p, already enqueued at the arrival time 16, complete
service. Finally, it must wait a random time Tl to service customers of each classfr
of priority lower than p arriving during the wait time IVn.
Putting these observations together, we write
p p- |
Wp:To+ 2rr+ ) ri (2-77)
t-l t-l
To find each of the three average times in Eq. (2 - 78), note first that E([) is due
to an average number E(zrj customers of category I waiting in the system. Each
requires l/plunits of service on the average, so that we immediately have
E(Tr): E(*r)/p, (2-79)
But by Little's formula, we also have E(m1) related to the average wait time
E(Wr).Specifically,
E(mr): AF(W,) (2-80)
(2-80)
Customerarrives Servicebegins
t9 t1
higher-priority control packets has thus dropped to almost half of the original
value with no priority used, while the lower-priority data packets have had their
wait time increased by I msec in 148, an inconsequential change. This demon-
strates the improvement possible through the use of priority queueing.
Although the effect on the lower priority packets in this example is negligi-
ble, in other situations it might be much more noticeable. The fact is that as
some priority classes(the higher ones) improve their performance, others dete-
riorate. Interestingly, it is simple to show that a conservation law is at work here.
In particular, from Eq. (2 - 84), it is simple to show that the weighted sum of wait
times is always conserved. In particular, one finds that
with E(IV)given by Eq. (2-65), the wait time of the FIFO M/G/l queue.As
somewait timesdecrease,then, othersmustincreasein order to compensate. As
a check, in the two-priority examplediscussedhere we had, without priority,
pE(W):74 msec.With priority, pfi(W) + p&(W):74 msecas well. This
conservationlaw is a specialcaseof a more general conservationlaw for work-
conservingqueuesfirst developedby Kleinrock [KLEI 1965]. (Seealso [KLEI
1e761.)
IKLEI 1965] L. Kleinrock, "A ConservationLaw for a Wide Classof Queueing Sys-
tems,"Naaal Res.Logist. 12, 1965, l8l - 192.
Qluarterly,vol.
[KLEI 1976] L. Kleinrock, QueueingSystems,VolumeII: ComputerApplications,John
Wiley & Sons,New York, 1976.
66 Introducfionto QueueingTheory
" 2-10 Consider a finite M/M/I queue capable of accommodating N packets (cus-
tomers). Calculate the values of N required for the following situations:
l. P: 0.5, Pr : l0-3, l0-6
2.P:0.A, Pr:lQ-s, l0-6
Compare the results obtained.
2-ll The probability p^th^t an infinite M/M/l queue is in state n is given by p":
(r - p)p" p: 1/p.
a. Show that the average queue occupancy is given by
in Figs. 2-22 and 2-23, comparing the FIFO and LCFS service disciplines.
Carry out your own proof of Little's formula.
2-17 Consider the M/M/2 queue discussed in the text. Derive Eq. e-a\), rhe ex-
pression for the probability of state occupancy and Eq. (2-44), the equation for
the average queue occupancy. Plot pE(I) (normalized time delay) versus ,1,the
average arrival rate (load on the system) for the M/M/z queue, and compare
with two single-server cases: an M/M/I queue with service rate p and an
M/M/I queue with service rate 2p. Check Fig. 2-27.
2 - l8 Refer to the multiple (or ample) sewer and queue with discouragement examples
discussedin the text. Show that the state probability distribution and the average
queue occupancy are given, in both examples, by Eq. (2-47) with Eq. (2-48),
and Eq. (2-49), respectively. However, the average time delay and throughpur
are different in the two cases. Calculate these two quantities in both casesand
compare.
2-19 consideraqueue withageneral state-dependentdeparture (service)processp".
a. Explain why the average throughput is given by y:2{_rlt,F,.
b. Take the special case of the M/M/2 queue, p^: p, n : l; pn: 2p, n> 2.
Show that | : LtFr + 2p(l - po - p r). Show that this is just y : )., if p, and po
are explicitly calculated using Eq. (2-41).
2-20 A queueing system holds N packets, including the one(s) in service. The service
rate is state dependent, withp" : np, | = n < N. Arrivals are poisson, with aver-
age rate 7.
a. Show that the probability the system is in state a is the Erlang distribution of
E q .( 2 - 5 a ) .
b. Show that the averagenumber in the systemis given by Eq. (2-56).
c. Show that the averagethroughputisy: pE(n), in two ways:
l. Use l:2!_,p;p"
2. y: A(l - P"), Pu the blocking probabitity.
d. Little's theorem saysthat E(T) : E(")/y : | /pherc. Explainthis result (i.e.,
there is ao waiting time).
2-21 A queueingsystemhastwo outgoing lines,usedrandomlyby packetsrequiring
service.Each transmitsat a rate of ppackets/sec.When both linesare transmit-
ting (serving)packets,paeketsare blocked from entering-i.e., there is no buf-
fering in this system.Packetsare exponentially distributed in length; arrivals are
Poisson,with average rate 7. p : X/ p : | .
a. Find the blocking probability,Pr, of this system.
b. Find the averagenumber, E(n), in the system.
c. Find the normalized throughput y/p, with y the average throughput, in
packets/sec.
d. Find the averagedelay E(T) through rhe sysrem,in units of l/p. (Alterna-
tively, find E(T)/t /p.)
2-22 A data concentrator has 40 terminals connectedto it. Each terminal inputs
Problems 69
packets with an average length of 680 bits. Forty bits of control information are
added to each packet before transmission over an outgoing link with capacity
C: 7200 bps.
Twenty of the terminals input I packetr/10 sec each, on the average.
Ten of the terminals input I packet/5 sec each, on the average.
Ten of the terminals input I packet/2.b sec each, on the average.
The input statistics are Poisson.
a. The data units transmitted (called frames) are exponentially distributed in
length. Find (l ) the average wait time on queue, notincludingservice time and
(2) the average number of packets in the concentrator, including the one in
service.
b. Repeat ifthe packets are all ofconstanr length.
c. Repeat if the second moment of the frame length is E(r,) : 3(t/u)2;Vpis tli,e
average frame length.
2-23 Refer to the derivation of the Pollaczek-Khinchine formulas in the text.
a. Derive Eq. (2-69), the general expression for the average number of cus-
tomers in the queue.
b. For the caseof Poissonarrivals, calculate E(v) and of, following the procedure
in the text, and show that Eqs. (2-74\ and (2-76) result.
/
v2-24 Two types of packets are transmitted over a data network. Type l, control
packets, are all 48 bits long; type 2, data packets,are 960 bits long on the average.
The transmission links all have a capacity of 9600 bps. The data packets have a
vaianceof :2(l /lt)',with | /p2theaverage packet length in seconds.The type
I control packets constitute 20 percent of the total traffic. The overall traffic
utilization over a transmission link is p: 9.5.
a. FIFO (nonpriority service) is used. Show that the average waiting time for
either type of packet is E(W): 148 msec.
b. Nonpreemptive priority is given to the control packets (type l). Show that the
wait time of these packets is reduced to E(Wr) : 7 4.5 msec, whereas the wait
time of the data packets (typ. 2) is increased slightly to E(W2) : 149 msec.
2 - 25 Show that the average wait time of classp in a nonpreemptive priority system is
given by Eq. (2-8a).