0% found this document useful (0 votes)
93 views49 pages

2nd Chapter

This document provides an introduction to queueing theory and its application to analyzing data networks. It discusses how queueing theory can be used to model packet-switched and circuit-switched networks and quantify performance measures. The key concepts introduced are the single-server queue with Poisson arrivals and exponential service times (M/M/1 queue) and how this basic model can be expanded to more complex scenarios. State-dependent queues and queues with general service time distributions are also overviewed.

Uploaded by

AjeshSurejan
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)
93 views49 pages

2nd Chapter

This document provides an introduction to queueing theory and its application to analyzing data networks. It discusses how queueing theory can be used to model packet-switched and circuit-switched networks and quantify performance measures. The key concepts introduced are the single-server queue with Poisson arrivals and exponential service times (M/M/1 queue) and how this basic model can be expanded to more complex scenarios. State-dependent queues and queues with general service time distributions are also overviewed.

Uploaded by

AjeshSurejan
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/ 49

Introduction

to Queueing
Theory

This book focuses on the performanceanalysis of data networks. Although a


great deal of qualitative material, describing real networks and network archi-
tectures, appears, the emphasiswhere possible is on quantitative considerations.
These considerations involve the interplay among various performance param-
eters and how they relate to network resources that are to be controlled.
As noted in Chapter l, two generic types of networks are considered:
packet-switched and circuit-switched networks. In the packet-switched case,
packets-blocks of data of varying length-are transmitted over a network
from source to destination, following some routing path prescribed as part of
the network design. The transmission facilities are shared by packets as they
traverse the network. In the circuit-switched case, a transmission path end to
end is set up for a pair of users who desire to establish a call. (The data flowing
could equally well be voice or data messages.)The number and length of packets
entering or traversing a network at any time, the number of calls arriving at a
network entrance point in a given time, the length (the holding time of these
calls)-all of these parameters generally vary statistically. In order to come up
with quantitative measures of performance, therefore, probabilistic concepts
must be used to study their interaction with a network. Queueing theory plays
a key role in the analysis of networks, and this chapter covers the basic princi-
22 Introducfionto 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

Figure 2-l Model of a single-serverqueue


Inlloducfion to Queueing Theory 23

tomers" queueing up for service. The packets arrive randomly, at an average


rate of ,1.packets/time (we shall use units of packets/sec most often). They queue
up for service in the buffer shown and are then served, following some specified
service discipline, at an average rate of p packets/time. In the example of Fig.
2-1, only a single server is shown. More generally, multiple servers may be
available, in which casemore than one packet may be in service atany one time.
The concept of a server is of course well known to all of us from innumera-
ble waits at the supermarket, bank, movie house, automobile toll booth, and so
forth. In the context of a data network, the server is the transmission facility-
an outgoing link, line, or trunk (all three terms will be used interchangeably in
the material following) that transmits data at a prescribed digital rate of C data
units/time. Most frequently, the data units are given in terms of bits or charac-
ters, and one talks of a transmission rate or link capacity C in units of bits/sec or
characters/sec. A transmission link handling 1000-bit packets and transmitting
at a rate of C : 2400 bps, for example, would be capable of transmitting at a rate
of p: 2.4 packets/sec. More generally, if the average packet length in bits is
| / p' bits, and is given in units of bits /packet", p : p'C packets/sec is the trans-
mission capacity in units of packets/sec. (For circuit-switched calls, the "cus-
tomer" would be a call; ).arrivals/sec represents the average callarrivalrate, or
the number of calls/sec handled on the average. The parameter | /p, in units of
sec/call, is called the average call holding time.)
It is apparent that as the packet arrival rate I approaches the packet rate
capacity p, the queue will start to build up. For a finite buffer (the situation in
real life), the queue will eventually saturate at its maximum value as,l.exceedsp
and continues to increase. If the buffer is filled, all further packets (customers)
are blocked on arrival. We shall demonstrate this phenomenon quantitatively
later in this chapter. If for simplicity the buffer is assumed to be infinite (an
assumption we shall make often to simplify analysis),the queue becomes unsta-
ble as ,t + p. We will show that ,1( I to ensure stability in this caseof a single-
server queue. In particular, we shall find the parameter p=l/tt playing a
critical role in queueing analysis. This parameter is often called the link uti.li.za-
tion or trffic intensify. Note that it is defined as the ratio of load on the system to
capacity of the system. For a single-serv€r queue, as p approaches and exceeds
one, the region of congestion is encountered, time delays begin to increase
rapidly, and packets arriving are blocked more often.
To quantify the discussion of time delay, blocking performance, and packet
throughput (the actual number of packets/time that get through the system),
and their connection with both p (the packet rate capacity) and the size of the
buffer in Fig. 2 - 1, one needs a more detailed model of the queueing system.
Specifically, those performance parameters among others will be shown to de-
pend on the probabilities of state of the queue. The state is in turn defined to be
the number of packets on the queue (including the one in service if the queue is
24 Infroductionfo QueueingTheory

nonempty). To calculate the probabilities of state, one must have knowledge of

l. The packet arrival process (the arrival statistics of the incoming packets),

2. The packet length distribution (this is called the service-time distribution in


queueing theory), and
3. The service discipline (for example, FCFS-first come-first served-or
FIFO service; LCFS-last come-first served; or some form of priority
discipline).
For multiple-server queues, the state probabilities depend on the number of
servers as well. (The servers represent the trunks or outgoing links simulta-
neously transmitting packets, or handling calls in the caseof a circuit-switched
system.)
In most of our work in this book we model the packet- and call-arrival
processesas Poissonprocesses. The Poisson process is the most frequently used
arrival process in queueing theory. For this reason we devote the next section to
a brief discussion of this process and show how it is related intimately to expo-
nential statistics.The simplest queueing system to analyze;the so-calledM/M/ |
queue, is one with Poissonarrivals and an exponential service-time distribution.
It is easy to obtain the probabilities of state of this queueing system for both the
finite and the infinite queue cases,as shown in Section 2-2. We then derive a
simple but general relation between average time delay and average number of
customers (packets or calls) in a queue, called Little's formula (Section 2-3).
This relation will be found useful throughout the remainder of this book.
Continuing our introduction to queueing theory in this chapter, we then
present two sections that generalize the M/M/l queue analysis.In Section 2 - 4
we show how one can analyze state-dependent queues. (This material will be
found particularly useful in the discussionof circuit switching in the latter part
of the book.) In Section 2 - 5 we consider a queue with a general service time
distribution and Poisson arrivals, the so-called M/G/l queue. This enables us,
as a special case,to determine the effect of fixed length packets. More generally,
we derive a very interesting and extremely useful expression for the average
time delay of a queue with general service (packet length or call-holding time)
statistics.The result appears as a simple modification of the M/M/l (exponen-
tial service time) time delay result. A brief discussionof priority queueing for the
single-server case follows t}neM/G/ I analysis.

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

Figure 2-2 Time interval usedin defining Poissonprocess

telephone traffic as well as in evaluating the performance of telephone switching


systemsand computer networks. Some of these analyseswill be presented later
in this book. In addition, the Poisson process has been used to model both
photon generation and photodetector statistics, to represent shot noise pro-
cesses, and to study semiconductor electron-hole generation phenomena,
among other applications.
Three basic statements are used to define the Poissonarrival process. Con-
sider a small time interval At (At - 0), separating times tandt * Al, as shown in
Fig. 2-2. Then,
l. The probability of one arrival in the interval At is defined to be l\t+
o(At),x AL,t <. l, and ,1a specified proportionality constant.

2. The probability of zero arrivals in At is | - ALt * o(At).

3. Arrivals are memoryless: An arrival (event) in one time interval of length At


is independent of events in previous or future intervals.

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

Figure 2 -3 Derivation of Poissondistribution

This is called the Poi'sson


di.stributi.on.It
is left to the reader to show that this
distribution is properly normalized (Zi-oF(}"): l) and that the mean or ex-
pected value is given by

E(k): inppl: tr (2-2)


t-0

The varianceofl= Elk - E(k)12: E$27- Ez(k)turns out to be given by


ofi,: E(h): tr (2-3)
This is also left as an exercise to the reader. The parameter i, defined
originally as a proportionality constant (seedefining relation I for the Poisson
process),turns out to be a rate parameter:
)": E(k)/T
from Eq. (2-2). It thus representsthe average rate of Poissonarrivals, as im-
plied in our discussionin the previoussection(seeFig. 2- l).
From Eqs. (2-2) and (2 - 3) it is apparent that the standard deviation o1of
the distribution, normalized to the average value E(l), tends to zero as 7T
increases:or/E(k): l/,,1)'7. This implies that for large 7T the distribution is
closely packed about the average value )"T.If one thus actually measuresthe
(random)number of arrivalsn in a largeinterval ? ("large" impliesrlT ) l, or
T > | / 1), n/T should be a good estimateof ,1.Note alsothat p(9 : e-n . As AT
increases,with the distribution pealtihg eventually about E(ft) : Li", the proba-
bility of no arrivals in the interval T approacheszero exponentially with T.
The Poissondistribution of Eq.(2-1) is easilyderived using the three
defining relations of the Poissonprocess.Referring to Fig. 2-3, consi{er a
sequenceof m smallintervals,eachA, unitslong. Let the probabilityof oneevent
(arrival) in any interval Ltbe p: AL,t,while the probability of 0 eventsis q :
I - LLt. Using the memoryless(independent) relation, it is then apparent that
the probability of ft events (arrivals) in the interval T: mLt is given by the
binomialdistribution

(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

f"(t):1t-t' z> o (2-5)


This exponential interarrival distribution is sketched in Fig. 2-5. For Poisson
arrivals the time between arrrivals is thus more likely to be small than large, the
probability between two successiveevents decreasing exponentially with the
time r between them.
A simple calculation indicates that the mean value E(z) of this exponential
distribution is

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

while its variance is given by


o7: l/12 (2-7)
The averagetime between arrivals is asexpected, for if the rate of arrivals is,l,
the time between arrivals should be l/),.
The fact that Poissonarrival statisticsgive rise to an exponentialinterarrival
distribution is easilydeduced from the Poissondistribution of Eq. (2- l).
Consider the time diagram of Fig. 2-6. Let r be the random variable
representing the time to the first arrival after some arbitrary time origin, as
shown. Take any value r. No arrivals occur in the interval (0, r) if and only if
z ) r. The probability that t ) r isjust the probability that no arrivals occur in

time origin arrival

Figure 2 - 6 Derivation of exponential distribution


2-'l . PoissonProcess 29

(0, x); i.e.,


P(r ) x): prgb. (numberof arrivalsin (0, x) : 0)
: e_u

from Eq. (2 - 1). Then the probability that ? < x is

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

f,(r):pe-u' r>0 (2-e)


But comparing Fig. 2-7 withFig.2-4, it is apparenr that if r, the time between
completions, is exponential, the completion times themselves must represent a
Poisson process!The service process is the complete analog of the arrival pro-
cess. On this basis, the probability of a service completion in the small time

time
f+-Service

Output

Figure 2 - 7 Service completions at output of a queue


30 Infroductionto QueueingTheory

interval(t,t* A,t)isjustpAt*o(Al),whereastheprobabilityof nocompletionin


(t, t * A,t) is I - lt\t + o(At), independent of past or future completions. The
exponential model for service carries with it the memoryless property used as
one of the defining relations of the Poisson process.
Before going on to our study of queueing, we introd,uce an additional
property of the Poisson process. Say that m independent Poisson streams, of
arbitrary rates i1 ,lz, . . . ,1-, respectively,are merged. Then the composite
stream is itself Poisson, with rate parameter 7:2i-t,1,. This is an extremely
useful property, and is one ofthe reasons that Poisson arrivals are often used to
model arrival processes.In the context of,packet-switched and circuit-switched
networks, this situation occurs when combining statistically packets or calls from
a number of data sources (terminals or telephones), each of which generates
packets or calls (as the case may be) at a Poisson rate. A simple proof is as follows:
LetN(0(t, t + A D b e t h e n u m b e r o f e v e n t s i n P o i s s o np r o c e s s i i
, : 1 , 2 , . . .,rn
in the interval (t, t * Al). Let N(t, t + Lt) be the total number of events from the
composite stream. Then

, + 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),

are independent.A similarcalcula-


1:2f:r,1.;, sincethe individualprocesses
tion showsthat
prob. [N(r, t + Lt): l] : LA,t* o(L,t) (2- l l)
This proves the desired relation.
Sums of Poissonprocessesare thus distribution conserving: They retain the
Poisson property. This property will be used implicitly in a number of placesin
this book in working out examples of queueing and buffering calculations.

2-2 TheM/M/l Queue


We now use the material of the previous section, on the Poissonprocess,to
determine the properties of the simplestmodel of a queue, theM/M/l queue.
This is a queue of the single-servertype, with Poisson arrivals, exponential
service-timestatistics,and FIFO service.The notationM/M/l used is due to
British statisticianD. G. Kendall. The Kendall notation for a general queueing
system is of the form A/B/C. The symbol A represents the arrival distribution,
B represents the service distribution, and C denotes the number of servers used.
2-2 t TheM/M/{ Queue 31

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

Figure 2-8 M/M/ I queue


32 Introductionto Queuelng Theory

n+1
Buffer
occupancy n
(state)
n-1

t t+at

Figure 2-9 M/M/ I state-time diagram

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

or set of states.Alternatively, a differential-differenceequationgoverningthe


time variation of p"(t) may be found by expandingp"(t + At) in a Taylor series
about I and retaining the first two terms only:

p*(t+ A,t): p,(t)+ 4!f tt ( 2- l 3 )

Using Eq. (2 - I 3) in Eq. (2 - I2a) znd simplifying,onereadilyobtainsthe follow-


ing equation:

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:

(1+ p)p": AP,-r* ltf ,+r n> | ( 2- l 5 )


This equation can be given a physical interpretation that enables us to write
it down directly, by inspection, without going through the lengthy process of
deriving it from Eq.(2-12). More important, using the approach to be de-
scribed, we shall be able to write similar equations down, by inspection, for more
general state-dependent queues later in this chapter. More complex queueing
systemsarising in the study of both packet- and circuit-switched networks will be
analyzed in a similar manner in later chapters.
Consider the state diagram of Fig. 2-10, which represents the M/M/I
queue. Becauseof the Poisson arrival and departure processesassumed, transi-
tions between adjacent statesonly can take place with the rates shown. There is a
rate i of moving up one state due to arrivals in the system, whereas there is a rate
p of moving down due to service completions or departures. Alternatively, if
one multiples the rates by A/, one has the probability,lA, of moving up one state
due to an arrival, or the probability pA,t of dropping down one state due to a
service completion (departure). (If the system is in state 0, i.e., it is empty, it can
only move up to state I due to an arrival.)
The form of Eq. (2 - l5) indicates that there is a stationary balance principle
at work: The left-hand side of Eq. (2- l5) represents the rate of leauingstate n,
given the system was in stzte n with probability p". The right-hand side repre-
sents the rateof enteringstate n, from either state n - I or state n * l. In order
for stationary state probabilities to exist, the two rates must be equal.
34 Infroductionto Queueing Theory

-v "' . ,,'.-}\.-1\.v...
oX-z ix-zi\ n_N__/r\_/*itr-
pp Itp

Figure 2-10 Statediagram,M/M/l queue

Balanceequationsplay a key role in the studyof queueingsystems.We shall


encounter similar equationslater in this chapter in studying state-dependent
queues;in Chapter 5, in studyingqueueingnetworks;and in later chapters,in
studying more complex queueingsysremsarising as modelsof data networks.
The relation of balanceequationsto time-invariantor equilibrium stateproba-
bilitiesis exploredrigorouslyand at length in the seminalbook by Kelly [KELL].
The solutionof Eq. (2 - l5) for the stateprobabilitiescanbe carriedout in a
number of ways.The simplestway is to again apply balancearguments.Con-
sider Fig. 2 - I l, which represenrsrhe statediagramof the M/M/l queueagain
drawnas in Fig. 2-10, but with two closed"surfaces,"I and2, sketchedas
shown. If one calculatesthe total "probability flux" crossingsurface l, and
equatesthe flux leaving (rate of leaving state n) to the flux enrering (rate of
entering staten), one getsEq. (2 - l5). Now focuson surface2, which encloses
the entire set of points from 0 to a. The flux entering the surface is pp,*r; the
flux leavingis 1p.. Equating thesetwo, one gets
hPn: ltPn+r (2- l6)
It is left to the reader to show that this simple balance equation does in fact satisfy
Eq. (2 - l5). The intuitive concept of balancing rates of departure from a stareto
rates of entering that state thus not only allows a balance equation to be set up
(Eq. (2 - I 5)), but a solution to be obtained as well! Repeating Eq. (2 - 16)n rimes,
one finds very simply that

Pn:P"Po P=A/lt (2-17)


To find the remaining unknown probabilityp0,on€ must now invoke the prob-
ability normalizationcondition

2p":r

IKELL] F. P. Kelly, Reaersibility


and Stochastic
Netutorks,
JohnWiley & Sons,Chichester,
u . K . .r 9 7 9 .
2-2 t The M/M/{ Queue 35

Surface2

n +1

Surface 1

Figure 2-ll Flow balance, M/M/l queue

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,

P":Q-DP" P=l/ttll (2- l8)


as the equilibrium state probability solution for the M/M/I queue. Note the
necessarycondition p : 1/ p ( l, which was alluded to earlier. Its significance,
again, is that for equilibrium to exist the arrival rate or load on the queue must
be less than the capaci,ty1r. If this condition is violated for this infinite queue
model, the queue continues to build up in time, and equilibrium is never
reached. Mathematically, the fact that equilibrium exists only for p I I is noted
by considering the limiting casep: I. SinceFo:0 - p),Fo: 0. But from Eq.
(2-tO), Fr: pFo:0, Fr:0, . . . A l l t h e s t a t i o n a r yp r o b a b i l i t i e sa r e t h u s
zero, a contradiction, and equilibrium does not exist. More detailed and general
discussions of conditions for equilibrium in the context of Markov processes
appear in [COX]and IKELL].
TheM/M/ I stateprobabilitydistribution of Eq. (2- I8)iscalleda geometric
distribution.An example, for p:0.5, appearsin Fig. 2-12. Note that since the
probability the queue is empty ir po : | - p, the probability that the queue is
nonempty is.just p, the utilization.
Now consider the extension of this analysis to the case of a f.nite queue,
accommodating at most N packets. A little thought indicates that the governing
balance equation, Eq. (2 - l5), is unchanged except for the two boundary points
36 Introducfionto QueueingTheory

0.5
+ oo
II

n
- 0l

Figure 2-12 M/M/l p:0.5


stateprobabilities,

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

It is left for the reader to show that

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

Figure 2- 13 Relation between throughput and load

definedasthe averagenumber of arrivals/sec,is shownappliedto a queue.With


the probability of blocking given by P, , the net arrival rate is then ,l( I - Pr). But
this must be the sameasthe throughput Jr,or the number of customersserved/
secfor a conservingsystem.We thus have
y: 7(l - P") ( 2- 22)
asshownin Fig. 2-13. (A more detaileddiscussion, in the contextof blockingin
circuit-switchedsystems,appearsin Chapter 10.)
One cancalculatethe throughput anotherway,however,by focusingon the
output of the system.In particular,for a single-server queue,the type of queue
under discussion,the averagerate of servicewould be p, in customers/sec
servedon the average,f the queuewere alwaysnonempty.Sincethe queueis
sometimesempty, with probabilitypo, the actualrate of service,or throughput
y, is lessthan p. More precisely,T: pQ - Fo),since(l - Po)is the probability
that the queueis nonempty.(Solong asthere isat leastone customerin a queue,
the averagerate of servicewill be p.) (l - 1o)is thus the (single-server)
utiliza-
tion. As a check,considerthe infinite M/M/I queue.There is no blocking in
that case,and the throughput y : l,the averagearrival rate. We must thushave
l: p(l - Fo),or Fa: | - p, p: l/tt,just as found earlierlIn the caseof the
finite M/M/l queue, we equate the net arrival rate,1(l -Pr) to the average
departure rate p(I - p6)(seeFig. 2- l4), to obtain
y : 1(r - P): tt(r - Po) (2-23)
It is left to the readerto show,usingEq. (2 - l9) in Eq. (2 - 23),that the blocking

?=tr(1- Psla t=p(-Po)

Figure 2- 14 Throughput calculation,single-serverqueue


38 lntroducfionto QueueingTheory

probability is in fact given by


Pa: Fw: (l - p)p*/(l - pN+t) (2-24)
for the frniteM/M/ I queue.
This equationfor the blocking probability can be usedfor a simpledesign
calculation.specifically,what shouldthe queuesizeN be to providea prescribed
blocking performancePr? From Eq. (2-2q this alsodependson p. For a small
blocking probability, Eq. (2-2! may be simplified.With p ( I and N ) I we
have
P" = (l - p)pN pN+t < | (2-25)
This is just the probability that the infinite queue is ar stare n : N and indicates
that for small P, the probability that the finite queue is at srate n : N could just
as well be calculated by assuming an infinite queue. Truncating the infinite
queue at n: N does not affect the queue statistics measurably if p* < t.
As examples of the use of Eq. (2-25),let p:0.5. Then for P3: l0-3,
N = 9 customers that have to be accommodated. For a packet-switched net-
work, the concentrator need only be capable ofhandling 9 packets. IfP, : 1g-o
is desired (one customer in 106 is rejected on the average), and p:0.b, the
number rises to N = 19. Larger values ofp (increased traffic) give rise to corre-
spondingly larger values of N. As a simple example, say a concentrator in a
packet-switched network handles packets thar are 1200-bits long on the aver-
age. For a 2400-bps capacity line, the average transmission capacity is p: 2
packets/secthatcanbedeliveredto the line. Forp: 0.5,l: I packet/secisthe
allowable load on the concentrator. For a blocking probability of l0-3, then, rhe
line queue should be capable of accommodating 9 packets of average length
1200 bits. For P, : l0-6, this rises to l9 such packets.
Returning now to Eq. (2 - 20), the expression for the equilibrium srare
probability of the finite M/M/ 1 queue, we nore that the condition p ( I is no
longer required for the equilibrium probabilities ro exist. since the queue is
finite, the probabilities exist and are given by Eq. (2 - 20) for all values ofp. Note
in particular that as the load 7 increases with respect to the capacity lt (p:
7/ tt - co),the queue fills up more often and, in the limit of A --+cD,staysat state
n : N with a probability of l. From Eq. (2-20), Fn- 0, n t'N, as p +o, and
Fx - l, p - 6.The region p ) I is said to be the congested, region; the higher
queue statesare more probable. The blocking probability P, : p, approaches I
as p'--'>o. This is shown in Fig. 2-15, which plots P, as a function of the
normalized load p: A/tt.It is readily shown, using L'H6pital's rule, that pr:
I / ( N + l ) a t p : l . F o r N : 9 , a s a n e x a m p l e ,P r : l 0 - 3 a t p : 0 . 5 , r i s e sr o
P": 0.1 at p: l, is approximately 0.5 zt p: 2,and continuesto increaseto I as
p - 6.This indicates the queue is often blocked for p in the congested region.
The throughput of the queue, closely equal to the load,[ for small p, evenru-
2-2 . The M/M/1 Queue 39

+
I
I
PB

1
(N+1)

Figure 2 - l5 Blocking probability, finite M/M/l queue,congestedregion

ally levels off and approachesthe throughput capacityp as p increases.The


specific expression for the normalized throughput y/p as a function of the
normalized load p : )./ p is obtained by using Eq. (2 - I 9) in Eq. (2 - 23). This
gives
y/p: Q - Po): dr - p*)/(r - pN+r) (2-26)
Equation(2-26) is sketchedin Fig. 2-16. Atp: l, it is readily shownthat
y/p:N/(N * 1) as indicatedin Fig. 2-16. For N:9, then, y/lt:0.9, at

1
N
Normalized ( A ,+ 1 )
throughput,
lp

01
load,p
Normalized

Figure 2 - 16 Throughput-load characteristic, finite M/M/l queue


40 Infroductionto QueueingTheory

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

E("): 2"p": p/(r - p) (2-27)


n-O

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,

Figure 2-17 Average queue size,M/M/ I queue


2 - 2 t T h eM / M / 1 Q u e u e 41

Figure 2 - l8 The environment of Little's formula

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

AEQ): E(n) (2-28)


The relations among these three quantities are diagrammed in Fig. 2- 18. We
shall provide a proof of this expression in the next section. Suffice it to say here
that the relation is very general and is valid for all types of queueing systems,
including priority disciplines. The parameter ,1is interpreted to be the arrival

[LITT] J. D. C. Little, "A Proof of the Queueing Formula L: AW:' OperationsRes.,


v o l .9 , n o . 3 , 1 9 6 1 ,3 8 3 - 3 8 7 .
42 Infroducfionfo QueueingTheory

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:

E(T): E(w)+ r/1r (2- 3o)


The connection between E(T) and E(W) is diagrammed in Fig. 2-lg. Little's
theorem enables us to find an explicit relation for the average number of

Figure 2- l9 Little's formula applied to M/M/l queue


2-2 t The M/M/1 Queue 43

1
pE(T\

P=\lp
0.4 0.6 0.8 1.0

Figure 2-20 Normalizedtime delay,M/M/l queue

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.

* The queue mtstbeworkconseraing,in the sensethat if there is work to be done-i.e., a


customer to be served - the customer will be served, and that a customer is not rejected
once admitted into the system.
4 lnfroductionto QueueingTheory

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

tr(r): n(r)/r (2-32)

Figure 2 - 2l Derivation of Little's formula for a queueingsystem

f This sectionfollows the approachof Kobayashiin [KOBA].


tKOB+l t{' K,opayalhi,;Uodelingand Analysis:An IntroductiontoSystem
Performance
Eual-
uationMethodology, Addison-Wesley,Reading,Mass.,I 978.
2-3 . Little'sFormulo,L: ll/ 45

Arrivals--> t (Time)

Departures----+ t\ ti t6 th f6 t6

Figure 2-22 Anivals and departures, FIFO (FCFS)queueingsystem

(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

Consideralso the expression

This must representthe auerage


L(r):
I L(t)dt/r

numberof customersin
(2- 35)

the systemin the interval


(0,2),sinceZ(t) is the number at time L From Eq. (2-33), there is a close
connectionbetweenW(t) and l,(z). In particular,usingEqs.(2-34) and (2 - 35)
in Eq. (2 - 33) and recallingthe defining relation Eq. (2 - 32) for the arrival rate
),(t), we have simply
n(r)w(r)/t : L(t): ).(r)w(t) (2- 36)
This isjust Little's formula derived for the specialcaseof FIFO serviceand
over a finite interval (0,2). Now let T --->@ and assumethat the quantitiesof
interest all approachdefinite limits:
w(r)+w, ).(t)- 1, L(t)"->L
We then get Little's formula
L:7W (2-37)
with Zthe averagenumber of customersin the queueingsystem,Wthe average
waiting time, and tr the arrival rate. This result is easilyextendedto includethe
servicestationas well.
That Little's formula Eq. (2 - 37) holdsgenerallyfor anyservicedisciplineis
shownas follows. Consider
n(tl n(tl

2w,:2aj- t)
j:r j:r

from Fig. 2-22. This may be rewrittenas


n(t) r(r) n(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

Figure 2-23 Arrivals and departures,LCFS discipline

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

I,p^: lln+rFn+r (2- 3e)

(Arrivalrate) (Departure
rate)

Figure 2-24 State-dependent queueing sysrem


2-4 . Stote-dependent
Queues:Birh-deoth
Processes 49

trn-t In \n+1

. .\.i\.^.7.. .
-r'\.,__z-r__z__.
n-1 Pn
ttal
" ltn+'l

Figure 2-25 Statediagram,state-dependenr


queue(birth-deathprocess)

This is to be comparedwith the earlier equation,Eq. (2 - l6), representingthe


solution for the M/M/l queue with state-independentPoissonarrival and
departure processes.Using Eq. (2 - 39), it is left ro the reader to showthat the
equilibrium probability p^ for the birth-death process,or srate-dependent
queueingsystem,is given by

z-l

F,lPo: lf l,/fltt, (2-40)


i-0 i- I

The unknown stateprobabilitypofor a finite queueholding at mostN customers


is again found by invoking the normalization condition 2I-o P": l. Such a
queueingsystemwill alwaysbestable.For the infinite queue(N + o;, stabilityis
again ensuredby having Po) 0.
Someexamplesof the applicationof theseresultsare of interest.Consider
first the caseof two outgoing trunks (transmissionlinks)connectinga statistical
concentrator or packet switch to a neighboring packet switch, or node, in a
packet-switched network. Data packetsuseeither one of thesetwo trunks ran-
domly. What effect doesadding a secondtrunk have on the operationof the
system?Assumethat packetsarriving at the output queue driving the double
transmissionJinkfacility obeya Poissonprocesswith averagerate.tr.Packetsare
againassumedto be exponentiallydistributedin length,with an averagelength
l/1tin sec.The model for the resultantqueueingsystemis then the one in Fig.
2-26.It is preciselythat of an M/M/2 queue.
Considerthe operationof thissystemnow. If only onepacketisavailablefor
transmission,it is immediatelyservicedby either trunk, at the servicerate p. If
two or more packetsare available,both trunks are occupied.Becauseof the
exponential servicelength assumptionmade, the probability of eithertrunk
completing servicein the interval (t, t + Lt) is pAt, and the probability of one
completionin the sameinterval is2 pLt. (Under the exponentialassumptionthe
probability of bothtrunks completing a transmissionin the sameinfinitesimal
interval is o(Al), and hencegoesto zero asA, + 0). But this systemis precisely
that of a birth-deathsystem,with .i" : ,1,,independentof n, andpn: p, n : l,
50 Introducfionto Queueing Theory

\€

Figure 2-26 M/M/2 queue

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)

The average queue occupancy is readily shown to be given by

E(n):i*,:& p: A/2p (2-44)

This is alwayslessthan the averagequeue occupancyfor the M/M/I case,


E(n)lrrun: p/(I - p), p= 1/P, as expected.The averagetime delay inthe
queue,wait time plus servicetime, is readily obtainedusing Little's formula:
E(?): E(n)/A:r/p/(r- p2) P=A/2P (2-45)
2-4 t Stote-dependenrQueues:Biffh-deofhProcesses 51

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

Figure 2 - 27 P erformance characteristic, M /M / 2 queue


52 Infroducfionto Queueing Theory

because,with probabilitypo, the queuemay be empty;with probabilitypr, only


one serveris utilized. The averagethroughput for the two-servercaseis there-
fore just
r:ph+2p(r-Fo-F) (2-46)
For the infinite M/M/2 queue, with no blocking, this should bejust the average
arrivaf rate or load on the system l. Introducing the values for psandpl for the
infinite queue case from Eq.(2-42) and,Eq. (2-a3), respectively,one finds
this to be precisely the case. This is the reason for introducing the parameter
p: 1/2p to represent the ratio of load to maximum transmission capacity
of the system.
The second and third examples we discusscan be considered together. The
second example extends the M/M/2 casejust treated to the case in which a
server is made available to any customer entering the system. In both the
packet-switched and the circuit-switched cases this implies that the number of
transmission links or trunks is always equal to the number of packets or calls
desiring transmission. Thus there is never any queueing up for service or any
possibility of blocking. The model for this is simply lt,: np,for alln, if exponen-
tial service is again assumed. We again take the arrival rate to be Poisson, with
average rate )r. For the infinite queue case, the queue structure one gets is then
called the M/M/a queue. For this case,from Eq. (2 - 40), one finds quite readily
that

F,/fo: Q"/P)"/nl (2-47)


and that

Fo:e-P P=A/P (2-48)


The probability of state occupancy is, in this case, given by the Poisson distri-
bution.
The third example is called a "queue with discouragement." It models a
system with customer flow control at the input. Specifically, for this model we let
the state-dependent arrival rate )"nbe given by l^: )"/(n + l), with 1a known
constant. Only a single server is available in this case, so that po: p, for alln.
This example could be used to model moviegoers or shoppers who arrive at the
movie theatre or supermarket and find only a single line to serve them. When
the line becomes too long (rzis large), they are discouraged and turn away. In the
context of packet transmission the arrival model represents one in which the
maximum possible arrival rate is ,1.As the queue length n increases,a system
controller discourages packet arrivals (either by blocking or by shunting some
arrivals elsewhere), so that the actual arrival rate decreasesas ?oincreases.(Flow
control in packet networks will be described in Chapter 5.) For this example, a
little thought will indicate that the probabilityp" of queue occupancy is precisely
2-4 . Stote-dependentQueues:Birrh-deothProcesses 53

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

E(n): )nO,: p: l/p (2-4e)


a:0

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

EQ): E(n)/).: r/p (2-50)


usingEq. (2-49).Butthisispreciselytheresultexpectedsince,withthenumber
of servers always equal to the number of customers (packets or calls) in the
system, there is no queueing, and the time delay is just the average service or
transmission tirrr'e | /p. As a check, consider the throughput l, as calculated at
the system output. For a state-dependent departure (death) processthis must be
the average departure rate, found by averaging over all the departure rates,1,,
for all n. Specifically, in this case, with Fn: ftlt, we have

/: i tt,f,: t, tnp^: pE(n):A (2-51)


n:O n-O

invoking Eq. (2-a9) to obtain the last result.


Consider the third example now, that of the queue with discouragement.
Here, since the input arrival rate is state dependent, one must average over all
the states to find the average arrival rate or throughput of the system. We thus
have

/ : i l,P,: tt(r- e-o) p: 1/p (2-52)


n-O

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

form of the result in Eq. (2 - 52), by recallingthat for a single-serverqueueof


capacity1t, the throughput isjust p(1 - po).From Eq. (2 -a8) one immediately
obtainsEq. (2-52).
Using Eqs.(2 -a9) and(2-52), one now finds the normalizedaveragetime
delay in the systemto be given by
pEQ): pE(n)/y : p/(r - e-P) p: l/p (2-53)
For small p (p < 1), the time delay is just l/1t,the average transmission or
service time, as expected. The throughput is just / : ,t in this case, from Eq.
(2-52). As the parameter p: l/p increases, the throughput approaches the
maximum value p, while the normalized time delay continues to increase lin-
early with p, reflecting the fact that the average queue occupancy E(n): p, a
linear increase with p. No limit is required on p in this caseto ensure stability,
since the flow (discouragement) control serves to keep the system stable even
though p increases indefinitely. Alternatively stated, the Poisson distribution
form for p, , given by Eqs. (2 - a7) and (2 - 48), ensures that ps ) 0 for all p, and,
the system remains stable as p increases. Equation (2-47) implies that higher
states become more probable asp increases, with a corresponding increase in the
average state occupancy E(n).
The fourth example is a special case of the M/M/o queue, with a finite
number of servers and no waiting room. Specifically, let pn: np, | = n 3 N,
ln: l, and block all arrivals if n: N. This is often written as an M/M//N/N
system. It models a system in which customers arrive according to a Poisson
arrival process with average rate A and always find a trunk (transmission link)
available until a maximum number of trunks is occupied. At this point cus-
tomers arriving are blocked. This model, with the addition of the exponential
service time assumption, has been used for many years as a basic design model
for telephone exchanges; it will be discussedand used in detail in Chapter 10. A
conceptual diagram appears in Fig. 2-28. We focus on the circuit-switched
(telephone) terminology. N servers (trunks or transmission links) are available to
handle calls. When all trunks are occupied, further calls arriving are blocked.
Since there is no queueing (no waiting room) allowed in this system,it is referred
to as a pure loss system. The performance parameter of interest in the circuit-
switched (telephone) application is the probability of blocking P.p.The solution
here is readily obtained. Since p, : npand Ln: A, one finds, using Eq. (2-40)
and invoking the normalization condition
N

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

Figure 2-28 M/M/N/N system:no waiting room

In particular, blocking occurswith n : N, so that the blocking probability is


given by
D _ PN/NI
P n:f p:l/tt (2-55)
2 P'/a
This equation for the blocking probability is often called the Erlang-B distribu-
tion, Erlang distribution of the first kind, or the Erlang loss formula, after the
great Danish engineer A.K. Erlang, who first studied the traffic performance
of telephonesystemsusing a statisticalapproachin the early part of the twen-
tieth century. We shall refer to this equation in detail in Chapter l0 in our
discussionof circuit-switchedtraffic analysis.There we shalladopt the symbolA
in placeof p to representthe total normalized load or trafficintensity )"/1ton the
systemjThe units of ,4 are given in terms of Erlangs.
It is left for the readerto showthat the averagenumber of callsin the system
is
E("): Ar - P") p: l/p (2- 56)
As the traffic intensity p increases,Pa - | and E(n) -+ N. The throughput 7, in
callsper unit time acceptedby the systemand hencedeliveredat the output, is
again
y: 1(l - Pa) (2-57)
Averagingover the state-dependent
servicerate at the output of the system,one
also finds
Iv
y: > p;P,: ttE(n) (2- 58)
a-0
56 Introductionto Queueing Theory

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.

2-5 MlGl{ Queue:MeonVolue


Anolysis
In the previous section we extended the M /M / | queue analysis to the case of
state-dependent arrival and service times (the birth-death process). The state-
dependent model is extremely useful and is frequently used, as indicated by
some of the examples. However, it still relies on the Markov memoryless prop-
erty for both the arrival process and the service-time distribution. In this section
we extend the analysis to one other case, that of a general service-time distribu-
tion. Packets or calls may thus have an arbitrary (but known) length or service
distribution. However, the arrival process will be taken to be Poisson, a single
server is assumed, and the queue buffer size (waiting room) is taken to be
infinite. Such a queue is called an M/G/l queue, using the Kendall notation,
with G obviously standing for general service distribution.
For simplicity, in this section we shall focus on o,aer&ge(mean) occupancy
and aaerage time delay only. More general discussions appear in books on
queueing theory. The book by L. Kleinrock is a particularly good example
[KLEI l97lal. A brief discussionappears in [SCHW 1977], Chapter 6. We shall
show that the average queue occupan cy E(n) andthe average time delay through
the queue E(T) are given, respectively, by the following rather simple-looking
expressions:

E(n):(, _ t - - p2o2)l (2-60)


r-)r tr,
[KLEI I 975a] L. Kleinrock , QueueingSysterns.
Volurne1: Theory,JohnWiley & Sons,New
York, 1975.
[SCHW 1977]M. Schwartz,Cornputer-CornmunicationNetuork Designand Analysis,Pren-
tice-Hall,EnglewoodClitrs, NJ., 1977.
2-5 . M/G/l Queue: Meon Volue Anolysis 57

and

E(r):+:#t -te - pzo2)l (2-61)

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,

E(n):h('-;) o2:o (2-62)


and

E(r):#('-;) o2:0 (2- 63)


A queue of this type, with fixed customerservicetime, is called an M/D/I
queue.The letter D representsdeterministic servicetime. This is then a special
caseof the M/G/l queue, with the smallestpossiblequeue occupancyand
delay. Note that for p not too large,E(n) and E(r) may b-eobtainedlcorri.ruu-
tively)by using the M/M/I resuhs.For p -.- l, the MiD/ I resulrsdiffer bv b0
percent from the M/M/ | values.
The_interestingthing is that for the generalM/G/r resurrsof Eqs.(2-60)
.
and (2-61) the dominantbehaviorof averagequeueoccupancy and time delay
is alwaysrhe | /(l - p) term of the denominatois.A/l infinlte buffer queues,no
matter what the service distribution, thus tend to exhibit the samequeue-
congestionbehaviorasp: 1/p - L Thosewith larger variancein their slrvice
distribution produce larger queue occupancyand t-imedelay,on the average.
58 Infroducfionfo QueueingTheory

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:

E(w):ffi (2- 65)

The term E(22) is the second moment of the service-time distribution, given by
E(tz):o2*l/1t2

This is obviously a simpler expression to remember than the Pollaczek-


Khinchine form of Eq. (2 - 6l ). It will be used in the next section in discussing
the wait time in priority queues.
The derivation of Eq. (2-60) for the average queue occupancy E(z) pro-
ceeds in a manner difierent from that used in theM/M/l analysis. Because of
the condition of general service-time statistics, with the corresponding lack of a
memoryless property for service departures, one can no longer set up a simple
balance equation for the states ofthe queue. Instead we use an approach that
focuses on the change in buffer (queue) occupancy at the conclusion ofservice,
i.e., the departure time. Specifically, label the time at which the jth customer
departs the queue by the numberj. The number of customers (packets or calls)
remaining in the queuejust after the departure is represented by the number rz7.
A timing diagram indicating these quantities appears in Fig. 2-29.
A simple relation may be written connecting the number of customers in
the queue at time j to the number at time U - l). Let v, be the number of
customers arriving during the service interval of thejth customer. Then n, and
ni-r zre obviously connected by the relation
n,: (ni-r - l) * v, ni-r> |
:uj
(2- oo;x
nyt: o

Equation (2-66), representing the queue dynamics for a general service-time


distribution, enables us to find the steady-statestatistics of the queue at seruice

* 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

Figure 2-29 Timing diagram, generalservice-timedistribution

completiontimes. For the special case of Poisson arrivals, on which we focus


shortly, one can argue, becauseof the memoryless property of the arrivals, that
the statistics found are the same at all points on the time axis.
Equation (2-66) may be rewritten in the following compact form:

ni: nyr - u(nr-) I vi (2 - 66a)


where tz(x)is the unit step function defined as
u(x):l x>l
-0 x<0
Now let the timej --+o and assumethat equilibrium hassetin. Taking expecta-
tionson both sidesof Eq.(2-66a), and notingrharE(n1): E(n1-),j - -,we get

E(v) : E[u(n)] (2-67)


E(u), the average number of arrivals in a service interval, will be expected to be
less than one for an infinite queue in order to maintain a stable queue, as
required for equilibrium. We shall show shortly that E(v) ( 1, and in fact corre-
sponds to the utilization p for a single-server queue, first encountered in the
M/M/l case.To demonstrate this, we note from the definition of the unit step
function u(n) that

Efu(n)l: f O,: prob.(n) 0) = p (2- 68)


z-l

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

Equations(2 - 66) and (2 - 66a)may be usedto obtain the stateprobabilities


of the M/G/l queue,usingtransformsor moment-generatingfunctions[KLEI
1975a], [SCHW 19771.For our purposes,as noted earlier, it sufficesto find
averagequeue occupancyonly. To do this, we employ a trick. Squarethe left-
and right-hand sidesof Eq. (2-66a), take expectations,and again let j --+o.
Notin g thzt E[uz(n)) : Elu(n)] : E(v) : p, tha;tElnu(n)l : E(n), andassuming u,
and ni-r to be independent (asis the casefor Poissonarrivals),one obtainsthe
following interestingresult after somesimplification:

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

E(v): hP(v : k) (2-70)


l-O

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

P(v: k1: ,r: ktr)f"(r)dr (2-72)


I
Focusing now on the M/G/l queue case, for Poisson arrivals we have

P(v : klr) : (),t)he-^,


/kl (2-73)
InsertingEq. (2 - 73) into Eq. (2-72), and then into Eq. (2-70), one findsafter
interchangingintegration and summationrhat
E (v):l n 1 r7 =p (2-74)

E(r): on o' (2-75)


[l
The definition of E(u), the average number of arrivals in a service interval, as the
2-6 . NonpreemptivePriorityQueueingSysfems 61

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

03: p * 12o2 (2-76)


with o2 the variance of the service-time distribution. In deriving this result, use is
made of the fact that the variance of the Poisson distribution equals its mean
value. Details are left to the reader.
Introducing Eq. (2 - 76) into Eq. (2 - 69), one obtains the desired Pollaczek-
Khinchine form, Eq. (2 - 60). Equation (2 - 6l ) for the average time delay (wait
time plus transmission time) through the queue follows directly from Little's
theorem. Alternatively, a much simpler form of the Pollaczek-Khinchine for-
mula results if one focuseson the average wait time E(w) in the queue. This was
noted earlier and the simple, compact form Eq. (2-65) for E(W) was derived
from Eq. (2-61) for the time delay E(7) through the queue. Equation (2-Ob)
will be found very useful in the next section in calculating the wait time in
nonpreemptive priority queueing systems.

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

Taking expectationsterm by term, the averagewaiting time E(IVp)of priorityp


is obviouslygiven by
P p-r
:E(ro) + )r(rr)
E(we) + > E(ri) (2-78)
t: I l- I

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

Figure 2-30 Waiting time, queueingsystem


64 Infroducfionfo Queueing Theory

Combining Eqs.(2 - 80) and (2 - 79), we immediatelyhave


E(Tt): pp(w) pn= ln/ttn ( 2- 8 1 )
Now considerthe term E(Z) in Eq. (2 - 78). This is due, on the average,to
E(rnzi)customersof classfr arriving during the interval E(Wp).Sincethe arrival
rate is.! and eachcustomeragain requires, on the average,| / ltrunits of service,
we immediatelv have
EQL) : )', E(Wo)/ ttt : prE(w) (2- 82)
Consider the remaining term E(Te) in Eq. (2-78). This is the residual
service time of a customer in service. For the work-conserving nonpreemptive
queueing system under discussion here (the server always serves a customer if
one is waiting to be served), this is independent of queue discipline: It must be
the same if customers of all ft classesare served with the same priority, in their
order of arrival. From Eq. (2-65), the average wait time of anM/G/ 1 queue,
we find that

E(7.): ),E(t2)/2: 2 lp?iltZ (2- 83)


t: I

This generalizes the two-class example described earlier.


Using Eqs. (2 - 82) and (2 - 8 I ) in Eq. (2 - 78) and solving for the wait time of
each classrecursively, starting with the highest priority classl, one readily shows
that

E(we): E(T1)/Q - op)(r- op-') (2-84)


with oo:If :r pn,p*: k/ltr, and E(7,) givenby Eq. (2-83).
As an example,considerthe two highest-priorityclasses.
For thesewe have
E(w,): EQ,)/Q - pr) (2- 85)
and
E(wr): EQ,)/Q - pr)Q- p)
: E(w,)/(r - p) (2-86)
p: h* pz
The highest priority, class I customers, queue up as in anM/G/l system of a
single class,seeing themselves only, except for the added residual service time
E(To) that is due to customers of all classesthat might have been in service.
In the special caseof two priorities only, the caseconsidered in the example
described at the beginning of this section,Eqs. (2-85) and (2-86) provide the
average waiting times for the two classes,respectively. Recall that with p : 0.5,
and for the numbers given earlier, the average wait time E(W) without priority is
148 msec. From Eq. (2-85), for the same example, we get E(Wr) :74.5 msec.
E(Wz), using Eq. (2 - 86), turns out to be 149 msec. The average wait time of the
Problems 65

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

2 ptnTr): pE(w) (2-87)


I- I

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.)

/ Z- t Refer to Fig. 2 - 3 in the text. Calculatethe probability of I independenteventsin


the m intervals A, units long, if the probability of one event in any interval is p,
while the probability of no event is q : I - p. Showhow one obtainsthe binomial
distribution of Eq. (2-a).
2-2 In Problem 2-l let p: ALt, I a proportionality factor. This then relatesthe
binomial distribution to the Poissonprocess.Let At - 0, with T: mA'tfixed.
Showthat in the limit one getsthe Poissondistribution of Eq. (2- l)' Showthat
the mean value E(l) and the variance of are both equal to lT. What is the
probability that no arrival occursin the interval T? Sketchthis asa function of T.
Repeatfor the probability that at leastone arrival occurs in ?.

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-3 CalculateandplotthePoissondistributiongivenbyEq.(2-l)forthethreecases


7T:0.1,1, 10. In the third caserry to carry the calculationand plot out to ar
leastA : 20. (Stirling'sapproximationfor the factorialmay be usefulhere.)Does
the distribution begin to crowd in and peakabout E(fr)aspredictedby the ratio
oh/E(k) : | /,11r?
2-4 Carry out the detailsof the analysisleadingto Eqs.(2- l0) and (2- I l), showing
that sumsof Poissonprocesses are Poissonas well.
2-5 Refer to the time-dependentequation(2- l2a) governingthe operationof the
M/M/I queue. Start at time t: 0 with the queue empty. (What are then the
valuesp"(0)?) Let )t/p: 0.5 for simplicity,takeAr : l, and pick ALtand pLtvery
small so that terms of (At)2and higher can be ignored. Write a program that
calculatesp"(t+ Lt) recursivelyasI is incrementedby Arand showthatp"(t)does
settledown eventuallyto the steady-state setof probabiliries{p,). Pick the maxi-
mum valueof ntobe 5. The setof steady-state probabilitiesobtainedshouldthen
agree with Eq. (2-20). Note:Eq. (2-l2a) musr be modified slightly in calcu-
lating ps(t* At) and pb( + Lt). You may wanr ro ser the problem up in marrix-
vector form.
2-6 Derive Eq. (2- l5), governingthe steady-state (stationary)probabilitiesof srare
of the M/M/ I queue,in two ways:
l. from the initial generatingequation(2-12)
2. from flow balancearguments involving transitions between statesr, - l, n,
andn + l, asindicatedin Fig. 2- I l.
2-7 Asageneralizationofthe M/M/l queueanalysis, considerabirth-deathprocess
with state-dependent arrivalsA^and.state-dependent departuresp". (SeeFigs.
2-24and2-25.) Show,by applyingbalancearguments,that the equationgov-
erning the stationarystateprobabilitiesis given by
( f , " * p ) p " : l o _ r p o _ r* I t n + r q n * t
(SeeEq. (2 - 38).)Showthat the solutionro rhisequationis given by Eq. (2 - a0).
2-8 ConsidertheM/M/l queueanalysis.Showthat the stationarystateprobability
p" is given by

P,: P"Fo P= l/P


tn two ways:
Eq. (2- I 5) governingthe queueopera-
l. Showthat this solutionfor pn satisfies
tion.
2. Showthat the balanceequationApn: ltp,+t or pn+t: pp" satisfies Eq. (2 - l5).
Then iterate n times.
Calculatepofor rhe finite M/M/l queueand showthatp, isgivenby Eq.(2-20).
J Z-g Show that the blocking probability Po of the finite M/M/ I queue is given by
Pn: PNby equatingthe net arrival rate,l(l - P")to rhe averagedeparrurerare
pQ - Fo)and solving for P, .
Problems 67

" 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

E("):4 "0": P/(r- P)

b. PIot pnasa function of n for p: 0.8.


c. Plot E(rz)versus p and compare with Fig. 2 - 17.
,/ Z-tZ The average buffer occupancy of a statistical multiplexer (or data concentrator)
is to be calculated for a number ofcases. (In such a device the input packets from
terminals connected to it are merged in order of arrival in a buffer and are then
read out first come - first served over an outgoing transmission link.) An infinite
buffer M/M/ I model is to be used to rePresent the concentrator.
l. Ten terminals are connected to the statisticalmultiplexer. Each generates,on
the average, one 960-bit packet, assumed to be distributed exponentially,
every 8 sec. A 2400-bits/sec outgoing line is used. \
2. Repeat ifeach terminal now generates a packet every'5 sec, on the average.
3. Repeat l. above if l6 terminals are connected.
4. Forty terminals are now connected and a 9600-bits/sec output line is used.
Repeat I . and 2. in this case.Now increase the average packet length to I 600
bits. What is the average buffer occupancy ifa packet is generated every 8 sec
at each terminal? What would happen if each terminal were allowed to in-
crease its packet generation rate to I per 5 sec, on the average? (Hint: It might
now be appropriate to use a finite M/M/l model with your own choice of
buffer size.)
2- 13 Consider the finite M/M/I queue holding at most N packets.
a. Show that the blocking probability is P, : | /(N + l) ar p : l.
b . P l o t P n : P N f o r a l l v a l u e so f p , 0 = p ( - c r f o r N : 4 a n d N : 1 9 .
c. The throughput is defined to be y : A(l - Pr). Sketch y/p (the normalized
throughput)asafunctionof p: ),/p(normalizedload)for0 < p1o,N:4,
and N: 19. Compare.
2 - 14 Refer to Problem 2 - 12. Find the mean delay E(I) and the average wait time
E(lV) in each case.
2 - 15 Use Fig. 2-23 to prove that Little's formula applies in the LCFS service disci-
pline.
-
2 16 Draw your own arrival-departure diagrams for an arbitrary queueing system, as
68 Introducfionto Queueing Theory

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).

You might also like