Tải bản đầy đủ (.pdf) (75 trang)

Networking Theory and Fundamentals - Lecture 1 potx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (431.42 KB, 75 trang )

TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh
c
 1997
Delay Models in the Network
Layer
It is important in data communication settings to be able to characterise the
delay that individual packets are subjected to in their sojourn through the
system. Delays can be traced to four main causes.
• Processing delay: This is the time it takes to process a frame at each
subnet node and prepare it for retransmission. These delays are deter-
mined by the complexity of the protocol and the computational power
available at each subnet node.
• Propagation delay: This is the time it actually takes a frame to prop-
agate through the communication link. These delays are dictated by
the distance or length of the communication pathway. They can be
significant, for instance, in satellite links and in high-speed links when
the propagation delay can be a significant fraction of the overall delay.
• Transmission delay: This is the time it takes to transmit an entire
frame, from first bit to last bit, into a communication link. These
delays are dictated primarily by link speed, for example, a
9600 bps
link occasions only half the delay of a
4800 bps link.
• Queueing delay: This is the time a frame has to wait in a queue for ser-
vice. These delays are occasioned by congestion at the subnet nodes.
Propagation delays are determined by the physical channels and are inde-
pendent of the actual traffic patterns in the link; likewise, processing delays
are determined by the available hardware and again are not affected by traf-


fic. We hence focus on the transmission and queueing delays endemic at
any subnet node. The discussion ignores the possibility of retransmissions,
which of course add to the overall delay. In practice, however, retransmis-
sions are rare in many data networks so that this assumption may safely be
1
Class Notes
Santosh S. Venkatesh
c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
made.
1
Subnet node
Packets arrive
asynchronously
Packets depart
asynchronously
Queues are intrinsic to
packet-switched networks. In a
generic packet-switching network,
frames arrive asynchronously at
subnet nodes in the communica-
tion subnet and are processed and
released according to some ser-
vice protocol, for instance, a first-
in, first-out (FIFO) or first-come, first-served (FCFS) protocol. Typically, a
subnet node cannot handle all the traffic entering it simultaneously so that
frames arriving at the node are buffered to await their turn for transmis-
sion. In queueing parlance, the frames are “customers” awaiting “service”

from the subnet node which is hence the “server.”
The overall queueing delay for a frame (customer) is determined
generally by the congestion at the subnet node (server) which is governed
by packet arrival statistics and the service discipline in force.
Arriving
packets
Departing
packets
Buffer Server
Multi-server queue
Single-server queue
More specifically, node congestion is influenced by the following factors:
• Arrival statistics embodied in the distribution of customer interarrival
times
τ. (The arrival rate λ = 1/ E(τ) will play a critical r
ˆ
ole in the
sequel.)
• Buffer size m—for instance, finite buffer systems (m<∞) in which
customers are turned away if the queue is full, and infinite buffer sys-
tems
(m = ∞) in which customers are always accepted into the system.
1
Multi-access networks are the exception which proves the rule: retransmissions are the
rule rather than the exception in multi-access settings.
2
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh

c
 1997
• Number of servers n—for instance, single-server systems (n = 1),
multi-server systems
(n ≥ 2), and infinite-server systems (n = ∞).
• Service statistics embodied in the distribution of customer service times
X. (The mean service time E(X)=1/µ, in particular, will prove to be a
particularly useful concept in the sequel.)
Together, these determine the delay faced by each customer.
A succinct notation has evolved to describe the various factors that
affect the congestion and delays in a queueing environment. A generic
queueing environment is described in the form A/B/c/d, where the first two
descriptors A and B connote the arrival and service statistics, respectively,
and the second two descriptors c and d (if present) connote the number
of servers and the system capacity (buffer size or maximal number of cus-
tomers in the system), respectively. The descriptors A and B are specified
by the arrival and service statistics of the queueing discipline and may be
specified, for instance, as M (exponential or memoryless distribution), E (Er-
langian distribution), H (hyperexponential distribution), D (deterministic),
or G (general distribution), to mention a few possibilities. The descriptors
c and d take on positive integer values, allowing infinity as a possible value
to admit limiting systems with an infinite number of servers and/or infinite
storage capacity which are of theoretical interest.
Little’s Theorem
Consider a queueing environment which, after initial transients have died
down, is operating in a stable steady state.
N customers in system
T time per customer
(Closed) queueing environment in steady state
Customer

arrivals
(rate λ)
Customer
departures
The key parameters characterising the system are:
• λ—the mean, steady state customer arrival rate.
• N—the average number of customers in the system (both in the buffer
and in-service).
3
Class Notes
Santosh S. Venkatesh
c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
• T—the mean time spent by each customer in the system (time spent in
the queue together with the service time).
It is tempting and intuitive to hazard the guess
N = λT.
This indeed is the content of Little’s theorem which holds very generally for
a very wide range of service disciplines and arrival statistics.
To motivate the result, consider a general, stable queueing envi-
ronment which has customers arriving in accordance with some underlying
arrival statistics and departing regulated by some given service discipline.
Arrival, Departure Processes. At any instant of time
t, let A(t) and D(t)
denote the number of arrivals and departures, respectively, in the time in-
terval
[0, t]. The random processes A(t) and D(t), called the arrival and de-
parture process, respectively, are governed by the probability distributions

underlying customer arrivals and service provision, and provide a compre-
hensive instantaneous description of the state of the system at any time
t.
t
t
N(t) = A(t) - D(t) = # customers in system at time t
A(t)
D(t)
Sample Function
-> Step Function
Cadlag
Continue ‘a droi
limite ‘a gauch
N(t)
The adjoining figure illus-
trates sample functions of the ar-
rival and departure processes. Ob-
serve that the sample functions of
the processes
A(t) and D(t) are
step functions with jumps of unit
height. Indeed, both processes
are counting processes with the
jump points indicating an arrival
or departure. Observe further that
the sample functions of the depar-
ture process lag the correspond-
ing sample functions of the ar-
rival process. The random process
N(t)=A(t)−D(t) then represents

the instantaneous number of cus-
tomers present in the queueing environment (both in-queue and in-service)
at time
t.
Example 1 Transmission line.
Consider a transmission line system with packets arriving every
K
seconds for transmission.
T
ra
n
s
m
i
s
s
i
o
n
l
i
n
e
Arriving
packets
Departing
packets
4
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania

Class Notes
Santosh S. Venkatesh
c
 1997
Suppose that each packet requires a transmission time of aK seconds (a<
1)
and that the propagation time for each packet is
bK seconds. Viewing the
transmission line as a server and packets as customers, customers arrive at
a fixed rate
λ = 1/K packets/second. Each customer spends a fixed amount
of time in the system
T =(a + b)K. The number of packets that enter
the line before a given packet departs is hence
N = T/K = a + b. This is
the average number of packets in the line in the steady state. The arrival
process
A(t)
is a fixed time function which has regular unit jumps every K
seconds; the departure process D(t) is also a fixed time function with jump
points regulated by the value
a+b. Two cases, 0<a+b<1and 1<a+b<2
are shown.
K
2K
3K 4K
0ψ<ψa + bψ<ψ1
K
2K
3K 4K

0
0
A(t)
D(t)
N(t)
t
t
0ψ<ψa + bψ<ψ2
K
2K
3K 4K
K
2K
3K 4K
5K
5K
0
0
N(t)
A(t)
D(t)
t
t
What kind of queueing discipline is this? Observe that the “cus-
tomers” (i.e., packets) arrive at a fixed rate
λ = 1/K, promptly go into service
(i.e., have transmission initiated) as soon as they arrive regardless of how
many packets are already in the line,
Time Averages. For definiteness, consider a FIFO system where customers
are served sequentially in order of arrival. Typical sample functions for the

t
T
1
T
2
T
3
T
4
T
5
T
6
D(t)
A(t)
arrival and departure process in
such a system are shown alongside.
The time average (up to
t) of the in-
stantaneous number of customers
in the closed queueing environment
under consideration is given by
^
N(t)=
1
t

t
0
N(τ) dτ.

Now pick any instant t at which the
system has just become empty so
that
N(t)=A(t)−D(t)=0. Let T
i
denote the time spent in the system by the
ith customer as shown in the above figure for a FIFO system. Now observe
5
Class Notes
Santosh S. Venkatesh
c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
via the figure that the area under the curve (up to t) of the instantaneous
number of customers in the system is identically equal to the area between
the arrival and departure sample functions which, in turn, is comprised
of
A(t) rectangular blocks of unit height and widths T
1
, , T
A(t)
. More
formally,

t
0
N(τ) dτ =

t

0

A(τ)−D(τ)

dτ =
A(t)

i=1
T
i
.
Consequently, we obtain
^
N(t)=
1
t
A(t)

i=1
T
i
=

A(t)
t

1
A(t)
A(t)


i=1
T
i

.
The first quantity on the right-hand side may be identified with the average
arrival rate of customers up to time
t:
^
λ(t)=
A(t)
t
.
Likewise, the second term on the right-hand side may be identified with the
average time spent by the first
A(t) customers in the system:
^
T(t)=
1
A(t)
A(t)

i=1
T
i
.
Thus, we obtain
^
N(t)=
^

λ(t)
^
T(t).
Arrivals Departures
Queueing
Environment
Now suppose that, as t →∞,
the various time averages tend to
fixed steady state values
^
N(t) →N,
^
λ(t) → λ, and
^
T(t) → T. We then
obtain Little’s formula
N = λT
where we interpret N as the steady
state, average number of customers
in the system,
λ as the steady state
arrival rate of customers into the
system, and
T as the steady state,
average time spent in the system by each customer.
6
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh

c
 1997
It may be remarked that the formulation, while derived for a FIFO
system, is actually very general and in fact applies to a very wide spectrum
of queueing environments and service disciplines.
Ensemble Averages. Little’s theorem extends quite naturally to situations
where the arrival and departure processes,
A(t) and D(t), are specified by
some underlying probability law. Indeed, suppose that at time
t the number
of customers
N(t) in the system has distribution π
n
(t). Then, the expected
number of customers in the system at time
t is given by
¯
N(t)=E

N(t)

=


n=0

n
(t).
Now, for a large number of systems, the distribution of customers tends to
a steady state or stationary distribution

π
n
(t) →π
n
as t →∞. Then,
¯
N(t) →
¯
N =


n=0

n
(t →∞).
Likewise, the mean time spent in the system by a customer tends to a limit-
ing value
¯
T
i
= E T
i

¯
T (i →∞),
as does the instantaneous, mean customer arrival rate
¯
λ(t)=
E


A(t)

t

¯
λ (t →∞).
A fundamental result known as the ergodic theorem allows us to relate these
steady state ensemble averages to the time averages obtained from individ-
ual sample functions: for a very wide range of situations, including most
situations encountered in practice,
N =
¯
N, T =
¯
T, and λ =
¯
λ with probability
one. Thus, we can heretofore apply Little’s theorem with confidence to any
closed queueing environment where we interpret the various quantities as
steady state, long-term averages.
Applications of Little’s Theorem
The power of Little’s theorem is in its very wide applicability though care
should be taken to make sure that it is applied in the context of a sta-
ble, closed queueing environment where the mean arrival rate of customers
matches the mean departure rate and the system is operating in the steady
state. Some examples may serve to fix the result.
7
Class Notes
Santosh S. Venkatesh
c

 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Example 2 Transmission line, reprise.
Suppose, as before, that packets arrive at regular intervals of
K sec-
onds to a transmission line. As before, the transmission time for each
packet is
aK (where 0<a<1) and the propagation delay is bK (for some
positive
b).
T
ra
n
s
m
i
s
s
i
o
n
l
i
n
e
Arriving
packets
Departing
packets

The queueing environment consists of a single server (the trans-
mission line). Packets arrive at a rate
λ = 1/K packets/second, with each
packet staying in the system a total of
T = aK + bK seconds. Little’s the-
orem hence shows that the steady-state average number of packets in the
system is
N = λT = a + b. Recall that the actual number of packets in the
system is a periodically varying, deterministic function so that the number
of customers in the system never converges, even in the limit of very large
time, to the constant
N (cf. Example 1). The long-term average number of
customers in the system, however, tends to
N.
Example 3 Access-controlled highway entry.
If, in the previous transmission line example, we view the opera-
tions of transmission and propagation in reverse order, we obtain a related
service discipline.
Arrival rate of cars
to highway access λγ
Metering
delay bK
Merging
delay aK
In this alternative setting, customers arrive peri-
odically every
K seconds, i.e., the customer ar-
rival rate is
λ = 1/K, wait in queue for bK sec-
onds, and are serviced and released in

aK sec-
onds. We may identify this queueing environment
with an (idealised) access-controlled highway en-
try system where traffic is permitted to enter a
highway access road at a fixed rate of
λ = 1/K
cars per second. The cars wait in a queue of fixed
size (fixed buffer size) and are released periodi-
cally, one at a time, by a stop light metering sys-
tem; the wait time in queue is
bK seconds. Finally,
on release, the car at the head of the queue moves at a fixed rate over the
access road to merge with traffic in the highway; the time taken to traverse
this segment is
aK seconds.
Observe that Little’s theorem applied to the queueing segment alone
shows that the average number of customers waiting in queue is
bK/K = b,
while Little’s theorem applied to the service segment yields the (fractional)
average number of customers being serviced at any instant
aK/K = a. Ap-
plying Little’s theorem to the entire system consisting of queue and server
8
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh
c
 1997
yields the average number of customers in the system N =(aK + bK)/K =

a + b
which is the sum of the number of customers in the two segments of
the service discipline, as it should be.
Observe that, while the physical details are rather different, macro-
scopically the two service disciplines are equivalent—at least in the average-
sense, long term world view of Little’s theorem.
Example 4 Airline counters.
Consider a closed queueing environment in which customers enter-
ing the system wait in a single queue for service from
n service agents. The
customer at the head of the queue proceeds for service to the first available
server who immediately begins service for the new customer as soon as the
previous customer has departed. The average service time for a customer is
X.
1
n
(2)
(1)
λγ
Suppose that the the environment
has a finite capacity and that, at any given
moment, there are no more than
N cus-
tomers in the system. (For instance, we
may consider an idealised airport counter
type of environment in a room with fi-
nite capacity or a fixed length serpentine
queue with a fixed winding roped-off bor-
der.) Suppose additionally that demand
is such that any departing customer is

instantly replaced by another customer.
(All holiday airfares are advertised at half-
price.) What is the average time a customer can expect to spend in the
system once he enters it?
Let
λ denote the steady state mean arrival rate of customers into the
system and
T the average time spent in the system by each customer. Little’s
theorem applied to the entire system (queueing environment A) yields
N =
λT
, while an application of the theorem to the subsystem consisting only
of the
n servers (queueing environment B) yields n = λX. (Observe that, in
steady state, the arrival rate to the system of servers must be exactly the
same as the arrival rate into the system, else instability results.) It follows
that the average time spent in the system by each customer is
T = N/λ =
N
n
X. (∗)
Intuitive and satisfactory. Indeed, the form of the result is quite suggestive.
Consider the following variation.
Probabilistic airline counters. In a probabilistic variation, consider, as before,
a finite capacity system which can accommodate at most
N customers at a
time with service being provided by
n servers. The average service time per
9
Class Notes

Santosh S. Venkatesh
c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
customer is
¯
X. Suppose that there is constant demand so that the system
is always full with each departing customer being promptly replaced by
an arriving customer. In this version of the airport counter problem, each
server has her own queue of customers. A customer entering the system
joins a queue uniformly at random and awaits his turn for service. What is
the average time spent in the system by a customer?
(1)
(2)
1
n
λγ
Consider the ith subsystem con-
sisting of the
ith server with her associ-
ated queue and let
N
i
, λ
i
, and T
i
denote
the mean number of customers in the

ith
subsystem, the arrival rate into the sub-
system, and the mean time spent in the
subsystem by a customer, respectively.
Then, Little’s theorem applied to the sub-
system yields
T
i
= N
i

i
. To determine
the mean arrival rate into the
ith subsys-
tem, consider the queueing environment
consisting of the
ith server alone. In the
steady state, suppose that the server is busy a fraction
ρ
i
of the time or,
equivalently, is idle for a fraction
1 − ρ
i
of the time. Little’s theorem then
yields
ρ
i
= λ

i
X. The quantity ρ
i
connotes the mean utilisation factor for
server
i in the steady state. How then does one go about estimating the
mean utilisation factor? The ergodic theorem tells us that, with probability
one in the steady state, the fraction of time that a server is idle is iden-
tically the instantaneous probability (at an arbitrary point in time in the
steady state) that the server is idle, i.e., has no customers in service. Write
π
0
for the steady state instantaneous probability that the ith server is idle.
It follows that
ρ
i
= 1 − π
0
so that T
i
= N
i
X

ρ
i
. Now note that T
i
= T for
each

i as all servers have the same average customer delay. Furthermore,
N
i
= N/n as, on average, each subsystem sees a fraction 1/n of the custom.
Finally, observe that
π
0
is identically the probability that each of the N cur-
rent customers in the room have selected a server other than
i. It follows
that
π
0
=

1 −
1
n

N
. Consequently,
T =
N
n
X

1 −

1 −
1

n

N

. (∗∗)
The ratio of the mean delay in
(∗) to that of (∗∗) is precisely
1
ρ
i
=
1
1 −

1 −
1
n

N
>1.
Thus, the congestion independent assignment of customers to queues lead-
ing to
(∗∗) results in an added cost in total delay corresponding precisely
10
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh
c
 1997

to the mean time that a server is idle. Contrariwise, in the original system
leading to
(∗), all servers are constantly busy. The gentle reader should be
able to make the correspondence between these two systems and statistical
multiplexing (wherein system resources are maximally utilised) and time-
or frequency-division multiplexing (wherein resources are allocated ahead
of time).
Example 5 Supermarket counters.
Consider an
n server system in which each server has a dedicated
queue of customers to service.
(1)
(2)
(3)
λ
1
λ
n
1
n
Suppose that the ith server sees a cus-
tomer arrival rate of
λ
i
and that a typical
customer served by the
ith server sees an
average delay of
T
i

from the moment of
first arrival to the queue to the moment of
completion of service. Let
N
i
denote the
mean combined number of customers in
the
ith subsystem.
Little’s theorem applied to the
ith
subsystem now yields
N
i
= λ
i
T
i
. Now,
let
N =

n
i=1
N
i
, λ =

n
i=1

λ
i
, and T de-
note, respectively, the mean number of
customers in the entire system, the total
customer arrival rate into the system, and the average time spent by a cus-
tomer in the system, respectively. Little’s theorem applied to the whole
system hence yields
T =
N
λ
=
n

i=1
λ
i

n
j=1
λ
j
T
i
.
Probabilistic interpretation. The expression for the average customer delay
has an intuitive probabilistic interpretation. Suppose each customer ran-
domly selects a server queue, picking the
ith server queue with probability
p

i
= λ
i


n
j=1
λ
j
. Then the average customer waiting time at the counter
before completion of service is
T = E
{p
i
}
(T)=
n

i=1
p
i
T
i
=
n

i=1
λ
i


n
j=1
λ
j
T
i
,
which is the same result obtained before.
Example 6 Transmission line polling system.
Consider a polling system in which
m users time share a transmis-
sion line. A switching mechanism is put into place whereby the line first
11
Class Notes
Santosh S. Venkatesh
c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
transmits some packets from user 1, then proceeds to transmit some pack-
ets from user
2, and continues likewise until it transmits some packets from
user
m. The line then returns to user 1 in round-robin fashion and repeats
the process.
(m)
(2)
(1)
λ
1

λ
m
Round robin switching
(1)
m
Packets from
user m
Overhead for
user m
Suppose user i has packets
arriving at a rate
λ
i
, each packet
demanding an average transmission
time
X
i
. In addition, suppose that
when the line switches to user
i, an av-
erage negotiation or overhead period
A
i
is required by the line to adjust to
the new user before it can start trans-
mitting packets from the user. What
is the average round-robin cycle duration
L before the line switches back to
a given user?

Virtual user 1
User 1
Virtual user m
User m
A
1
X
1
A
m
X
m
The problem is simplified by view-
ing the overhead/negotiation periods as time
occupied in sending virtual packets of indi-
vidual virtual users. In this viewpoint, the
transmission line serves
2m users in turn,
(1

,1,2

,2, ,m

,m), where i

denotes the ith
virtual user corresponding to the negotiation
period for user
i, before returning to user 1


to begin a new cycle. We may hence model the
transmission line as a single-server queueing
system with varying average service times de-
pending on the nature of the user:
X =

A
i
for overhead packets of ith user,
X
i
for real packets of ith user.
Equivalently, service may be broken down into
a system of
2m servers where servers take
turns cyclically and sequentially with server
i

taking care of the overhead period for customer i (i.e., virtual customer i

)
and server
i taking care of customer i. Let N

i
and N
i
denote the steady-
state average, instantaneous number of customers seen by servers

i

and i,
12
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh
c
 1997
respectively. At any given moment, precisely one customer is in service and
the remaining
2m − 1 servers are idle. It follows that

i
(N

i
+ N
i
)=1. Thus,
we can identify
N

i
and N
i
as the fraction of the time that servers i

and

i, respectively, are busy. When server i

is busy, the average service time
(processing the overhead for user
i)isA
i
; and as the overhead period for
user
i recurs, on average, every L seconds, it follows that the mean arrival
rate of virtual user
i

is 1/L. Little’s theorem applied to server i

alone hence
yields
N

i
= A
i
/L. Likewise, server
i expends an average amount of time
X
i
in service of user i whose customers (packets) arrive at a rate λ
i
. Little’s
theorem again yields
N

i
= λ
i
X
i
. It follows that
1 =
m

i=1
A
i
L
+
m

i=1
λ
i
X
i
,
from which we readily obtain the expression
L =

m
i=1
A
i
1 −


m
i=1
λ
i
X
i
for the average cycle length.
Example 7 Time-sharing computer.
Consider a computing system where a central computer is accessed
by
N terminals (users) in a time-sharing fashion. Suppose that there is a
sustained demand for computing time so that a vacating user’s place is
promptly taken by a new user. In such a system, it would be useful, from a
system administrator’s perspective, to obtain a realistic assessment of the
throughput, i.e., the average number of users served per second.
CPU
N
1
λγ
Suppose that each user, after a
period of reflection lasting
R seconds on
average, submits a job to the computer
which, again on average, requires
P sec-
onds of cpu time. Suppose
T is the av-
erage time spent by each user at a termi-
nal for a given job, and let

λ denote the
throughput achieved. Then Little’s theo-
rem applied to the queueing environment
comprised of computer and
N terminals
yields
N = λT (as the system always has N
customers in it). Now, each client, on av-
erage, will require at least
R + P seconds (if his job is taken up immediately
by the computer) and at most
R + NP seconds (if he has to wait till all other
jobs are processed). It follows that the average time spent by each customer
13
Class Notes
Santosh S. Venkatesh
c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
in the system may be bounded by
2
R + P ≤ T ≤ R + NP.
On the other hand, the throughput would be maximum if each client’s job
was immediately taken up by the computer so that
λ ≤
1
P
.
In combination with Little’s theorem we may now obtain the bounds

max
{R + P, NP } ≤ T ≤ R + NP,
N
R + NP
≤ λ ≤ min

1
P
,
N
R + P

.
The achievable throughput and delay regions are readily seen as a function
of the number of terminals
N in the following figure.
NN
N / (R + NP)
N / (R + P)
1/P
R + P
R + NP
NP
T
T
achievable throughput
A Little Probability Theory
Before we proceed to analyse the peccadilloes of individual queueing sys-
tems, let us detour through a quick review of some of the probabilistic con-
cepts that will be needed.

Poisson and Exponential Statistics
The Poisson and exponential distributions are closely related and are impor-
tant in modelling arrivals and departures in many queueing environments
in practice. A quick review of (some of) the important features of these
distributions is therefore in order.
2
On a facetious note for the theoretical computer scientist: more evidence that P ≠ NP?
14
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh
c
 1997
The Poisson Distribution. Suppose X is a discrete random variable taking
values in the nonnegative integers
{0,1,2,3, }. If, for some positive λ, the
distribution of
X is of the form
P{X = n} = e
−λ
λ
n
n!
(n
≥ 0),
we say that X is a Poisson random variable with parameter λ, and write
simply
X ∼ Po(λ). Poisson random variables occur in a wide variety of situa-
tions in analysis and practice. Perhaps the best-known example of random

events obeying the Poisson law is that of radioactive decay: the number of
radioactive particles emitted by a radioactive substance and detected by a
detector over a given interval of time
t follows a Poisson law to a very good
approximation. Other instances include: the number of chromosome inter-
changes in organic cells under X-ray irradiation; the number of connections
to a wrong number; the distribution of flying bomb hits on London during
World War II; and last, but not least, the arrival of customers in many queues
in practice.
It is easy to determine the moments of a Poisson random variable.
To begin, observe that the Taylor series expansion for
e
λ
readily yields the
following identities:


k=0
λ
k
k!
= e
λ
,


k=0
k
λ
k

k!
= λ


k=1
λ
k−1
(k − 1)!
= λe
λ
,


k=0
k(k − 1)
λ
k
k!
= λ
2


k=2
λ
k−2
(k − 2)!
= λ
2
e
λ

.
It follows readily that if X is Poisson with parameter λ, then
E(X)=


k=0
ke
−λ
λ
k
k!
= λ,
and, likewise,
E(X
2
)=


k=0
k
2
e
−λ
λ
k
k!
=


k=0

k(k − 1)e
−λ
λ
k
k!
+


k=0
ke
−λ
λ
k
k!
= λ
2
+ λ.
It follows immediately that
Var
(X)=E(X
2
)−

E(X)

2
= λ
15
Class Notes
Santosh S. Venkatesh

c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
as well. To summarise: if X ∼ Po(λ) then
E(X)=Var(X)=λ.
Higher order moments can be determined analogously.
A key property of Poisson random variables is that sums of inde-
pendent Poisson variables are also Poisson.
Key Property Suppose
{ X
i
,i ≥ 1 } is a sequence of independent Poisson
variables with
X
i
∼ Po(λ
i
). Then, for every k, the partial sum S
k
=

k
i=1
X
i
is
Poisson with parameter

k

i=1
λ
i
.
Proof: The simplest proof is by induction. The base case for
k = 1 is im-
mediate. As induction hypothesis, suppose
S
k−1
is Poisson with parameter

k−1
i=1
λ
i
. It is easy now to recursively specify the probability mass function
of
S
k
: we have
P{S
k
= n} =
n

m=0
P{S
k−1
= m, X
k

= n − m} =
n

m=0
P{S
k−1
= m} P{X
k
= n − m}
=
n

m=0

e
−(λ
1
+···+λ
k−1
)

1
+ ···+ λ
k−1
)
m
m!

e
−λ

k
λ
n−m
k
(n − m)!

=
e
−(λ
1
+···+λ
k−1

k
)
n!
n

m=0

n
m


1
+ ···+ λ
k−1
)
m
λ

n−m
k
= e
−(λ
1
+···+λ
k−1

k
)

1
+ ···+ λ
k−1
+ λ
k
)
n
n!
,
the last step following via the binomial theorem. Thus, S
k
is also Poisson
with parameter

k
i=1
λ
i
. This completes the induction.

The Exponential Distribution. Suppose
X is a nonnegative random vari-
able. If, for some positive
µ, the distribution function and probability den-
sity function of
X are of the form
F
X
(x)=P{X ≤ x} =

1 − e
−µx
if x ≥ 0,
0 if x<0,
p
X
(x)=
dF
X
(x)
dx
=

µe
−µx
if x ≥ 0,
0 if x<0,
we say that
X is an exponentially distributed random variable with parameter
µ, and write simply X ∼ Exp(µ). The various moments of an exponentially

16
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh
c
 1997
distributed random variable are easy to compute via successive integration
by parts. In particular, if
X ∼ Exp(µ), then
E(X)=


−∞
xp
X
(x) dx =


0
µxe
−µx
dx =
1
µ
.
Similarly,
E(X
2
)=



−∞
x
2
p
X
(x) dx =


0
µx
2
e
−µx
dx =
2
µ
2
,
so that
Var
(X)=E(X
2
)−

E(X)

2
=

1
µ
2
.
To summarise: if X ∼ Exp(µ), then
E(X)=
1
µ
,
Var(X)=
1
µ
2
.
Higher order moments can be determined analogously.
The exponential distribution arises naturally in many contexts wher-
ever a random quantity under consideration has a “memoryless” character.
Formally, a random variable
X is said to exhibit the memoryless property if,
for every pair of positive real numbers
r and s,
P{X>r+ s | X>r} = P{X>s}. (†)
For instance, it is appropriate in many queueing settings to model customer
service times as being memoryless in the sense that the additional time re-
quired to finish servicing the customer is independent of the amount of
service that he has already received. Another example where a memory-
less property may be evidenced in a queueing setting is the times between
customer arrivals; in many applications, these inter-arrival times may be
modelled as memoryless in that the additional time that has to elapse be-
fore the next arrival is independent of how much time has already elapsed

since the previous arrival.
Key Property A random variable
X has the memoryless property if, and
only if, it is exponentially distributed.
Proof: Write
G(r)=1 − F(r) for the right tail of the distribution function
of
X. (For simplicity, we dispense with the subscript X as there is no danger
of confusion here.) Then, by definition of conditional probability,
P{X>r+ s | X>r} =
P{X>r+ s,X>r}
P{X>r}
=
P{X>r+ s}
P{X>r}
=
G(r + s)
G(r)
,
17
Class Notes
Santosh S. Venkatesh
c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
while, the right-hand side of (†) is just
P{X>s} = G(s).
Accordingly, X has the memoryless property if, and only if, it’s distribution
satisfies

G(r + s)=G(r)G(s) (††)
for every
r>0and s>0.
If
X ∼ Exp
(µ) then G(r)=1 − F(r)=e
−µr
for every
r>0. Then
G(r + s)=e
−µ(r+s)
= e
−µr
e
−µs
= G(r)G(s),
for every r>0and s>0. It follows that any exponentially distributed
random variable has the memoryless property. More generally, it follows
from a basic fact from analysis that the only distribution satisfying
(†) is
the exponential distribution.
3
The exponential and Poisson distributions are intimately related, as
we will see shortly.
Poisson Random Processes. In order to be able to characterise the steady
state of a queueing environment it is important to statistically characterise
the time evolution of the total number of arrivals into the system
A(t) and
the total number of departures from the system
D(t). These are both exam-

ples of counting processes characterised by the occurrence of elementary
events—arrivals in the case of the arrival process
A(t) and departures in
the case of the departure process
D(t). Formally speaking, a counting pro-
cess
{ X(t),t ≥ 0 } is a nonnegative, integer valued random process whose
sample functions are nondecreasing and for which, for every pair of time
instants
s and t with s<t, X(t)−X(s) denotes the number of occurrences of
an elementary event (arrivals or departures) in the time interval
(s, t].Itis
clear that the sample functions of a counting process have a step-like char-
acter, increasing only at points of jump where the function value increases
by an integral amount. In many cases in practice, arrivals or departures may
be modelled as being independent over disjoint time intervals; furthermore,
it is frequently possible to model the number of arrivals or departures that
occur in an observation interval as being determined statistically only by
the length of the interval and not on where the interval is positioned. The
formalisation of these notions leads to the definition of independent and
stationary increments, respectively.
3
The reader may wish to try her hand at proving the following generalisation: if G(r) is a
solution of
(††) defined for r>0and bounded in some interval, then either G(r)=0 for all
r, or else G(r)=e
−µr
for some constant µ.
18
TCOM 501: Networking—Theory and Fundamentals

University of Pennsylvania
Class Notes
Santosh S. Venkatesh
c
 1997
We say that a counting process X(t) has independent increments if
the number of elementary events occurring in disjoint time intervals are
independent. Formally, we require that for every positive integer
k, and
every collection of time instants
s
0
<s
1
<s
2
< ··· <s
k
, the random
variables
X
i
= X(s
i
)−X(s
i−1
)(1 ≤ i ≤ k) are independent.
We say that a counting process
X(t) has stationary increments if the
distribution of the number of elementary events that occur in any observa-

tion interval depends only on the length of the interval. Formally, we require
that the probability mass function
P{X(t + s)−X(s)=n} (n ≥ 0) depends
only on the interval length
t and not on s.
The most important counting process for our purposes is the Pois-
son process. A random process
{ X(t),t ≥ 0 } is said to be a Poisson process
with rate
λ>0if:
❶ X(0)=0.
❷ X(t) has independent increments.
❸ The number of elementary events that occur in any interval of length
t is Poisson distributed with parameter λt; i.e.,
P

X(t + s)−X(s)=n

=
e
−λt
[λt]
n
n!
(n = 0,1,2, )
for every t and s. In other words, X(t + s)−X(s) ∼ Po(λt) for every t
and s.
It is not hard to demonstrate that a Poisson process satisfies the following
properties:
① Almost all sample functions of the process are monotone, nondecreas-

ing, increasing only in isolated jumps of unit magnitude.
Indeed, consider the number of elementary events that occur in any interval
of duration
δ.
The points where these jumps occur may be identified with the
times when some sort of random event occurs, such as, for instance, the
arrival of a customer to a queue. The occurrence of an elementary event is
called an arrival. With this interpretation then,
X(t + s)−X(s) stands for the
number of arrivals between the times
s and t+s. Observe that λ can now be
identified as simply the expected rate of arrivals.
② The number of arrivals over disjoint time intervals are independent.
More precisely, suppose
{ s
k
,k ≥ 0 } is a strictly increasing sequence of
points in time and write
X
k
= X(s
k
)−X(s
k−1
) for the number of arrivals
19
Class Notes
Santosh S. Venkatesh
c
 1997

TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
in the time interval (s
k−1
,s
k
]. Then { X
k
,k ≥ 1 } is a sequence of indepen-
dent, Poisson random variables, with
X
k
∼ Po

λ(s
k
− s
k−1
)

(k ≥ 1).
It is clear that the sample paths of a Poisson process are completely
characterised by the arrival times of the elementary events that comprise
the process. Accordingly, set
t
0
= 0 and, for each n ≥ 1, let t
n
denote the
time of the

nth arrival. The interarrival time τ
n
= t
n
− t
n−1
then denotes
the time between the
(n − 1)st and nth arrivals. The Poisson character of
the process immediately implies that the interarrival times
{ τ
n
,n≥ 1 } form
an independent, identically distributed sequence of random variables. The
marginal distribution and density functions of the random variables
τ
n
are
now readily determined:
F
τ
n
(s)=P{τ
n
≤ s} = 1 − P{no arrival in duration s} =

0
if s<0,
1 − e
−λs

if s ≥ 0,
p
τ
n
(s)=
dF
τ
n
(s)
ds
=

0
if s<0,
λe
−λs
if s ≥ 0.
It follows that the interarrival times
τ
n
are exponentially distributed with pa-
rameter
λ. In particular, Poisson interarrival times exhibit the memoryless
property.
The fundamental link between the Poisson and exponential distri-
butions is manifested here: a Poisson process with rate
λ has independent
interarrival times sharing a common exponential distribution with parame-
ter
λ.

Markov Chains
Consider a sequence of random variables { N
k
,k ≥ 0 } where each random
variable takes on values only in the discrete set of points
{0,1,2, }. The
random sequence
{N
k
} forms a Markov chain if, for every k, and every choice
of nonnegative integers
m
0
, m
1
, , m
k−1
, m
k
= m and m
k+1
= n,
P{N
k+1
= n | N
k
= m, N
k−1
= m
k−1

, ,N
0
= m
0
}
= P{N
k+1
= n | N
k
= m} = P
mn
.
In words: in a Markov chain, given a sequence of outcomes of random trials,
the outcome of the next trial depends solely on the outcome of the immedi-
ately preceding trial.
Transition Probabilities. The set of values
{0,1,2, } that can be taken
by the random variables
N
k
is called the set of possible states of the chain;
20
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh
c
 1997
in this terminology, the conditional probability P
mn

has the evocative geo-
metric interpretation of connoting the probability of a transition from state
m to state n.
4
Higher-order transition probabilities for the chain can now be
determined recursively. Write
P
(l)
mn
for the probability of a transition from
state
m to state n in exactly l steps, i.e.,
P
(l)
mn
= P{N
k+l
= n | N
k
= m}.
Observe that this is just the probability of all paths
(m = m
k
,m
k+1
, ,m
k+l
= n)
starting at state m and ending at state n. Thus, P
(1)

mn
= P
mn
and
P
(2)
mn
=

i
P
mi
P
in
.
Induction on l gives the general recursion formula
P
(l+1)
mn
=

i
P
mi
P
(l)
in
(l ≥ 1),
while a further induction on l leads to the Chapman-Kolmogorov identity
P

(l+k)
mn
=

i
P
(l)
mi
P
(k)
in
.
The higher-order transition probabilities can hence be recursively built up
from the basic transition probabilities
P
mn
.
The probabilities of first transition can be built up analogously. Write
F
(l)
mn
for the probability that for a process starting from state m, the first
transition into state
n occurs in the lth step. Then
F
mn
=


l=1

F
(l)
mn
denotes the probability that, starting from state m, the system will ever pass
through state
n. The sequence

F
(l)
nn
,l ≥ 1

represents the distribution of
the recurrence times for state
n. If a return to state n is certain, i.e., F
nn
= 1,
then the quantity
µ
i
=


l=1
lF
(l)
nn
4
More formally, our usage of the term Markov chain should be qualified by adding the
clause “with stationary transition probabilities” to make clear that the transition probabilities

P
mn
do not depend upon the step (or epoch) k. We will not need to have recourse to the
more general Markov property where transitions are epoch-dependent.
21
Class Notes
Santosh S. Venkatesh
c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
is meaningful (it may be infinite) and represents the mean recurrence time
for state
n.
Classification of States. Starting from a given state
n, the successive
returns to state
n constitute what is known in the theory of probability
as a recurrent event. An examination of these recurrent events leads to a
classification of states.
➀ The returns to a given state n may be either periodic or aperiodic.
More formally, a state
n has period t>1if P
(l)
nn
= 0 unless l = νt is a
multiple of
t and t is the largest integer with this property. A state n
is aperiodic if no such t>1exists.
➁ States may also be classified depending upon whether a return to the

state is certain or not. In particular, we say that a state
n is persistent
if
F
nn
= 1 and transient if F
nn
<1.
➂ States which are both aperiodic and persistent may be statistically
characterised by the frequency of return over a sufficiently long time
period provided the mean recurrence time for the state is finite. More
particularly, an aperiodic, persistent state
n with µ
n
< ∞is called
ergodic.
Chains can be further characterised by a consideration of the prob-
abilities of eventual transition from one state to another. We say that state
n can be reached from state m if there is a positive probability of transiting
from state
m to state n in one or more steps, i.e., there exists some l ≥ 0
such that P
(l)
mn
>0.
➃ A Markov chain is said to be irreducible if every state can be reached
from every other state.
Clearly, in an irreducible chain, there is a positive probability of an eventual
return to any given state.
In the sequel we will only be concerned with irreducible chains all

of whose states are ergodic.
Stationary Distributions. Irreducible, ergodic chains settle down into
long-term, statistically regular behaviour. The following result, which we
present without proof, is the principal result.
Key Property In an irreducible chain all of whose states are ergodic, the
limits
π
n
= lim
l→∞
P
(l)
mn
22
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes
Santosh S. Venkatesh
c
 1997
exist and are independent of the initial state m. In addition, the sequence {π
n
}
forms a discrete probability distribution on the set of states and satisfies
0<π
n
=

m
π

m
P
mn
()
for every
n.
To foster a better appreciation of this elegant result, consider the
evolution of the states of the chain starting from an initial state
X
0
drawn
from an a priori distribution

π
(0)
n
,n≥ 0

on the set of states:
P{X
0
= n} = π
(0)
n
(n ≥ 0).
The probability of state n at the kth step is then given by
P{X
k
= n} = π
(k)

n
=

m
π
(0)
m
P
(k)
mn
.
In view of the preceding theorem, it follows directly that
π
(k)
n
→π
n
(k →∞),
so that the limiting distribution of states tends to {π
n
} whatever be the initial
distribution of states. Consequently, after a sufficiently long period of time,
the distribution of states will be approximately invariant or stationary. In
particular, it is easy to see from
() that if the initial distribution satisfies
π
(0)
n
= π
n

then it will perpetuate itself for all time. In consequence, the
sequence

n
} satisfying () is called the stationary distribution
5
of the chain.
The stationary distribution may be identified naturally with the fre-
quency of visits to the states. In particular, suppose
V
(k)
n
denotes the num-
ber of visits to state
n in k steps. If we define the indicator random variables
ξ
(l)
n
=

1
if X
l
= n,
0 if X
l
≠ n,
to denote whether the chain is in state
n at the lth step, then it is easy to
see that

V
(k)
n
=
k

l=1
ξ
(l)
n
.
5
Also called the invariant distribution.
23
Class Notes
Santosh S. Venkatesh
c
 1997
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
The relative frequency of visits to state n is given by ν
(k)
n
= V
(k)
n

k.It
follows easily that the expected fraction of time spent in state
n satisfies

E ν
(k)
n
=
1
k
k

l=1
E ξ
(l)
n
=
1
k
k

l=1
π
(l)
n
→π
n
as k →∞, and indeed it can be shown that, with probability one, ν
(k)
n
,
the relative frequency of visits to state
n, converges to π
n

, the stationary
probability of state
n. In others words, π
n
may be very agreeably identified
with the fraction of time the chain spends in state
n.
Balance Equations.As

n
P
mn
= 1 (why?), we can rewrite () in the form

n
π
m
P
mn
=

n
π
n
P
nm
. ()
Observe vide our earlier remarks that
π
m

P
mn
may be identified as the rel-
ative frequency of transition from state
m to state n so that the sum on
the left-hand-side,

n
π
m
P
mn
, may be interpreted as the frequency of tran-
sitions out of state
m; likewise, π
n
P
nm
may be identified as the relative
frequency of transition from state
n to state m so that the sum on the right-
hand-side,

n
π
n
P
nm
, may be interpreted as the frequency of transitions
into state

m. Thus, at equilibrium, the frequency of transitions into any
given state must equal the frequency of transitions out of that state.
More generally, let
S be any subset of states. Summing both sides
of
() over all states m ∈ S, we obtain

m∈S


n=0
π
m
P
mn
=

m∈S


n=0
π
n
P
nm
.
Breaking up the inner sum over n on both sides results in

m∈S



n∈S
π
m
P
mn
+

n∉S
π
m
P
mn

=

m∈S


n∈S
π
n
P
nm
+

n∉S
π
n
P

nm

,
which, after cancelling common terms on both sides, results in the following
appealing generalisation of
():

m∈S

n∉S
π
m
P
mn
=

m∈S

n∉S
π
n
P
nm
. ()
We may interpret our finding as a generalisation of our previous observa-
tion: at equilibrium, the frequency of transitions into any given set of states
24
TCOM 501: Networking—Theory and Fundamentals
University of Pennsylvania
Class Notes

Santosh S. Venkatesh
c
 1997
S must equal the frequency of transitions out of the set of states S.Ifwe
imagine a membrane surrounding states in
S and excluding states not in
S, then () may be viewed as a mathematical codification of a conserva-
tion law for probability flow: at equilibrium, the net flow of probability mass
across the membrane is zero.
The balance equations
() may frequently be used to good ac-
count to determine the underlying stationary distribution as we see in the
following
Example 8 Birth-Death Processes.
A Markov chain in which
P
mn
= 0 if |m−n| >1is called a birth-death
process. In such a chain, transitions are permitted only to neighbouring
states. The stationary probability distributions are very easy to determine
from the balance equations for such chains. The whole game here is in a
proper choice of the set of states
S. Consider S = {0,1 ,n− 1}, i.e., the
membrane encloses the first
n states. In this case, observe that the only
transition out of the membrane is from state
n − 1 to state n, and, likewise,
the only transition into the membrane is from state
n to state n − 1. The
balance equations

() hence yield
π
n−1
P
n−1,n
= π
n
P
n,n−1
(n ≥ 1),
whence, by induction, we obtain
π
n
= π
n−1
P
n−1,n
P
n,n−1
= π
0
n

i=1
P
i−1,i
P
i,i−1
.
We can determine π

0
directly from the identity


n=0
π
n
= 1, whence we
finally obtain
π
n
=
n

i=1
P
i−1,i
P
i,i−1



m=0
m

i=1
P
i−1,i
P
i,i−1

(n ≥ 0).
In particular, if P
n−1,n
= p and P
n,n−1
= q for all n ≥ 1, then writing ρ = p/q,
we obtain
π
n
= ρ
n
(1 − ρ) for all n ≥ 0.
6
Memoryless Arrivals and Service
The best understood classes of queueing systems are those where arrivals
or departures or both have a memoryless character inherited from the ex-
ponential distribution. Fortunately, this class of systems has wide practical
utility.
6
As we will see shortly, the factor ρ may be identified as the utilisation factor of an
M/M/1 system.
25

×