Analysis of Computer Networks
Analysis of Computer Networks
Musa
Performance
Analysis of
Computer
Networks
Performance Analysis of Computer Networks
Matthew N.O. Sadiku • Sarhan M. Musa
Performance Analysis
of Computer Networks
Matthew N.O. Sadiku Sarhan M. Musa
Roy. G. Perry College of Engineering Roy. G. Perry College of Engineering
Prairie View A&M University Prairie View A&M University
Prairie View, TX, USA Prairie View, TX, USA
vii
Contents
1 Performance Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Computer Communication Networks . . . . . . . . . . . . . . . . . . . . . 1
1.2 Techniques for Performance Analysis . . . . . . . . . . . . . . . . . . . . 2
1.3 Performance Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Probability and Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Probability Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1 Simple Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.2 Joint Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.3 Conditional Probability . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.4 Statistical Independence . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.1 Cumulative Distribution Function . . . . . . . . . . . . . . . . . . 12
2.2.2 Probability Density Function . . . . . . . . . . . . . . . . . . . . . 13
2.2.3 Joint Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3 Operations on Random Variables . . . . . . . . . . . . . . . . . . . . . . . 20
2.3.1 Expectations and Moments . . . . . . . . . . . . . . . . . . . . . . . 20
2.3.2 Variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3.3 Multivariate Expectations . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3.4 Covariance and Correlation . . . . . . . . . . . . . . . . . . . . . . 23
2.4 Discrete Probability Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4.1 Bernoulli Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4.2 Binomial Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.4.3 Geometric Distribution . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.4.4 Poisson Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.5 Continuous Probability Models . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.5.1 Uniform Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.5.2 Exponential Distribution . . . . . . . . . . . . . . . . . . . . . . . . 34
2.5.3 Erlang Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
ix
x Contents
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Chapter 1
Performance Measures
LAN LAN
MAN MAN
LAN (Houston, TX) WAN (Oslo, Norway) LAN
LAN
LAN
Scientists or engineers only have three basic techniques at their disposal for
performance evaluation of a network [2]: (1) measurement, (2) analytic modeling,
and (3) simulation.
1.3 Performance Measures 3
D¼WþSþT (1.1)
4. Loss Probability: This is a measure of the chance that traffic is lost. A packet
may be lost because the buffer is full, due to collision, etc. The value of the loss
probability obtained depends on the traffic intensity and its distribution. For
example, cell loss probability is used to assess an ATM network.
5. Queue length: This is a parameter used in some cases because there are waiting
facilities in a communication network queue. This measure may be used to
estimate the required length of a buffer.
4 1 Performance Measures
Traffic
Packet 1 Packet 2
Time
Tx1 = Transmit time of the first Tx2 = Transmit time of the second
packet (packet 1) in the pair packet (packet 2) in the pair
Router
L1 Packet 1 L2 Packet 2
Time
Rx1 = Receive time of the first Rx2 = Receive time of the second
packet in the pair packet in the pair
6. Jitter: This is the measure of variation in packet delivery timing. In fact, it is the
change in latency from packet to packet. Jitter reduces call quality in Internet
telephony systems. Note that, when the jitter is low the network performance
becomes better. There are three common methods of measuring jitter [4]:
1. inter-arrival time method,
2. capture and post-process method,
3. and the true real-time jitter measurement method.
Jitter can be defined as the absolute value of the difference between the
forwarding delay of two consecutive received packets belonging to the same stream
as in Fig. 1.2.
References
Most signals we deal with in practice are random (unpredictable or erratic) and
not deterministic. Random signals are encountered in one form or another in
every practical communication system. They occur in communication both as
information-conveying signal and as unwanted noise signal.
A random quantity is one having values which are regulated in some probabilistic way.
Thus, our work with random quantities must begin with the theory of probability,
which is the mathematical discipline that deals with the statistical characterization
of random signals and random processes. Although the reader is expected to have
had at least one course on probability theory and random variables, this chapter
provides a cursory review of the basic concepts needed throughout this book. The
concepts include probabilities, random variables, statistical averages or mean
values, and probability models. A reader already versed in these concepts may
skip this chapter.
Thus,
An experiment consists of making a measurement or observation.
An outcome is a possible result of the experiment.
An event is a collection of outcomes.
We now define the probability of an event. The probability of event A is the number
of ways event A can occur divided by the total number of possible outcomes.
Suppose we perform n trials of an experiment and we observe that outcomes
satisfying event A occur nA times. We define the probability P(A) of event A
occurring as
lim nA
Pð AÞ ¼ (2.1)
n!1 n
This is known as the relative frequency of event A. Two key points should be
noted from Eq. (2.1). First, we note that the probability P of an event is always a
positive number and that
0P1 (2.2)
where P ¼ 0 when an event is not possible (never occurs) and P ¼ 1 when the
event is sure (always occurs). Second, observe that for the probability to have
meaning, the number of trials n must be large.
2.1 Probability Fundamentals 7
If events A and B are disjoint or mutually exclusive, it follows that the two
events cannot occur simultaneously or that the two events have no outcomes in
common, as shown in Fig. 2.2.
In this case, the probability that either event A or B occurs is equal to the sum of
their probabilities, i.e.
nA þ nB nA nB
PðA or BÞ ¼ ¼ þ ¼ Pð AÞ þ Pð BÞ (2.4)
n n n
This result can be extended to the case when all possible events in an experiment
are A, B, C, . . ., Z. If the experiment is performed n times and event A occurs nA
times, event B occurs nB times, etc. Since some event must occur at each trial,
nA þ nB þ nC þ þ nZ ¼ n
which indicates that the probabilities of mutually exclusive events must add up
to unity. A special case of this is when two events are complimentary, i.e. if event
A occurs, B must not occur and vice versa. In this case,
Pð A Þ þ Pð B Þ ¼ 1 (2.6)
or
Next, we consider when events A and B are not mutually exclusive. Two events are
non-mutually exclusive if they have one or more outcomes in common, as
illustrated in Fig. 2.3.
The probability of the union event A or B (or A + B) is
where P(AB) is called the joint probability of events A and B, i.e. the probability of
the intersection or joint event AB.
Sometimes we are confronted with a situation in which the outcome of one event
depends on another event. The dependence of event B on event A is measured by
the conditional probability P(BjA) given by
PðABÞ
P B A ¼ (2.9)
Pð AÞ
where P(AB) is the joint probability of events A and B. The notation BjA stands “B
given A.” In case events A and B are mutually exclusive, the joint probability
P(AB) ¼ 0 so that the conditional probability P(BjA) ¼ 0. Similarly, the condi-
tional probability of A given B is
PðABÞ
P A B ¼ (2.10)
Pð BÞ
Lastly, suppose events A and B do not depend on each other. In this case, events
A and B are said to be statistically independent. Since B has no influence of A
or vice versa,
P AB ¼ PðAÞ, P BA ¼ PðBÞ (2.13)
indicating that the joint probability of statistically independent events is the product
of the individual event probabilities. This can be extended to three or more statisti-
cally independent events
Example 2.1 Three coins are tossed simultaneously. Find: (a) the probability of
getting exactly two heads, (b) the probability of getting at least one tail.
Solution
If we denote HTH as a head on the first coin, a tail on the second coin, and a head on
the third coin, the 23 ¼ 8 possible outcomes of tossing three coins simultaneously
are the following:
Since we have eight outcomes in total and three of them are in event A, then
Hence,
Method 2: (Analytic approach) Since the outcome of each separate coin is statisti-
cally independent, with head and tail equally likely,
Example 2.2 In a lab, there are 100 capacitors of three values and three voltage
ratings as shown in Table 2.1. Let event A be drawing 12 pF capacitor and event B
be drawing a 50 V capacitor. Determine: (a) P(A) and P(B), (b) P(AB), (c) P(AjB),
(d) P(BjA).
Solution
(a) From Table 2.1,
and
PðABÞ 16=100
P A B ¼ ¼ ¼ 0:3902
Pð BÞ 41=100
PðABÞ 16=100
P B A ¼ ¼ ¼ 0:4444
Pð AÞ 36=100
Random variables are used in probability theory for at least two reasons [1, 2]. First,
the way we have defined probabilities earlier in terms of events is awkward. We
cannot use that approach in describing sets of objects such as cars, apples, and
houses. It is preferable to have numerical values for all outcomes. Second,
mathematicians and communication engineers in particular deal with random
processes that generate numerical outcomes. Such processes are handled using
random variables.
The term “random variable” is a misnomer; a random variable is neither random
nor a variable. Rather, it is a function or rule that produces numbers from the
outcome of a random experiment. In other words, for every possible outcome of
an experiment, a real number is assigned to the outcome. This outcome becomes the
value of the random variable. We usually represent a random variable by an
uppercase letters such as X, Y, and Z, while the value of a random variable (which
is fixed) is represented by a lowercase letter such as x, y, and z. Thus, X is a function
that maps elements of the sample space S to the real line 1 x 1,
as illustrated in Fig. 2.4.
A random variable X is a single-valued real function that assigns a real value X(x) to
every point x in the sample space.
x1 x2
Let us denote the probability of the event X x, where x is given, as P(X x).
The cumulative distribution function (CDF) of X is given by
for a continuous random variable X. Note that FX(x) does not depend on the random
variable X, but on the assigned value of X. FX(x) has the following five properties:
1. FX ð1Þ ¼ 0 (2.17a)
2. FX ð1Þ ¼ 1 (2.17b)
3. 0 F X ð xÞ 1 (2.17c)
4. FX ðx1 Þ FX ðx2 Þ, if x1 < x2 (2.17d)
5. P x1 < X x2 ¼ FX ðx2 Þ FX ðx1 Þ (2.17e)
The first and second properties show that the FX(1) includes no possible
events and FX(1) includes all possible events. The third property follows from the
fact that FX(x) is a probability. The fourth property indicates that FX(x) is a
nondecreasing function. And the last property is easy to prove since
2.2 Random Variables 13
PðX x2 Þ ¼ P X x1 þ P x1 < X x2
or
If X is discrete, then
X
N
FX ðxÞ ¼ Pðxi Þ (2.19)
i¼0
where P(xi) ¼ P(X ¼ xi) is the probability of obtaining event xi, and N is the
largest integer such that x N x and N M, and M is the total number of points
in the discrete distribution. It is assumed that x1 < x2 < x3 < < xM.
dFx ðxÞ
f X ðxÞ ¼ (2.20a)
dx
or
ðx
FX ð x Þ ¼ f X ðxÞdx (2.20b)
1
where fX(x) is known as the probability density function (PDF). Note that
fX(x) has the following properties:
1. f X ðxÞ 0 (2.21a)
ð
1
2. f X ðxÞdx ¼ 1 (2.21b)
1 xð2
3. Pð x 1 x x 2 Þ ¼ f X ðxÞdx (2.21c)
x1
Properties 1 and 2 follows from the fact that FX (1) ¼ 0 and FX (1) ¼ 1
14 2 Probability and Random Variables
0 x1 x2 x
where M is the total number of discrete events, P(xi) ¼ P(x ¼ xi), and δ(x) is the
impulse function. Thus,
The probability density function (PDF) of a continuous (or discrete) random variable is a
function which can be integrated (or summed) to obtain the probability that the random
variable takes a value in a given interval.
where 1 < x < 1, 1 < y < 1 . If FXY(x,y) is continuous, the joint proba-
bility density function (joint PDF) of X and Y is given by
∂2 FXY ðx; yÞ
f XY ðx; yÞ ¼ (2.25)
∂x∂y
where fXY(x,y) 0. Just as we did for a single variable, the probability of event
x1 < X x2 and y1 < Y y2 is
xð2 yð2
From this, we obtain the case where the entire sample space is included as
ð
1 ð
1
and for Y,
ð
1
dFY ðyÞ
f Y ðyÞ ¼ ¼ f XY ðx; yÞdx (2.31)
dy
1
16 2 Probability and Random Variables
fX(x) and fY(y) are known as the marginal probability density functions
(marginal PDFs).
As mentioned earlier, two random variables are independent if the values taken
by one do not affect the other. As a result,
or
Thus, two random variables are independent when their joint distribution
(or density) is the product of their individual marginal distributions (or densities).
Finally, we may extend the concept of conditional probabilities to the case of
continuous random variables. The conditional probability density function (condi-
tional PDF) of X given the event Y ¼ y is
f ðx; yÞ
f X xY ¼ y ¼ XY (2.35)
f Y ðyÞ
where fY(y) is the marginal PDF of Y. Note that fX(xjY ¼ y) is a function of x with
y fixed. Similarly, the conditional PFD of Y given X ¼ x is
f ðx; yÞ
f Y yX ¼ x ¼ XY (2.36)
f X ðxÞ
where fX(x) is the marginal PDF of X. By combining Eqs. (2.34) and (2.36), we get
f x Y ¼ y f ðyÞ
f Y yX ¼ x ¼
X Y
(2.37)
f X ðxÞ
which is Bayes’ theorem for continuous random variables. If X and Y are indepen-
dent, combining Eqs. (2.34)–(2.36) gives
f X xY ¼ y ¼ f X ðxÞ (2.38a)
f Y yX ¼ x ¼ f Y ðyÞ (2.38b)
PðX ¼ xÞ ¼ 1=8, x ¼ 0, 1, 2, . . . 7
(a) Sketch FX(x) and fX(x). (b) Find P(X 1), P(X > 3), (c) Determine
P(2 X 5).
Solution
(a) The random variable is discrete. Since the values of x are limited to 0 x 7,
Thus, in general
ði þ 1Þ=8, 2 i 7
F X ði Þ ¼ (2.3.1)
1, i > 7
The distribution function is sketched in Fig. 2.6a. Its derivative produces the
PDF, which is given by
X
7
f X ðxÞ ¼ δðx iÞ=8 (2.3.2)
i¼0
But
1
PðX > 3Þ ¼ 1 4=8 ¼ :
2
(c) For P(2 X 5), using Eq. (2.3.1)
1/2
1/8
0 1 2 3 4 5 6 7 x
b
fx(x)
0 1 2 3 4 5 6 7 x
0 1 5 9 x
b
fX(x)
1/8
0 1 5 9 x
Example 2.5 Given that two random variables have the joint PDF
keðxþ2yÞ , 0 x 1, 0 y 1
f XY ðx; yÞ ¼
0, otherwise
(a) Evaluate k such that the PDF is a valid one. (b) Determine FXY(x,y).
(c) Are X and Y independent random variables? (d) Find the probabilities that
X 1 and Y 2. (e) Find the probability that X 2 and Y > 1.
Solution
(a) In order for the given PDF to be valid, Eq. (2.27) must be satisfied, i.e.
ð
1 ð
1
f XY ðx; yÞdxdy ¼ 1
1 1
so that
ð1
1 ð ð
1 ð
1
ðxþ2yÞ x 2y 1
1¼ ke dxdy ¼ k e dx e dy ¼ kð1Þ
2
0 0 0 0
20 2 Probability and Random Variables
Hence, k ¼ 2.
ðx ðy ðx ðy
ðxþ2yÞ
(b) FXY ðx; yÞ ¼ 2e dxdy ¼ 2 e dx e2y dy ¼ ðex 1Þ e2y 1
x
0 0 0 0
¼ FX ðxÞFY ðyÞ
(c) Since the joint CDF factors into individual CDFs, we conclude that the random
variables are independent.
ð1 ð2
(d) PðX 1, Y 2Þ ¼ f XY ðx; yÞdxdy
x¼0 y¼0
ð1 ð2
¼ 2 e dx e2y dy ¼ 1 e1 1 e4 ¼ 0:6205
x
0 0
ð2 1
ð
(e) PðX 2, Y > 1Þ ¼ f XY ðx; yÞdxdy
x¼0 y¼1
ð2 ð
1
¼ 2 e dx e 2ydy ¼ e2 1 e2 ¼ 0:117
x
0 1
There are several operations that can be performed on random variables. These
include the expected value, moments, variance, covariance, correlation, and trans-
formation of the random variables. The operations are very important in our study
of computer communications systems. We will consider some of them in this
section, while others will be covered in later sections. We begin with the mean or
average values of a random variable.
Let X be a discrete random variable which takes on M values x1, x2, x.3, , xM
that respectively occur n1, n2, n.3, , nM in n trials, where n is very large. The
statistical average (mean or expectation) of X is given by
2.3 Operations on Random Variables 21
n1 x1 þ n2 x2 þ n3 x3 þ þ nM xM X M
ni
X ¼ ¼ xi (2.39)
n i¼1
n
X
1
X ¼ E½ X ¼ x i Pð x i Þ (2.40)
i¼0
ð
1
X ¼ E½ X ¼ xf X ðxÞdx (2.41)
1
ð
1
X
M
g ð X Þ ¼ E½ g ð X Þ ¼ gðxi ÞPðxi Þ (2.43)
i¼1
Consider the special case when g(x) ¼ Xn. Equation (2.42) becomes
ð
1
X ¼ E½X ¼
n n
xn f X ðxÞdx (2.44)
1
we have the first moment X as in Eq. (2.42). When n ¼ 2, we have the second
moment X2 and so on.
22 2 Probability and Random Variables
2.3.2 Variance
The moments defined in Eq. (2.44) may be regarded as moments about the origin,
We may also define central moments, which are moments about the mean value
mX ¼ E(X) of X. If X is a continuous random variable,
ð
1
n
E½ ð X m X Þ g ¼ ðx mX Þn f X ðxÞdx (2.45)
1
h o ð
1
If X is discrete,
h i X1
VarðXÞ ¼ σ 2X ¼ E ðX mx Þ2 ¼ ð x i m X Þ 2 Pð x i Þ (2.47)
i¼0
The square root of the variance (i.e. σ X) is called the standard deviation of
X. By expansion,
h i
σ 2X ¼ E ðX mX Þ2 ¼ E X2 2mX X þ m2X ¼ E X2 2mX E½X þ m2X
(2.48)
¼ E X2 m2X
or
σ 2X ¼ E X2 m2X (2.49)
Note that from Eq. (2.48) that if the mean mX ¼ 0, the variance is equal to the
second moment E[X2].
We can extend what we have discussed so far for one random variable to two or
more random variables. If g(X,Y) is a function of random variables X and Y, its
expected value is
ð 1
1 ð
gðX; Y Þ ¼ E½gðX; Y Þ ¼ gðx; yÞf XY ðx; yÞdx dy (2.50)
1 1
2.3 Operations on Random Variables 23
X þ Y ¼ X þ Y ¼ mX þ mY (2.51)
indicating the mean of the sum of two random variables is equal to the sum of their
individual means. This may be extended to any number of random variables.
Next, consider the case in which g(X,Y) ¼ XY, then
ð
1 ð
1
ð 1
1 ð ð
1 ð
1
implying that the mean of the product of two independent random variables is equal
to the product of their individual means.
ð
1 ð
1
E Xn Y k ¼ xn yk f XY ðxÞdx dy (2.54)
1 1
We notice that Eq. (2.50) is a special case of Eq. (2.54). The joint moments in
Eqs. (2.52) and (2.54) are about the origin. The generalized central moments are
defined by
h i 1 ð
ð 1
E ðX mX Þn ðY mY Þk ¼ ðx mX Þn ðy mY Þk f XY ðxÞdx dy (2.55)
1 1
The sum of n and k is the order of the moment. Of particular importance is the
second central moment (when n ¼ k ¼ 1) and it is called covariance of X and Y, i.e.
ð
1 ð
1
or
24 2 Probability and Random Variables
CovðX; Y Þ
ρXY ¼ (2.57)
σX σY
Solution
(a) Using Eq. (2.40)
X
M
X ¼ mX ¼ xi Pðxi Þ
i¼1
¼ 0ð0:2Þ þ 1 0:33 þ 2 0:25 þ 3 0:15 þ 4 0:05 þ 5 0:02
¼ 1:58
(b) If Y ¼ X + 1, then
XM
Y ¼ mY ¼ ðxi þ 1ÞPðxi Þ
i¼1
¼ 1ð0:2Þ þ 2 0:33 þ 3 0:25 þ 4 0:15 þ 5 0:05 þ 6 0:02
¼ 2:58
Similarly,
X M
Y2 ¼ E Y2 ¼ ð x i þ 1Þ 2 P x i
i¼1
¼ 12 ð0:2Þ þ 22 0:33 þ 32 0:25 þ 42 0:15 þ 52 0:05 þ 62 0:02
¼ 8:14
VarðY Þ ¼ σ 2y ¼ E Y 2 m2Y ¼ 8:14 2:582 ¼ 1:4836
Solution
(a) Using Eq. (2.41),
ð
1 ð
1
Eð X Þ ¼ xf X ðxÞdx ¼ x 2e2x dx
1
2 0 31
2x
e 1
¼ 24 ð2x 1Þ5 ¼
4 2
0
ð
1 ð
1
E X2 ¼ x2 f X ðxÞdx ¼ x2 2e2x dx
1
2 31 0
e 2x 1
¼ 24 4x þ 4x þ 2 5 ¼
2
8 2
0
1 1 1
VarðXÞ ¼ E X2 ½EðXÞ2 ¼ ¼
2 4 4
26 2 Probability and Random Variables
(b) Rather than carrying out a similar complex integration, we can use common
sense or intuitive argument to obtain E(Y) and E(Y2). Since Y is linearly
dependent on X and the mean value of 1 is 1,
We would have got the same thing if we have carried the integration in
Eq. (2.45). To be sure this is the case,
ð
1 ð
1
2
E Y 2
¼ ð3x þ 1Þ f X ðxÞdx ¼ 9x2 þ 6x þ 1 f X ðxÞdx
1 1
9 6 17
¼ 9E X 2
þ 6E X þ E 1 ¼ þ þ 1 ¼
2 2 2
17 25 9
VarðY Þ ¼ E Y 2 E2 ðY Þ ¼ ¼
2 4 4
confirming our intuitive approach.
Example 2.8 X and Y are two random variables with joint PDF given by
x þ y, 0 x 1, 0 y 1
f XY ðx; yÞ ¼
0, elsewhere
(a) Find E(X + Y) and E(XY). (b) Compute Cov(X,Y) and ρXY. (c) Determine
whether X and Y are uncorrelated and/or orthogonal.
Solution
(a)
1 ð
ð 1 ð1 ð1
X þ Y ¼ E½ X þ Y ¼ ðx þ yÞf XY ðxÞdxdy ¼ ðx þ yÞðx þ yÞdxdy
1 1
2 00
3x¼1 0 1
ð1 ð1 ð1 ð1
x 1 3
¼ x2 þ 2xy þ y dxdy ¼ 4 þ x2 y þ xy2 5 dy ¼ @ þ y þ y2 Ady
2
3 3
2
00
31 0 x¼0 0
1 y2 y3 7
¼4 yþ þ 5 ¼
3 2 3 6
0
2.3 Operations on Random Variables 27
An indirect way of obtaining this result is using Eq. (2.51) but that will
require that we first find the marginal PDFs fX(x) and fY(y).
Similarly,
1 ð
ð 1 ð1 ð1
XY ¼ E½XY ¼ xyf XY ðxÞdxdy ¼ xyðx þ yÞdxdy
1 1
3x¼1 0 2 1 00
ð1 ð1 ð1 ð1
x x
2
1 1 3
¼ x2 y þ xy dxdy ¼ 4 y þ y2 5 dy ¼ @ y þ y2 Ady
2
3 2 3 2
2
00
31 0 x¼0 0
y2 y3 1
¼4 þ 5 ¼
6 6 3
0
ð1 ð1
3 1
1 x x2 7
mX ¼ xf X ðxÞdx ¼ x x þ dx ¼ þ ¼
2 3 4 0 12
0 0
ð1
4 1
1 x x6 5
E X 2
¼ x2 x þ dx ¼ þ ¼
2 4 6 0 12
0
5 49 11
σ 2X ¼ E X2 m2X ¼ ¼
12 144 144
1 49 1
CovðX; Y Þ ¼ EðXY Þ mX mY ¼ ¼
3 144 144
Similarly, σ 2Y ¼ 144
11
. Thus,
1
CovðX; Y Þ 144 1
ρXY ¼ ¼ 11 ¼
σX σY 144
11
Based on experience and usage, several probability distributions have been devel-
oped by engineers and scientists as models of physical phenomena. These
distributions often arise in communication problems and deserve special attention.
It is needless to say that each of these distributions satisfies the axioms of probabil-
ity covered in Sect. 2.1. In this section, we discuss four discrete probability
distributions; continuous probability distributions will be covered in the next
section. In fact, some of these distributions have already been considered earlier
in the chapter. In this and the next section, we will briefly consider their CDF, PDF,
and their parameters such as mean and variance [3–5].
A Bernoulli trial is an experiment that has two possible outcomes. Examples are
tossing a coin with the two outcomes (heads and tails) and the output of half-wave
rectifier which is 0 or 1. Let us denote the outcome of ith trial as 0 (failure) or
1 (success) and let X be a Bernoulli random variable with P(X ¼ 1) ¼ p and
P(X ¼ 0) ¼ 1 p. Then the probability mass function (PMF) of X is given by
8
< p, x ¼ 1
PðxÞ ¼ 1 p, x¼0 (2.60)
:
0, otherwise
P(x)
1-p
0.23 0.26
0.077 0.078
0.01
0 1 2 3 4 5 x
since there are k successes each with probability p and n k failures each with
probability q ¼ 1 p and all the trials are independent of each other. If we let
x ¼ k, where k ¼ 0, 1, 2, . . ., n, the PDF of the Binomial random variable X is
X
n
f X ðxÞ ¼ PðkÞδðx kÞ (2.64)
k¼0
EðXÞ ¼ np (2.65a)
VarðXÞ ¼ npq ¼ npð1 pÞ (2.65b)
30 2 Probability and Random Variables
0.5
0.25
0.125
0.0625 0.03
1 2 3 4 5 x
X
1
p
pqk1 ¼ ¼1 (2.67)
k¼1
1q
Figure 2.10 shows the PDF of the geometric random variable for p ¼ 0.5 and
x ¼ k ¼ 1, 2, . . . 5.
The mean and variance of the geometric distribution are
1
Eð X Þ ¼ (2.68a)
p
q
VarðXÞ ¼ (2.68b)
p2
The Poisson distribution is perhaps the most important discrete probability distri-
bution in engineering. It can be obtained as a special case of Binomial distribution
when n is very large and p is very small. Poisson distribution is commonly used in
engineering to model problems such as queueing (birth-and-death process or
waiting on line), radioactive experiments, the telephone calls received at an office,
the emission of electrons from a cathode, and natural hazards (earthquakes,
hurricanes, or tornados). A random variable X has a Poisson distribution with
parameter λ if it takes the values 0, 1, 2, . . . with
λk λ
Pð k Þ ¼ e , k ¼ 0, 1, 2, (2.69)
k!
X
1
f X ðxÞ ¼ PðkÞδðx kÞ (2.70)
k¼0
E½X ¼ λ (2.71a)
VarðXÞ ¼ λ (2.71b)
Note from Eq. (2.71a) that the parameter λ represents the average rate of
occurrence of X. A summary of the properties of the four discrete probability
distributions is provided in Table 2.3.
fX (x)
0.271 0.271
0.18
0.135 0.09
0.036 0.012
X
1 X1
λk λ X1
λk
Pð k Þ ¼ e ¼eλ ¼ eλ eλ ¼ 1
k¼0 k¼0
k! k¼0
k!
If we let n ¼ k 1, we get
X1
λn
E½X ¼ λeλ ¼ λeλ eλ ¼ λ
n¼0
n!
X 1 X1
λk X1
λk1
E X2 ¼ k 2 Pð k Þ ¼ k2 eλ ¼ 0þ k λeλ
k¼0 k¼0
k! k¼1
ðk 1Þ!
Since, k ¼ k 1 + 1
X 1
λk1 X1
λk2 X1
λk1
E X2 ¼ ðk 1 þ 1Þ λeλ ¼λ2 eλ þλeλ ¼ λ2 þ λ
k¼1
ðk 1Þ! k¼1
ðk 2Þ! k¼1
ðk 1Þ!
Hence
VarðXÞ ¼ E X2 E2 ½X ¼ λ2 þ λ λ2 ¼ λ
as expected.
2.5 Continuous Probability Models 33
bþa
Eð X Þ ¼ (2.73a)
2
ð b aÞ 2
VarðXÞ ¼ (2.73b)
12
A special uniform distribution for which a ¼ 0, b ¼ 1, called the standard
uniform distribution, is very useful in generating random samples from any proba-
bility distribution function. Also, if Y ¼ Asin X, where X is a uniformly distributed
random variable, the distribution of Y is said to be sinusoidal distribution.
fX (x)
1
b −a
0 x
1
Eð X Þ ¼ (2.75a)
λ
1
VarðXÞ ¼ (2.75b)
λ2
λk xk1 λx
f X ðxÞ ¼ e (2.76)
ðn 1Þ!
with mean
n
Eð X Þ ¼ (2.77a)
λ
and variance
n
VarðXÞ ¼ (2.77b)
λ2
p q
EðXÞ ¼ þ (2.79)
λ1 λ2
pð2 pÞ 1 p2 2pð1 pÞ
VarðXÞ ¼ þ (2.80)
λ21 λ22 λ1 λ2
This distribution, also known as normal distribution, is the most important proba-
bility distribution in engineering. It is used to describe phenomena with symmetric
variations above and below the mean μ. A random variable X with Gaussian
distribution has its PDF of the form
1 1
x μ2
f X ðxÞ ¼ pffiffiffiffiffi exp , 1<x<1 (2.81)
σ 2π 2 σ
1
σ 2p
μ x
Eð X Þ ¼ μ (2.82a)
VarðXÞ ¼ σ 2 (2.82b)
are themselves incorporated in the PDF. Figure 2.14 shows the Gaussian PDF.
It is a common practice to use the notation X N(μ,σ 2) to denote a normal
random variable X with mean μ and variance σ2. When μ ¼ 0 and σ ¼ 1, we have
X ¼ N(0,1), and the normalized or standard normal distribution function with
1
f X ðxÞ ¼ pffiffiffiffiffi ex =2
2
(2.83)
2π
which is widely tabulated.
It is important that we note the following points about the normal distribution
which make the distribution the most prominent in probability and statistics and
also in communication.
1. The binomial probability function with parameters n and p is approximated by a
Gaussian PDF with μ ¼ np and σ2 ¼ np(1 p) for large n and finite p.
2. The Poisson probability function with parameter λ can be approximated by a
normal distribution with μ ¼ σ2 ¼ λ for large λ.
3. The normal distribution is useful in characterizing the uncertainty associated
with the estimated values. In other words, it is used in performing statistical
analysis on simulation output.
4. The justification for the use of normal distribution comes from the central limit
theorem.
The central limit theorem states that the distribution of the sum of n independent random
variables from any distribution approaches a normal distribution as n becomes large.
(We will elaborate on the theorem a little later.) Thus the normal distribution is
used to model the cumulative effect of many small disturbances each of which
contributes to the stochastic variable X. It has the advantage of being
2.5 Continuous Probability Models 37
ð
1 ð
1 ð
1
1 y2 =2 σ y2 =2 μ
ey =2
2
E½X ¼ pffiffiffiffiffi ðσy þ μÞe dy ¼ pffiffiffiffiffi ye dyþ pffiffiffiffiffi dy
2π 2π 2π
1 1 1
¼0þμ
(2.10.2)
Notice the first integral on the right-hand side is zero since the integrand is an
odd function and the second integral gives μ since it represents the PDF of a
Gaussian random variable N(0,1). Hence,
E½X ¼ μ (2.10.3)
Similarly,
ð
1
1 2
x2 pffiffiffiffiffi eðxμÞ =2σ dx
2
E X2 ¼
σ 2π
1
2 3
ð
1
2 σ 2 4 y2 =2 1
ey =2 dy5 þ 2σμð0Þ þ μ2 ¼ σ 2 þ μ2 (2.10.5)
2
E X ¼ pffiffiffiffiffi ye 1 þ
2π
1
and
VarðXÞ ¼ E X2 E2 ½X ¼ σ 2 þ μ2 μ2 ¼ σ 2
We have established that for any real and finite number a and b, the following
three integrals hold.
ð
1 " #
1 ð x aÞ 2
pffiffiffiffiffi exp dx ¼ 1 (2.10.6a)
b 2π 2b2
1
ð
1 " #
x ð x aÞ 2
pffiffiffiffiffi exp dx ¼ a (2.10.6b)
b 2π 2b2
1
ð
1 " #
x2 ð x aÞ 2
pffiffiffiffiffi exp dx ¼ a2 þ b2 (2.10.6c)
b 2π 2b2
1
(b) To determine the Gaussian probability, we need the CDF of the Gaussian
random variable X.
ðx ðx
1 2
pffiffiffiffiffi eðxμÞ =2σ dx
2
FX ð x Þ ¼ f X ðxÞdx ¼
σ 2π
1 1
ð
1 ð
1
1 2 1 2
pffiffiffiffiffi eðxμÞ =2σ dx pffiffiffiffiffi eðxμÞ =2σ dx
2 2
¼
σ 2π σ 2π
1 x
The value of the first integral is 1 since we are integrating the Gaussian PDF
over its entire domain. For the second integral, we substitute
ðx μ Þ dx
z¼ pffiffiffi , dz ¼ pffiffiffi
σ 2 σ 2
and obtain
ð
1
1
pffiffiffi ez dz
2
F X ðxÞ ¼ 1 (2.10.7)
π
x
ðx
2
erf ðxÞ ¼ pffiffiffi et dt
2
(2.10.8)
π
0
ð
1
2
ez dz
2
erfcðxÞ ¼ 1 erf ðxÞ ¼ pffiffiffi (2.10.9)
π
x
1 1
Pð1 < x < 2Þ ¼ erf ð1Þ erf ð0:5Þ ¼ 0:1611
2 2
It is sometimes required in system analysis that we obtain the PDF fY(y) of the
output random variable Y given that the PDF fX(x) for the input random variable X
is known and the input-output transformation function
Y ¼ gðXÞ (2.84)
Hence
2.6 Transformation of a Random Variable 41
d d dx
f Y ðyÞ ¼ FX g1 ðyÞ ¼ FX g1 ðyÞ
dy dx dy
or
f ðxÞ
f Y ðyÞ ¼ X (2.85)
dy
dx
where x ¼ g1(y). In case Y ¼ g(X) has a finite number of roots X1, X2,. . .,Xn
such that
f ðx 1 Þ f ðx 2 Þ f ðxn Þ
f X ðyÞ ¼ X þ X þ þ X (2.86)
dy
dy
dy
dx dx dx
1 2 n
Once the PDF of Y is determined, we can find its mean and variance using the
regular approach.
42 2 Probability and Random Variables
Example 2.11 Suppose that X is a Gaussian random variable with mean 3 and
variance 4 and Y ¼ 3X 1. Find the PDF of Y and its mean and variance.
Solution
With μ ¼ 3 and σ2 ¼ 4, the PDF of X is obtained using Eq. (2.81) as
" #
1 1 x3 2
f X ðxÞ ¼ pffiffiffiffiffi exp
2 2π 2 2
dy
¼3
dx
Hence,
2 !2 3
f X ðxÞ 1 yþ1 1 1
yþ1
3
f Y ðyÞ ¼ ¼ fX ¼ pffiffiffiffiffi exp4 3 5
3 3 3 6 2π 2 2
or
" #
1 1 y8 2
f Y ðyÞ ¼ pffiffiffiffiffi exp
6 2π 2 6
Comparing this with Eq. (2.81) indicates that Y has a Gaussian distribution with
mean 8 and variance 62 ¼ 36. We can easily check this.
X 1
GðzÞ ¼ E zi ¼ z i pi (2.87)
i¼0
Notice that G(1) ¼ 1 since the probabilities must sum up to 1. The generating
function G(z) contains all the information that the individual probabilities have.
We can find the individual probabilities from G(z) by repeated differentiation as
1 dn GðzÞ
pn ¼ (2.88)
n! dzn z¼0
The moments of the random variable can be obtained from G(z). For example,
for the first moment,
X
1 X
1 dX 1
i1 i 0
E½X ¼ ipi ¼ ipi z ¼ pi z ¼ G ð 1Þ (2.89)
i¼0 i¼0
dz i¼0
z¼1 z¼1
X 1 X 1 X 1
E X2 ¼ i 2 pi ¼ iði 1Þpi þ ipi
i¼0 i¼0 i¼0
X1 X 1
i2 i1 (2.90)
¼ iði 1Þpi z þ ipi z
0
i¼0 z¼1 i¼0 z¼1
00
¼ G ð 1Þ þ G 1
X
1 X
1
pz
GðzÞ ¼ pqi1 zi ¼ pz ðqzÞi1 ¼
i¼1 i¼1
1 qz
For n 1,
dn GðzÞ n!pqn1
¼
dzn
ð1 qzÞnþ1
44 2 Probability and Random Variables
Thus,
0 p 1
E½X ¼ G ð1Þ ¼ ¼
ð 1 qÞ 2 p
and
0 00 1 2q 1 þ q
E X 2 ¼ G ð 1Þ þ G ð 1Þ ¼ þ 2 ¼ 2
p p p
so that variance is
q
VarðXÞ ¼ E X2 E2 ½X ¼ 2
p
This is a fundamental result in probability theory. The theorem explains why many
random variables encountered in nature have distributions close to the Gaussian
distribution. To derive the theorem, consider the binomial function
N!
Bð M Þ ¼ pM qNM (2.91)
M!ðN MÞ!
Hence,
" #
1 ðx μÞ2
BðMÞ ¼ f ðxÞ ¼ pffiffiffiffiffi exp (2.93)
σ 2π 2σ 2
pffiffiffiffiffiffiffiffiffi
which is a normal distribution, μ ¼ Np and σ ¼ Npq. Thus, as N ! 1, the sum
of a large number of random variables tends to be normally distributed. This is
known as the central limit theorem.
The central limit theorem states that the PDF of the sum of a large number of individual
random variables approaches a Gaussian (normal) distribution regardless of whether or not
the distribution of the individual variables are normal.
Although the derivation above is based on binomial distribution, the central limit
theorem is true for all distributions. A simple consequence of the theorem is that
any random variable which is the sum of n independent identical random variables
approximates a normal random variable as n becomes large.
2.8 Central Limit Theorem 45
-a 0 a x
b fY (y)
1
Y = X1 + X2
2a
-2a 0 2a y
c fZ (z)
3/8a Z = X1 + X2 + X3
-3a 0 3a z
Example 2.13 This example illustrates the central limit theorem. If X1, X2, X3,. . . Xn
are n dependent random variables and c1, c2, c3, . . .,cn are constants, then
X ¼ c1 X1 þ c2 X2 þ c3 X3 þ . . . þ cn Xn
ð
1
By performing the convolution, we obtain the joint PDF in Fig. 2.15b. In the
same way, for the sum Z ¼ X1 + X2 + X3, the PDF of Z is the convolution of
the PDF in Fig. 2.15a with that in Fig. 2.15b, i.e.
ð
1
which results in Fig. 2.15c. With only three terms, the PDF of the sum is already
approaching Gaussian PDF. According to the central limit theorem, as more terms
are added, the PDF becomes Gaussian.
MATLAB is a useful tool for handling and demonstrating some of the concepts
covered in this chapter. For example, the MATLAB commands mean, std, cov, and
corrcoef can be used to find the average/mean value, standard deviation, covari-
ance, and correlation coefficient respectively. We will illustrate with examples how
MATLAB can be used.
Suppose we want to carry out the random experiment of tossing a die, we can use
the MATLAB command unidrnd to generate as many trials as possible, with each
trial yield randomly 1, 2, . . .6.
We use this command to generate a 12 12 matrix with numbers that are
uniformly distributed between 1 and 6 as follows.
>>x ¼ unidrnd(6,12,12)
x¼
5 3 5 4 6 3 5 6 4 3 1 5
3 4 1 2 5 3 4 5 1 3 4 1
1 2 6 6 5 6 5 3 2 2 5 3
4 4 6 3 5 4 1 4 4 3 2 4
3 1 4 5 5 2 3 6 2 2 2 5
1 4 2 1 2 3 3 4 4 3 5 4
4 5 6 3 2 4 1 2 2 4 5 3
2.9 Computation Using MATLAB 47
5 6 4 3 4 1 5 3 4 5 6 3
5 5 5 3 4 5 6 2 4 2 3 1
6 5 3 4 1 6 3 3 3 1 6 3
6 3 6 4 1 4 6 3 4 3 3 3
1 4 1 1 2 1 1 3 6 3 5 2
> > x1 ¼ mean(x)
x1 ¼
Columns 1 through 10
3.6667 3.8333 4.0833 3.2500 3.5000 3.5000 3.5833
3.6667 3.3333 2.8333
Columns 11 through 12
3.9167 3.0833
> > x2 ¼ mean(x1)
x2 ¼
3.5208
> > y1 ¼ std(x)
y1 ¼
Columns 1 through 10
1.8749 1.4035 1.9287 1.4848 1.7838 1.6787 1.8809
1.3707 1.3707 1.0299
Columns 11 through 12
1.6765 1.3114
> > y2 ¼ std(y1)
y2 ¼
0.2796
From 144 outcomes above, we tabulate the results as shown in Table 2.6.
We expect P(xi) ¼ 1/6 ¼ 0.1667 for all i ¼ 1, 2, . . .6 but it is not quite so because
the number of trials is not large enough. We have chosen 144 to make the result
manageable. If higher number of trials is selected, the results would be more
accurate. We also find the mean value to be 3.5208 instead of 3.5 and the standard
deviation to be 0.2796.
MATLAB can also be used in plotting the cumulative distribution functions (CDF)
or probability density function (PDF) of a random variable. The MATLAB
commands for the CDF and PDF for various types of random variables we consid-
ered in Sects. 2.4 and 2.5 are provided in Table 2.7. One may use the help command
to get assistance on how to use any of these commands.
For example, we will use MATLAB code to plot PDF or P(x) for Binomial
distribution for cases (1) p ¼ 0.6, n ¼ 20, (2) p ¼ 0.6, n ¼ 100 by using the
command binopdf. The MATLAB commands are:
48 2 Probability and Random Variables
Fig. 2.16 Plot PDF for Binomial distribution for cases (a) p ¼ 0.6, n ¼ 20, (b) p ¼ 0.6, n ¼ 100
plot the PDF and CDF of the Gaussian distribution. In Sect. 2.5, we defined CDF of
the Gaussian random variable X as
1 1 xμ
FX ðxÞ ¼ þ erf pffiffiffi (2.95)
2 2 σ 2
50 2 Probability and Random Variables
ðx
2
erf ðxÞ ¼ pffiffiffi et dt
2
(2.96)
π
0
The MATLAB command erf for the error function evaluates the integral in
Eq. (2.96). Hence
1 bμ 1 aμ
Pða < x < bÞ ¼ FX ðbÞ FX ðaÞ ¼ erf pffiffiffi erf pffiffiffi
2 σ 2 2 σ 2
For example, given a Gaussian distribution with mean 0 and variance 2
1 1
Pð1 < x < 2Þ ¼ erf ð1Þ erf ð0:5Þ
2 2
Rather than using Table 2.5 to figure this out, we can use MATLAB.
> > P ¼ 0.5*(erf(1) - erf(0.5))
P¼
0.1611
i.e. P(1 < x < 2) ¼ 0.1611, in agreement with what we got in Example 2.10.
MATLAB becomes indispensable when the value of erf(x) is not tabulated.
2.10 Summary 51
2.10 Summary
1. The probability of an event is the measure of how likely the event will occur as
a result of a random experiment. A random experiment is one in which all the
outcomes solely depend on chance, i.e., each outcome is equally likely to
happen.
2. The relative-frequency definition of the probability of an event A assumes that
if an experiment is repeated for a large number of times n and event A occurs
nA times,
nA
Pð AÞ ¼
n
3. A random variable is a real-value function defined over a sample space.
A discrete random variable is one which may take on only a countable number
of distinct values such as 0, 1, 2, 3, . . .
A continuous random variable is one which takes an infinite number
of possible values.
4. The cumulative distribution function (CDF) FX(x) of a random variable X
is defined as the probability P(X x) and FX(x) lies between 0 and 1.
5. The probability density function (PDF) fX(x) of a random variable X is the
derivative of the CDF FX(x), i.e.
ðx
dFX ðxÞ
f X ðxÞ ¼ ! FX ð x Þ ¼ f X ðxÞdx
dx
1
Eð X Þ ¼ xf X ðxÞdx if X is continuous
1
or
X
M
Eð X Þ ¼ xi Pðxi Þ if X is discrete
i¼1
8. The variance of random variable X is
52 2 Probability and Random Variables
VarðxÞ ¼ σ 2X ¼ E X2 E2 ðXÞ
Problems
2.1 An experiment consists of throwing two dice simultaneously. (a) Calculate the
probability of having a 2 and a 5 appearing together. (b) What is the probability
of the sum being 8.
2.2 A circle is split into ten equal sectors which are numbered 1–10. When the
circle is rotated about its center, a pointer indicates where it stops (like a wheel
of fortune). Determine the probability: (a) of stopping at number 8, (b) of
stopping at an odd number, (c) of stopping at numbers 1, 4, or 6, (d) of stopping
at a number greater than 4.
2.3 A jar initially contains four white marbles, three green marbles, and two red
marbles. Two marbles are drawn randomly one after the other without replace-
ment. (a) Find the probability that the two marbles are red. (b) Calculate the
probability that the two marbles have marching colors.
2.4 The telephone numbers are selected randomly from a telephone directory and
the first digit (k) is observed. The result of the observation for 100 telephone
numbers is shown below.
k 0 1 2 3 4 5 6 7 8 9
Nk 0 2 18 11 20 13 19 15 1 1
What is the probability that a phone number: (a) starts with 6? (b) begins
with an odd number?
Problems 53
2.5 A class has 50 students. Suppose 20 of them are Chinese and 4 of the Chinese
students are female. Let event A denote “student is Chinese” and event B
denote “student is female.” Find: (a) P(A), (b) P(AB), (c) P(BjA).
2.6 In a particular city, voters registration follows the tabulated statistics below.
What is the probability that a person selected at random will be a male given
that the person is also a Republican?
1
f X ðxÞ ¼ , 1 < x < 1
π ð1 þ x2 Þ
(a) Determine the value of the constant k such that the PDF is valid.
(b) Obtain the corresponding CDF FXY(x,y).
(c) Calculate the marginal PDFs fX(x) and fY(y).
(d) Find P(X 3, Y > 2) and P(0 < X < 1, 1 < Y < 3).
54 2 Probability and Random Variables
2.12 X and Y are random variables which assume values 0 and 1 according to the
probabilities in the table below. Find Cov(X,Y).
X
0 1 Total
Y 0 0.3 0.4 0.7
1 0.1 0.2 0.3
Total 0.4 0.6 1.0
(a) Evaluate k.
(b) Determine P(X < 1, y > 1).
(c) Find FXY(0.5,1.5).
(d) Obtain FY(yjX ¼ x).
(e) Calculate Cov(X,Y).
2.20 The skew is defined as the third moment taken about the mean, i.e.
h i ð
1
3
skewðXÞ ¼ E ðX mx Þ ¼ ðx mx Þ3 f X ðxÞdx
1
find skew(X).
2.21 Refer to the previous problem for the definition of skewness. Calculate
skew(X), where X is a random variable with the following distributions:
(a) Binomial with parameters n and p
(b) Poisson with parameter λ.
(c) Uniform on the interval (a,b).
(d) Exponential with parameter α.
2.22 There are four resistors in a circuit and the circuit will fail if two or more
resistors are defective. If the probability of a resistor being defective is 0.005,
calculate the probability that the circuit does not fail.
56 2 Probability and Random Variables
1/3
0 1 2 3 4 x
2.23 Let X be a binomial random variable with p ¼ 0.5 and n ¼ 20. Find
P(4 X 7).
Hint: P(4 X 7) ¼ P(X ¼ 4) + P(4 < X 7).
2.24 The occurrence of earthquakes can be modeled by a Poisson process. If the
annual rate of occurrence of earthquakes in a particular area is 0.02, calculate
the probability of having exactly one earthquake in 2 years.
2.25 The number of cars arriving at a toll booth during any time interval T
(in minutes) follows Poisson distribution with parameter T/2. Calculate the
probability that it takes more than 2 min for the first car to arrive at the booth.
2.26 A uniform random variable X has E[X] ¼ 1 and Var(X) ¼ 1/2. Find its PDF
and determine P(X > 1).
2.27 Two independent random variables are uniformly distributed, each having the
PDF shown in Fig. 2.18. (a) Calculate the mean and variance of each.
(b) Determine the PDF of the sum of the two random variables.
2.28 A continuous random variable X may take any value with equal probability
within the interval range 0 to α. Find E[X], E[X2], and Var(X).
2.29 A random variable X with mean 3 follows an exponential distribution.
(a) Calculate P(X < 1) and P(X > 1.5). (b) Determine λ such that
P(X < λ) ¼ 0.2.
2.30 A zero-mean Gaussian random variable has a variance of 9. Find a such that
P(jXj > a) < 0.01.
2.31 A random variable T represents the lifetime of an electronic component.
Its PDF is given by
2
t t
f T ðtÞ ¼ 2 exp 2 uðtÞ
α α
1
c −a
x
a b c
0 σ x
σ
2.38 Obtain the generating function for Poisson distribution.
58 2 Probability and Random Variables
2.39 A queueing system has the following probability of being in state n (n ¼ number
of customers in the system)
pn ¼ ð1 ρÞρn , n ¼ 0, 1, 2,
(a) Find the generating function G(z). (b) Use G(z) to find the mean number of
customers in the system.
2.40 Use MATLAB to plot the joint PDF of random variables X and Y given by
1
P ¼ ½1 erf ðxÞ
2
where x is a measure of the signal-to-noise ratio. Use MATLAB to plot P over
0 < x <1.
2.43 Plot the PDF of Gaussian distribution with mean 2 and variance 4 using
MATLAB.
2.44 Using the MATLAB command rand, one can generate random numbers
uniformly distributed on the interval (0,1). Generate 10,000 such numbers
and compute the mean and variance. Compare your result with that obtained
using E[X] ¼ (a + b)/2 and Var(X) ¼ (b a)2/12.
References
1. G. R. Grimmett and D.R. Stirzaker, Probability and Random Processes. Oxford: Oxford
University Press, 2001, pp. 26–45.
2. X. R. Li, Probability, Random Signals, and Statistics. Boca Raton, FL: CRC Press, 1999,
pp. 65–143.
3. R. Jain, The Art of Computer Systems Performance Analysis. New York: John Wiley & Sons,
1991, pp. 483–501.
4. R. Nelson, Probability, Stochastic Processes, and Queueing Theory. New York: Springer-
Verlag, 1995, pp. 101–165.
References 59
It should be note that the parameter t does not have to always represent time; it
can represent any other variable such as space.
X1 X2
Sample space X(t,s1)
• t1 t2 t
•s1
X(t,s2)
•
•
•s t
2
•
•
• •
• •
•
•
•sn •
X(t,sn)
outcome
t
In this chapter, we discuss random processes, their properties, and the basic tools
used for their mathematical analysis. Specifically, we will discuss random walks,
Markov processes, birth-death processes, Poisson processes, and renewal pro-
cesses. We will also consider how the concepts developed can be demonstrated
using MATLAB.
A deterministic random process is one for which the future value of any sample
function can be predicted from a knowledge of the past values. For example,
consider a random process described by
where A and ω are constants and Φ is a random variable with a known probability
distribution. Although X(t) is a random process, one can predict its future values
and hence X(t) is deterministic. For a nondeterministic random process, each
sample function is a random function of time and its future values cannot be
predicted from the past values.
A stationary random process is one in which the probability density function of the
random variable does not change with time. In other words, a random process is
stationary when its statistical characteristics are time-invariant, i.e. not affected by a
shift in time origin. Thus, the random process is stationary if all marginal and joint
density functions of the process are not affected by the choice of time origin.
A nonstationary random process is one in which the probability density function
of the random variable is a function of time.
64 3 Stochastic Processes
Stationary
Ergodic
ð
1 ðT
lim 1
X ¼
n
x f X ðxÞdx ¼
n
Xn ðtÞdt (3.2)
T ! 1 2T
1 T
This condition will only be satisfied if the process is stationary. This implies that
ergodic processes are stationary as well. A nonergodic process does not satisfy the
condition in Eq. (3.2). All non-stationary processes are nonergodic but a stationary
process could also be nonergodic. Figure 3.2 shows the relationship between
stationary and ergodic processes. These terms will become clearer as we move
along in the chapter.
Example 3.1 Consider the random process
θ= 0 X(t)
θ = π/2 X(t)
θ= π
X(t)
Fig. 3.3 For Example 3.1; sample functions of the random process
Since a random process specifies a random variable at any given time, we can find
the statistical averages for the process through the statistical averages of the
corresponding random variables. For example, the first-order probability density
function (PDF) for a random process X(t) is fX(x;t), while the corresponding first-
order cumulative distribution function (CDF) of X(t) is
ðx
FX ðx; tÞ ¼ P½XðtÞ x ¼ f X ðλ; tÞdλ (3.3)
1
or
∂FX ðx; tÞ
f X ðx; tÞ ¼ (3.4)
∂x
66 3 Stochastic Processes
or
∂FX ðx1 ; x2 ; t1 ; t2 Þ
f X ðx1 ; x2 ; t1 ; t2 Þ ¼ (3.6)
∂x1 ∂x2
In general, the joint distributions of n random variables X(t1) ¼ X1, X(t2) ¼ X2,
. . ., X(tn) ¼ Xn provide the nth-order PDF and CDF of a random process X(t) and
are related as
FX ðx1 ; x2 ; . . . ; xn ; t1 ; t2 ; . . . ; tn Þ ¼ P X t1 x1 , X t2 x2 , . . . , X tn xn
xðn xð2 xð1
¼ ... f X λ1 , λ2 , . . . , λn ; t1 , t2 , . . . , tn dλ1 dλ2 . . . dλn
1 1 1
(3.7)
or
∂FX ðx1 ; x2 ; . . . ; xn ; t1 ; t2 ; . . . ; tn Þ
f X ðx1 ; x2 ; . . . ; xn ; t1 ; t2 ; . . . ; tn Þ ¼ (3.8)
∂x1 ∂x2 . . . ∂xn
A random process X(t) is said to be strictly stationary of order n if its nth-order
PDF and CDF are time-invariant, i.e.
FX x1 , x2 , . . . , x; t1 þ τ, t2 þ τ, . . . , tn þ τ
¼ FX x1 , x2 , . . . , x; t1 , t2 , . . . , tn (3.9)
i.e. the CDF depends only on the relative location of t1, t2,. . .,tn and not on their
direct values.
We say that {Xk}, k ¼ 0, 1, 2, , n is an independent process if and only if
In addition, if all random variables are drawn from the same distribution, the
process is characterized by a single CDF, FXk ðxk ; tk Þ, k ¼ 0, 1, 2, , n. In this
case, we call {Xk} a sequence of independent and identically distributed (IID)
random variables.
3.2 Statistics of Random Processes and Stationarity 67
Having defined the CDF and PDF for a random process X(t), we are now
prepared to define the statistical (or ensemble) averages—the mean, variance,
autocorrelation, and autocovariance of X(t). As in the case of random variables,
these statistics play an important role in practical applications.
The mean or expected value of the random process X(t) is
ð
1
where E[•] denotes ensemble average, fX(x;t) is the PDF of X(t) and X(t) is regarded
as a random variable for a fixed value of t. In general, the mean mX(t) is a function
of time.
The variance of a random process X(t) is given by
h i
VarðXÞ ¼ σ 2X ¼ E ðXðtÞ mX ðtÞÞ2 ¼ E X2 m2X (3.11)
ð
1 ð
1
Or
CX ðt1 ; t2 Þ
ρX ðt1 ; t2 Þ ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi (3.15)
CX ðt1 ; t1 ÞCX ðt2 ; t2 Þ
where ρX ðt1 ; t2 Þj 1.
Finally, we define the nth joint moment of X(t) as
Note that the autocovariance of a WSS process depends only on the time
difference τ
indicating that the mean power of a WSS process X(t) does not depend on t. The
autocorrelation function has its maximum value when τ ¼ 0 so that we can write
FX ðx1 , x2 , . . . , xn ; t1 þ τ, t2 þ τ, . . . , tn þ τÞ
¼ FX ðx1 ; x2 ; . . . ; xn ; t1 ; t2 ; . . . ; tn Þ (3.22)
3.2 Statistics of Random Processes and Stationarity 69
An SSS random process is also WSS but the converse is not generally true.
In general terms, a random process is stationary if all its statistical properties do not vary
with time.
where A and ω are constants and Θ is uniformly distributed over (0,2π). (a) Find E
[X(t)] , E[X2(t)] and E[X(t)X(t+τ)]. (b) Is X(t) WSS?
Solution
(a) Since Θ has a uniform distribution, its PDF is given by
8
< 1 , 0 θ 2π
f Θ ðθÞ ¼ 2π
:
0, otherwise
Hence,
ð1 2ðπ
1
E½XðtÞ ¼ xf Θ ðθÞdθ ¼ A cos ðωt þ θÞ dθ ¼ 0
1 2π
0
ð1 ð
2π
1
E X ðtÞ ¼
2
x f Θ ðθÞdθ ¼ A
2 2
cos 2 ðωt þ θÞ dθ
1 2π
0
2ðπ
1 1 A2
¼ A2 ½1 þ cos 2ðωt þ θÞ dθ ¼
2 2π 2
0
where the trigonometric identity cos 2 α ¼ 12 ½1 þ cos 2α and the fact that
ω ¼ 2π/T have been applied.
2ðπ
1
E½XðtÞXðt þ τÞ ¼ A cos ðωt þ θÞA cos ½ωðt þ τÞ þ θ dθ
2π
0
2ðπ
A2 1 A2
¼ ½ cos ðωτ þ 2ωt þ 2θÞ þ cos ωτdθ ¼ cos ωτ
2π 2 2
0
(b) Since the mean of X(t) is constant and its autocorrelation is a function of τ only,
X(t) is a WSS random process.
70 3 Stochastic Processes
Example 3.3 Let X(t) ¼ A sin (πt/2), where A is a Gaussian or normal random
variable with mean μ and variance σ2, i.e. A ¼ N(μ,σ). (a) Determine the mean,
autocorrelation, and autocovariance of X(t). (b) Find the density functions for
X(1) and X(3). (c) Is X(t) stationary in any sense?
Solution
Given that E[A] ¼ μ and Var(A) ¼ σ2, we can obtain
E A2 ¼ VaxðAÞ þ E2 ½A ¼ σ 2 þ μ2
The autocovariance is
CX ðt1 ; t2 Þ ¼ RX ðt1 ; t2 Þ mX ðt1 ÞmX ðt2 Þ ¼ σ 2 sin ðπt1 =2Þ sin ðπt2 =2Þ
where a ¼ x1
1
f A ðaÞ ¼ pffiffiffiffiffi eðaμÞ =ð2σ Þ
2 2
σ 2π
1
f X ðx1 Þ ¼ pffiffiffiffiffi eðx1 μÞ =ð2σ Þ
2 2
σ 2π
Similarly, X(3) ¼ A sin π3/2 ¼ A
where a ¼ x3.
3.3 Time Averages of Random Processes and Ergodicity 71
σ 2π
(c) Since the mean of X(t) is a function of time, the process is not stationary
in any sense.
For a random process X(t), we can define two types of averages: ensemble and time
averages. The ensemble averages (or statistical averages) of a random process X
(t) may be regarded as “averages across the process” because they involve all
sample functions of the process observed at a particular instant of time. The time
averages of a random process X(t) may be regarded as “averages along the process”
because they involve long-term sample averaging of the process.
To define the time averages, consider the sample function x(t) of random process
X(t), which is observed within the time interval T t T. The time average
(or time mean) of the sample function is
ðT
lim 1
x ¼ < xðtÞ >¼ xðtÞdt (3.23)
T ! 1 2T
T
ðT
lim 1
R X ðτÞ ¼ < xðtÞxðt þ τÞ >¼ xðtÞxðt þ τÞdt (3.24)
T ! 1 2T
T
Note that both x and R X ðτÞ are random variables since their values depend on
the observation interval and on the sample function x(t) used.
If all time averages are equal to their corresponding ensemble averages, then the
stationary process is ergodic, i.e.
An ergodic process is one for which time and ensemble averages are interchangeable.
large number of sample functions to work with. Ergodicity suggests that if a random
process is ergodic, only one sample function is necessary to determine the ensemble
averages. This seems reasonable because over infinite time each sample function of
a random process would take on, at one time or another, all the possible values of
the process. We will assume throughout this text that the random processes we will
encounter are ergodic and WSS.
Basic quantities such as dc value, rms value, and average power can be defined
in terms of time averages of an ergodic random process as follows:
1. x ¼ mX is the dc value of x(t).
2. ½x 2 ¼ m2X is the normalized dc power.
3. R X ð0Þ ¼ x2 is the total average normalized power
4. σ 2X ¼ x2 ½x 2 is the average normalized power in the ac or time-varying
component of the signal.
pffiffiffiffiffi qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
5. Xrms ¼ x2 ¼ σ 2X þ ½x 2 is the rms value of x(t).
Example 3.4 Consider the random process in Example 3.2. Show that the process is
stationary and ergodic.
Solution
We already showed that the process is stationary because the statistical or ensemble
averages do not depend on time. To show that the process is ergodic, we compute
the first and second moments. Since ω ¼ 2π/T,
ðT
lim 1
x ¼ A cos ðωt þ θÞdt ¼ 0
T ! 1 2T
T
ðT ðT
lim 1 lim A2 1 A2
x2 ¼ A cos ðωt þ θÞdt ¼
2 2
½1 þ cos 2ðωt þ θÞdt ¼
T ! 1 2T T ! 1 2T 2 2
T T
indicating that the time averages are equal to the ensemble averages we obtained in
Example 3.2. Hence the process is ergodic.
The joint behavior of two or more random processes is dictated by their joint
distributions. For example, two random processes X(t) and Y(t) are said to be
independent if for all t1 and t2, the random variables X(t1) and Y(t2) are indepen-
dent. That means that their nth order joint PDF factors, i.e.
FXY ðx1 ; y1 ; x2 ; y2 ; . . . ; xn ; yn ; t1 ; t2 ; . . . ; tn Þ
¼ FX ðx1 ; x2 ; . . . ; xn ; t1 ; t2 ; . . . ; tn ÞFY ðy1 ; y2 ; . . . ; yn ; t1 ; t2 ; . . . ; tn Þ (3.27)
3.4 Multiple Random Processes 73
If X(t) and Y(t) are jointly stationary, then their crosscorrelation function
becomes
CXY ðt1 ; t2 Þ ¼ E½fXðt1 Þ mX ðt1 ÞgfY ðt2 Þ mY ðt2 Þg ¼ RXY ðt1 ; t2 Þ mX ðt1 ÞmY ðt2 Þ
(3.31)
Just like with random variables, two random processes X(t) and Y(t) are uncor-
related if
ðT
lim 1
R XY ðτÞ ¼ xðtÞxðt þ τÞdt ¼ RXY ðτÞ (3.34)
T!1 2T
T
where Θ is random variable that is uniformly distributed over (0,2π). Find the cross
correlation function RXY(t,t + τ)
Solution
ð
2π
RXY ðt, t þ τÞ ¼ RXY τ ¼ E X t Y t þ τ ¼ xðtÞyðt þ τÞf Θ ðθÞdθ
0
2ðπ
1
¼ sin ðωt þ θÞ sin ½ωðt þ τÞ þ θ þ π=4 dθ
2π
0
2ðπ
1 1
¼ cos ðωτ þ π=4Þ cos 2ωt þ ωτ þ 2θ þ π=4 dθ
2 2π
0
1
¼ cos ðωτ þ π=4Þ
2
Example 3.6 A received signal X(t) consists of two components: desired signal
S(t) and noise N(t), i.e.
X(t) ¼ S(t) + N(t)
If the autocorrelation of the random signal is
RS ðτÞ ¼ e2jτj
RN ðτÞ ¼ 3ejτj
Assume that they are independent and they both have zero mean.
(a) Find the autocorrelation of X(t). (b) Determine the cross correlation between
X(t) and S(t).
Solution
(a) RX ðt1 ; t2 Þ ¼ EX t1 X t2 ¼ E ½fSðt1 Þþ Nðt1 ÞgfSðt2Þ þ Nðt2 Þg
¼ E Sðt1 ÞS t2 þ E N t1 S t2 þ E S t1 N t2 þ E N t1 N t2
Since S(t) and N(t) are independent and have zero mean,
3.5 Sample Random Processes 75
Hence,
where τ ¼ t1 t2.
(b) Similarly,
RXS ðt1 ; t2 Þ ¼ EX t1 S t2 ¼ E½fSðt1 Þ þ Nðt1 ÞgfSðt2 Þg
¼ E Sðt1 ÞS t2 þ E N t1 S t2
¼ RS ð t 1 ; t 2 Þ þ 0
Thus,
A random walk (or drunkard’s walk) is a stochastic process in which the states are
integers Xn representing the position of a particle at time n. Each state change
according to
Xn ¼ Xn1 þ Z n (3.35)
X
n
Xn ¼ Zi (3.36)
i¼1
A random walk on X corresponds to a sequence of states, one for each step of the
walk. At each step, the walk switches from its current state to a new state or remains
at the current state. Thus,
76 3 Stochastic Processes
n-1 n n+1
q
q q
Random walks are usually Markovian, which means that the transition at each
step is independent of the previous steps and depends only on the current state.
Although random walks are not limited to one-dimensional problems, the
one-dimensional random walk is one of the simplest stochastic processes and can
be used to model many gambling games. Random walks also find applications in
potential theory. A typical one-dimensional random walk is illustrated in Fig. 3.4.
Example 3.7 Consider the following standard Markovian random walk on the
integers over the range {0, . . ., N} that models a simple gambling game, where a
player bets the same amount on each hand (i.e., step). We assume that if the player
ever reaches 0, he has lost all his money and stops, but if he reaches N, he has won a
certain amount of money and stops. Otherwise, at each step, one moves from state
i (where i 6¼ 0, N) to i + 1 with probability p (the probability of winning the game),
to i 1 with probability q (the probability of losing the game), and stays at the
same state with probability 1 p q (the probability of a draw).
If the future state of a process depends only on the present (and independent of the
past), the process is called a Markov process. A Markov process is made possible
only if the state time has a memoryless (exponential) distribution. This requirement
often limits the applicability of Markov processes.
Formally, a stochastic process X(t) is a Markov process if
Prob XðtÞ ¼ xXðtn Þ ¼ xn , Xðtn1 Þ ¼ xn1 , Xðto Þ ¼ xo
¼ Prob XðtÞ ¼ xXðtn Þ ¼ xn for to < t1 < < tn < t (3.37)
A discrete-state Markov process is called a Markov chain [4]. We use the state
transition diagram to represent the evolution of a Markov chain. An example of
three-state Markov chain is shown in Fig. 3.5.
3.5 Sample Random Processes 77
p00
0 p11 1 2
p22
p10 p21
p20
is called the transition probability from state i to state j. Since a Markov chain must
go somewhere with a probability of 1, the sum of pn(i,j)’s over all j’s is equal to 1. If
pn(i,j) is independent of n, the Markov chain is said to be time-homogeneous and in
this case, the transition probability becomes p(i,j). When we arrange p(i,j) into an
square array, the resulting matrix is called the transition matrix.
For a simple example, consider four possible states as 0, 1, 2, and 3. The
transition matrix is
2 3
pð0; 0Þ pð0; 1Þ pð0; 2Þ pð0; 3Þ
6 pð1; 0Þ pð1; 1Þ pð1; 2Þ pð1; 3Þ 7
P¼6
4 pð2; 0Þ
7 (3.38)
pð2; 1Þ pð2; 2Þ pð2; 3Þ 5
pð3; 0Þ pð3; 1Þ pð3; 2Þ pð3; 3Þ
λ λ λ λ
0 1
... n-1 n n +1
μ μ μ μ
From application point of view, Poisson processes are very useful. They can be used
to model a large class of stochastic phenomena. Poisson process is one in which the
number of events which occur in any time interval t is distributed according to a
Poisson random variable, with mean λt. In this process, the interarrival time is
distributed exponentially.
A process is called a Poisson process when the time intervals between successive events
are exponentially distributed.
Given a sequence of discrete events occurring at times t0, t1, t2, t3,. . ., the intervals
between successive events are Δt1 ¼ (t1 t0), Δt2 ¼ (t2 t1), Δt3 ¼ (t3 t2), . . .,
and so on. For a Poisson process, these intervals are treated as independent random
variables drawn from an exponentially distributed population, i.e., a population with
the density function f(x) ¼ λeλ x for some fixed constant λ. The interoccurrence
times between successive events of a Poisson process with parameter λ are indepen-
dent identical distributed (IID) exponential random variable with mean 1/λ.
The Poisson process is a counting process for the number of randomly occurring
point-events observed in a given time interval. For example, suppose the arrival
process has a Poisson type distribution. If N(t) denotes the number of arrivals in
time interval (0,t], the probability mass function for N(t) is
ðλtÞn λt
pn ðtÞ ¼ P½N ðtÞ ¼ n ¼ e (3.39)
n!
Thus, the number of events N(t) in the interval (0,t] has a Poisson distribution
with parameter λt and the parameter λ is called the arrival rate of the Poisson
process.
Two properties of the Poisson process are the superposition property and
decomposition property [6, 7].
The superposition (additive) property states that the superposition of Poisson
processes is also a Poisson process, as illustrated in Fig. 3.7.
Thus, the sum of n independent Poisson processes with parameters λk , k ¼ 1, 2,
, n is a Poisson process with parameter λ ¼ λ1 þ λ2 þ þ λn .
The decomposition (splitting) property is just the reverse of the superposition
property. If a Poisson stream is split into k substreams, each substream is also
Poisson, as illustrated in Fig. 3.8.
3.5 Sample Random Processes 79
λ3 λ
⋅
⋅
λN
pNl
Birth-death
Processes
Poisson
Processes
The MATLAB software can be used to reinforce the concepts learned in this
chapter. It can be used to generate a random process X(t) and calculate its statistics.
It can also be used to plot X(t) and its autocorrelation function.
MATLAB provides command rand for generating uniformly distributed ran-
dom numbers between 0 and 1. The uniform random number generator can then be
used to generate a random process or the PDF of an arbitrary random variable. For
example, to generate a random variable X uniformly distributed over (a,b), we use
X ¼ a þ ða bÞU (3.40)
10
-2
-4
-6
-8
-10
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
We may find the mean and standard deviation using MATLAB commands mean
and std respectively. For example, the standard deviation is found using
» std(x)
ans ¼
7.1174
where the result is a bit off from the exact value of 7.0711 obtained from Example
3.2. The reason for this discrepancy is that we selected only 201 points. If more
points, say 10,000, are selected the two results should be very close.
We will now use MATLAB to generate a Bernoulli random process, which is
used in data communication. The process consists of random variables which
assume only two states or values: +1 and 1 (or +1 and 0). In this particular
case, the process may also be regarded as random binary process. The probability
of X(t) being +1 is p and 1 is q ¼ 1 p. Therefore, to generate a Bernoulli
random variable X, we first use MATLAB rand to generate a random variable U
that uniformly distributed over (0,1). Then, we obtain
1, if U p
X¼ (3.42)
1, if U > p
i.e. we have partitioned the interval (0,1) into two segments of length p and 1 p.
The following MATLAB program is used to generate a sample function for the
random process. The sample function is shown in Fig. 3.11.
82 3 Stochastic Processes
3.8 Summary
Problems
3.4 Let Y(t) ¼ X(t 1) + cos3t, where X(t) is a stationary random process.
Determine the autocorrelation function of Y(t) in terms of RX(τ).
3.5 If Y(t) ¼ X(t) X(t α), where α is a constant and X(t) is a random
process. Show that
3.6 A random stationary process X(t) has mean 4 and autocorrelation functon
RX ðτÞ ¼ 5e2jτj
(a) If Y(t) ¼ X(t 1), find the mean and autocorrelation function of Y(t).
(b) Repeat part (a) if Y(t) ¼ tX(t).
3.7 Let Z(t) ¼ X(t) + Y(t), where X(t) and Y(t) are two independent stationary
random processes. Find RZ(τ) in terms of RX(τ) and RY(τ).
3.8 Repeat the previous problem if Z(t) ¼ 3X(t) + 4Y(t).
3.9 If X(t) ¼ Acosωt, where ω is a constant and A random variables with mean μ
and variance σ2, (a) find < x(t) > and mX(t). (b) Is X(t) ergodic?
3.10 A random process is defined by
where ω is a constant and A and B are independent random variable with zero
mean. Show that X(t) is stationary and also ergodic.
3.11 N(t) is a stationary noise process with zero mean and autocorrelation function
No
RN ð τ Þ ¼ δ ðτ Þ
2
where No is a constant. Is N(t) ergodic?
3.12 X(t) is a stationary Gaussian process with zero mean and autocorrelation
function
(a) RXY ðτÞj 1 ½RX ð0Þ þ RY ð0Þ
2
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
(b) RXY ðτÞj RX ð0ÞRY ð0Þ
3.20 Let N(t) be a renewal process where renewal epochs are Erlang with
parameters (m,λ). Show that
X
nmþm1
ðλtÞk λt
Prob½N ðtÞ ¼ n ¼ e
k¼nm
k!
π
XðtÞ ¼ 2 cos 2πt þ B½n
4
where B[n] is a Bernoulli random sequence taking the values of +1 and 1.
Take 0 < t < 3 s.
References
1. X. R. Li, Probability, Random Signals, and Statistics. Boca Raton, FL: CRC Press, 1999,
pp. 259-313.
2. G. R. Grimmett and D. R. Stirzaker, Probability and Random Processes. New York: Oxford
University Press, 3rd ed., 2001, pp. 360-374.
3. R. Nelson, Probability, Stochastic Processes, and Queueing Theory. New York: Springer-
Verlag, 1995, pp. 235-282.
4. D. Claiborne, Mathematical Preliminaries for Computer Networking. New York: John Wiley
& Sons, 1990, pp. 35-42.
5. S. M. Ross, Stochastic Processes. New York: John Wiley & Sons, 1983.
6. R. Jain, The Art of Computer Systems Performance Analysis. New York: John Wiley, 1991,
pp. 516-517.
7. J. Medhi, Stochastic Models in Queueing Theory. Boston, MA: Academic Press, 1991, p. 31.
8. R. Goodman, Introduction to Stochastic Models. Mineola, NY: Dover Publications, 2nd ed.,
2006.
9. O. C. Ibe, Fundamentals of Applied Probability and Random Processes. Burlington, MA:
Elsevier Academic Press, 2005.
10. J. C. Falmagne, Lectures in Elementary Probability Theory and Stochastic Processes. New
York: McGraw-Hill, 2003.
Chapter 4
Queueing Theory
Queueing is simply waiting in lines such as stopping at the toll booth, waiting in line
for a bank cashier, stopping at a traffic light, waiting to buy stamps at the post office,
and so on.
A queue consists of a line of people or things waiting to be served and a service center with
one or more servers.
For example, there would be no need of queueing in a bank if there are infinite
number of people serving the customers. But that would be very expensive and
impractical.
Queueing theory is applied in several disciplines such as computer systems,
traffic management, operations, production, and manufacturing. It plays a signifi-
cant role in modeling computer communication networks. Since the mid-1960s
performance evaluation of computer communication systems are usually made
using queueing models.
Reduced to its most basic form, a computer network consists of communica-
tion channels and processors (or nodes). As messages flow from node to node,
queues begin to form different nodes. For high traffic intensity, the waiting or
queueing time can be dominant so that the performance of the network is dictated
by the behavior of the queues at the nodes. Analytical derivation of the waiting
time requires a knowledge of queueing theory. Providing the basic fundamentals
of queueing theory needed for the rest of the book will be our objective in
this chapter.
A=B=C=K=m=z (4.1)
GI: General independent law, i.e. all interarrival/service times are independent
Ek: Erlang’s law of order k
Hk: Hyperexponential law of order k
The most commonly used service disciplines are:
FIFO: first-in first-out
FCFS: first-come first-serve
LIFO: last-in first-out
FIRO: first-in random-out.
It is common in practice to represent a queue by specifying only the first three
symbols of Kendall’s notation. In this case, it is assumed that K ¼ 1, m ¼ 1, and
z ¼ FIFO. Thus, for example, the notation M/M/1 represents a queue in which
arrival times are exponentially distributed, service times are exponentially
distributed, there is one server, the queue length is infinite, the customer population
is infinite, and the service discipline is FIFO. In the same way, an M/G/n queue is
one with Poisson arrivals, general service distribution, and n servers.
Example 4.1 A single-queue system is denoted by M/G/4/10/200/FCFS. Explain
what the operation of the system is.
Solution
The system can be described as follows:
1. The interval arrival times is exponentially distributed.
2. The services times follow a general probability distribution.
3. There are four servers.
4. The buffer size of the queue is 10.
5. The population of customers to be served is 200, i.e. only 200 customers can
occupy this queue.
6. The service discipline is first come, first served.
To obtain the waiting or queueing time, we apply a useful result, known as Little’s
theorem after the author of the first formal proof in 1961. The theorem relates the
mean number of customers in a queue to the mean arrival rate and the mean waiting
time. It states that a queueing system, with average arrival rate λ and mean waiting
time per customer E(W), has a mean number of customers in the queue (or average
queue length) E(Nq) given by
E N q ¼ λEðW Þ (4.2)
The theorem is very general and applies to all kinds of queueing systems. It
assumes that the system is in statistical equilibrium or steady state, meaning that the
90 4 Queueing Theory
4 A(t)
1 D(t)
probabilities of the system being in a particular state have settled down and are not
changing with time.
It should be noted that Eq. (4.2) is valid irrespective of the operating policies of
the queueing system. For example, it holds for an arbitrary network of queues and
serves. It also applies to a single queue, excluding the server.
The theorem can be proved in many ways [2–4]. Three proofs of the theorem are
given by Robertazzi [2]. One of them, the graphical proof, will be given here.
Suppose we keep track of arrival and departure times of individual customers for a
long time to. If to is large, the number of arrivals would approximately equal to the
number of departures. If this number is Na, then
Na
Arrival Rate ¼ λ ¼ (4.3)
to
Let A(t) and D(t) be respectively the number of arrivals and departures in the
interval (0,to). Figure 4.2 shows A(t) and D(t). If we subtract the departure curve
from the arrival curve at each time instant, we get the number of customers in
the system at that moment. The hatched area in Fig. 4.2 represents the total time
spent inside the system by all customers. If this is represented by J,
J
Mean time spent in system ¼ T ¼ (4.4)
Na
J Na J
Mean number of customers in the system ¼ N ¼ ¼ (4.5)
to to N a
or
N ¼ λT (4.6)
ðλtÞk λt
pð k Þ ¼ e , k ¼ 0, 1, 2, (4.7)
k!
(Note that the Poisson arrival process has exponential arrival times.) It is readily
shown that the mean or expected value and variance are given by
X
1
Eð k Þ ¼ kpðkÞ ¼ λt (4.8a)
k¼0
h i
VarðkÞ ¼ E ðk EðkÞÞ2 ¼ λt (4.8b)
One way of analyzing such a queue is to consider its state diagram [5–8] in
Fig. 4.4.
Infinite buffer
Poisson arrivals, λ
λ λ λ λ
0 1 n-1 n n+1
2 . . . . . .
μ μ μ μ
We say that the system is in state n where there are n customers in the system
(in the queue and the server). Notice from Fig. 4.4 that λ is the rate of moving from
state n to n+1 due to an arrival in the system, whereas μ is the rate of moving
from state n to n 1 due to departure when service is completed. If N(t) is
the number of customers in the system (in the queue and the server) at time t,
the probability of the queue being in state n at steady state is given by
Our goal is to find pn and use it to find some performance measures of interest.
Consider when the system is in state 0. Due to an arrival, the rate at which the
process leaves state 0 for state 1 is λpo. Due to a departure, the rate at which
the process leaves state 1 for state 0 is μp1. In order for stationary probability to
exist, the rate of leaving state 0 must equal the rate of entering it. Thus
When the system is in state 1. Since p1 is the proportion of time the system is in
state 1, the total rate at which arrival or departure occurs is λp1 + μp1, which is the
rate at which the process leaves state 1. Similarly, the total rate at which the process
enters state 1 is λp0 + μp2. Applying the rate-equality principle gives
We proceed in this manner for the general case of the system being in state n and
obtain
The right-hand side of this equation denotes the rate of entering state n, while the
left-hand side represents the rate of leaving state n. Equations (4.10–4.12) are called
balance equations.
We can solve Eq. (4.12) in several ways. An easy way is to write Eq. (4.12) as
Thus
or
X
1
pn ¼ 1 (4.17)
n¼0
and obtain
" #
X
1
p0 1 þ ρ n
¼1 (4.18)
n¼1
If ρ < 1, we get
1
p0 ¼1 (4.19)
1ρ
or
p0 ¼ 1 ρ (4.20)
pn ¼ ð1 ρÞρn , n ¼ 1, 2, (4.21)
X
1
U¼ pn ¼ 1 p0 ¼ ρ
n¼1
or
U¼ρ (4.22)
94 4 Queueing Theory
The throughput R of the system is the rate at which customers leave the queue
after service, i.e. the departure rate of the server. Thus
R ¼ μð1 p0 Þ ¼ μρ ¼ λ (4.23)
This should be expected because the arrival and departure rates are equal at
steady state for the system to be stable.
The average number of customers in the system is
X
1 X
1 X
1
Eð N Þ ¼ npn ¼ nð1 ρÞρn ¼ ð1 ρÞ nρn
n¼0 n¼0 n¼0
ρ
¼ ð 1 ρÞ
ð1 ρÞ2
or
ρ
Eð N Þ ¼ (4.24)
1ρ
Eð N Þ 1 ρ
Eð T Þ ¼ ¼ (4.25)
λ λ 1ρ
or
1
Eð T Þ ¼ (4.26)
μ ð1 ρ Þ
This is the mean value of the total time spent in the system (i.e. queue and the
server).
As shown in Fig. 4.5, the average delay E(T) is the sum of the average waiting
time E(W) and the average service time E(S), i.e.
Equivalently, the average number of customers E(N) in the system equals the
sum of the average of customers waiting E(Nq) in the queue and the average number
of customers E(Ns) being served, i.e.
Eð N Þ ¼ E N q þ Eð N s Þ (4.28)
4.3 M/M/1 Queue 95
E(N) = λE(T)
1
Eð W Þ ¼ Eð T Þ (4.29)
μ
or
ρ
Eð W Þ ¼ (4.30)
μð1 ρÞ
We now apply Little’s theorem to find the average queue length or the average
number of customers waiting in the queue, i.e.
ρ2
E N q ¼ λEðW Þ ¼ (4.31)
1ρ
Finally, since E(N ) ¼ λE(T), it is evident from Eqs. (4.27) and (4.28) that
1
EðN s Þ ¼ λEðSÞ ¼ λ ¼ ρ (4.32)
μ
Notice from Eqs. (4.25), (4.31), (4.32) that the Little’s theorem is applied three
times. This is also shown in Fig. 4.5.
Example 4.2 Service at a bank may be modeled as an M/M/1 queue at which
customers arrive according to Poisson process. Assume that the mean arrival rate is
1 customer/min and that the service times are exponentially distributed with mean
40 s/customer. (a) Find the average queue length. (b) How long does a customer
have to wait in line? (c) Determine the average queue size and the waiting time in
the queue if the service time is increased to 50 s/customer.
96 4 Queueing Theory
Solution
As an M/M/1 queue, we obtain mean arrival rate as
λ ¼ 1 customer/min
and the mean service rate as
1 40
EðSÞ ¼ ¼ 40 s=customer ¼ min=customer
μ 60
Hence, the traffic intensity is
λ 2
ρ¼ ¼ ð1Þð40=60Þ ¼
μ 3
(a) The mean queue size is
ρ2 ð2=3Þ2
E Nq ¼ ¼ ¼ 1:333 customers
1 ρ 1 2=3
ρ 2=3ð4=6Þ
E½ W ¼ ¼ ¼ 1:333 min
μð1 ρÞ ð1 2=3Þ
(c) If the mean service time E(S) ¼ 50 s/customer ¼ 50/60 min/customer, then
λ 5
ρ¼ ¼ ð1Þð50=60Þ ¼
μ 6
ρ2 ð5=6Þ2
E Nq ¼ ¼ ¼ 4:1667 customers
1 ρ 1 5=6
ρ 5=6ð5=6Þ
E½ W ¼ ¼ ¼ 4:1667 min
μð1 ρÞ ð1 5=6Þ
We expect the queue size and waiting time to increase if it takes longer time for
customers to be served.
In the previous section, it was assumed that customers arrive individually (or one at
a time) and are provided service individually. In this section, we consider the
possibility of customers arriving in bulk (or in groups or batch) or being served in
bulk. Bulk arrivals/service occur in practice because it is often more economical to
collect a number of items (jobs, orders, etc.) before servicing them.
4.4 M/M/1 Queue with Bulk Arrivals/Service 97
λ λ
4
n μ1
μ μ μ μ
λ λ
Here we consider the situation where arrivals occur in batches of more than one
customer, i.e. in bulk. Although the process is not birth-and-death process, the
arrival instants still occur as a Poisson process with constant rate λ. Each of the
arriving customers is served in standard fashion (first-come, first served, one at a
time) by a server with exponentially distributed service times with parameter μ.
Suppose the size of the batch is fixed at m 1 customers. Then only two transitions
can occur as
n!nþm ðarrivalÞ
or
nþ1!n ðdepartureÞ
and for n 1 is
We now apply the method of z-transforms to solve for pn. We define the
generating function
X
1
GðzÞ ¼ pn z n (4.35)
i¼0
X
1 X
1 X
1
ðλ þ μmÞpn zn ¼ μmpnþ1 zn þ λpnm zn (4.36)
n¼1 n¼1 n¼1
98 4 Queueing Theory
Simplifying yields
μmð1 zÞp0
GðzÞ ¼ (4.37)
μm þ λzmþ1 zðλ þ μmÞ
λm λm
p0 ¼ 1 ¼ 1 ρ, ρ¼ (4.38)
μ μ
This kind of model is used to analyze systems that wait until a certain message size
is reached before releasing the data for transmission. We will assume that
customers are served in bulk of size m, i.e. customers are served m at a time. At
equilibrium, the balance equations are [8, 9]:
X
mþ1
pn ¼ Ci r ni , n0 (4.41)
I¼1
X
1
Using the fact that pn ¼ 1, we obtain
n¼0
where ro is the one and only one root of Eq. (4.40) that is less than one. Comparing
this with Eq. (4.21) shows the similarity between this solution and that of M/M/1.
Hence,
r0
E½N ¼ (4.43)
1 r0
r0
E½T ¼ (4.44)
λð1 r 0 Þ
4.5 M/M/1/k Queueing System 99
In this case, we have situations similar to M/M/1 but the number of customers that
can be queued is limited to k. In other words, this is a system with limited waiting
space. If an arriving customer finds the queue full, it is lost or blocked, as shown in
Fig. 4.7.
Hence,
λ, if 0 n < k
λn ¼ (4.45)
0, nk
μn ¼ μ, 0nk (4.46)
λp0 ¼ μp1
λpk1 ¼ μpk
λ (1− pk )
Arrival rate λ
λ pk (k slots) μ
Lost customers
λ λ λ λ
0 1 2 ... k-2 k-1 k
1
μ μ μ μ
X
k
ρ 1 ρk
E Nq ¼ npn ¼ kρ k
(4.50)
n¼0
1 ρkþ1 1 ρ
ð1 ρÞρk
PB ¼ pk ¼ (4.51)
1 ρkþ1
This is the probability that arriving customer is blocked, i.e. it is lost because it
finds the queue full.
Example 4.3 A system consists of a packet buffer and a communication server and
can hold not more than three packets. Arrivals are Poisson with rate 15 packets/ms
and the server follows exponential distribution with mean 30 packets/ms. Deter-
mine the blocking probability of the system.
Solution
This is an M/M/1/k system with k ¼ 3.
1 15
ρ¼λ ¼ ¼ 0:5
μ 30
The probability is
ð1 ρÞρk ð1 0:5Þ0:53
PB ¼ ¼ ¼ 0:0667
1 ρkþ1 1 0:54
which is about 7 %.
1
λ
•
•
•
λ λ λ λ λ λ
0 1 2 k-2 k-1 k k+1
... ...
μ 2μ 3μ (k - 1)μ kμ kμ kμ
λn ¼ λ (4.52)
nμ, 0 n k
μm ¼
kμ, n k
At steady state,
λ
where ρ ¼ kμ < 1: Solving for p0, we get
" k k
#1
X
k1
ðkρÞn kρ 1
p0 ¼ þ (4.55)
n¼0
n! k! 1 ρ
102 4 Queueing Theory
Measures of effectiveness for this model can be obtained in the usual manner.
The probability that an arriving customer joins the queue is
X X
1 1
p0 kk ρn p0 ðkρÞk X nk kk ρk p0
Prob½queueing ¼ PQ ¼ pn ¼ ¼ ρ ¼
n¼k n¼k
k! k! n¼k k! 1 ρ
or
k k ρk p0
PQ ¼ (4.56)
k! 1 ρ
Using Little’s theorem, the average time spent E[T] in the system can be
obtained as
E½ N 1 1 P Q
E½ T ¼ ¼ þ (4.58)
λ μ μk ð1 ρÞ
This is the case in which we have infinite number of servers so that an arriving
customer can always find a server and need not queue This model can be used to
study the effect of delay in large systems. The state transition diagram for the M/M/
1 system is shown in Fig. 4.11.
Like we did before, we assume a Poisson arrivals at rate λ and exponentially
distributed service times with mean 1/μ. We adopt a birth-and-death process with
parameters
λn ¼ λ, n ¼ 0, 1, 2, (4.59)
λ λ λ
λ
0 1 2 ... n n+1
nμ
μ 2μ (n + 1)μ
μn ¼ nμ, n ¼ 1, 2, (4.60)
ρn
pn ¼ p (4.62)
n! 0
X
1
where ρ ¼ λ/μ. Applying the normalization condition pn ¼ 1 gives
n¼0
p0 ¼ eρ (4.63)
U ¼ 1 p0 ¼ 1 eρ (4.64)
X
1
E½N ¼ npn ¼ ρ (4.65)
n¼0
We apply Little’s theorem in finding the average time spent in the system.
E½ N 1
E½ T ¼ ¼ (4.66)
λ μ
Also,
E Nq ¼ 0 ¼ E Wq (4.67)
i.e. the average waiting time and the average number of customers waiting in the
queue are both zero.
τ ¼ 1/μ, and variance σ 2), and one server. To derive the average waiting time of the
M/G/1 model requires some effort beyond the scope of this book. The derivation
involves applying the method of z-transform or generating functions and is provided
in the Appendix A for the curious student. The result is [10–12]:
ρτ σ2
Eð W Þ ¼ 1þ 2 (4.68)
2ð 1 ρÞ τ
ρ2 σ2
E Nq ¼ λEðW Þ ¼ 1þ 2 (4.69)
2ð 1 ρÞ τ
ρτ σ2
EðT Þ ¼ EðW Þ þ τ ¼ 1þ 2 þτ (4.70)
2ð1 ρÞ τ
ρ2 σ2
Eð N Þ ¼ 1þ 2 þρ (4.72)
2ð 1 ρÞ τ
We may now obtain the mean waiting time for the M/M/1 and M/D/1 queue
models as special cases of the M/G/1 model.
For the M/M/1 queue model, a special case of the M/G/1 model, the service
times follow an exponential distribution with mean τ ¼ 1/μ and variance σ 2. That
means,
HðtÞ ¼ Prob½X t ¼ 1 eμt (4.73)
Hence,
σ 2 ¼ τ2 (4.74)
ρτ
Eð W Þ ¼ (4.75)
ð1 ρÞ
4.8 M/G/1 Queueing System 105
The M/D/1 queue is another special case of the M/G/1 model. For this model, the
service times are constant with the mean value τ ¼ 1/μ and variance σ ¼ 0. Thus
Pollaczek-Khintchine formula in Eq. (4.68) gives the mean waiting time as
ρτ
Eð W Þ ¼ (4.76)
2ð1 ρÞ
It should be noted from Eqs. (4.75) and (4.76) that the waiting time for the M/D/
1 model is one-half that for the M/M/1 model, i.e.
ρτ 1
EðW ÞM=D=1 ¼ ¼ EðW ÞM=M=1 (4.77)
2ð 1 ρÞ 2
λ ¼ pb μ
or
λ
pb ¼ ¼ρ
μ
The Prob. that the system is empty is
pe ¼ 1 pb ¼ 1 ρ
(b) The server is busy only when there are arrivals. Hence the average length of
time between busy periods ¼ average interarrival rate ¼ 1/λ.
Alternatively, we recall that if t is the interarrival time,
f ðtÞ ¼ λeλt
Eð BÞ
pb ¼ ρ ¼
Eð BÞ þ Eð I Þ
106 4 Queueing Theory
Eð BÞ
ρ¼
EðBÞ þ 1λ
ρ X
EðBÞ ¼ ¼
λ ð1 ρ Þ 1 ρ
as required.
The average no. of customers served in a busy period is
Hence
1
N b ¼ EðBÞ=X ¼
1ρ
In this case, the service time distribution is Erlang distribution with parameters μ
and k, i.e.
μðμxÞk1 μx
f X ðxÞ ¼ e , x0 (4.78)
ðk 1Þ!
k k
E½X ¼ , Var½X ¼ (4.79)
μ μ2
This should be regarded as another special case of M/G/1 system so that
Pollaczek-Khintchine formula in Eq. (4.68) applies. Thus,
1þk λ 1þk ρ
E Wq ¼ ¼ (4.80)
2k μðμ λÞ 2k μð1 ρÞ
1þk λ2 1 þ k ρ2
E N q ¼ λE W q ¼ ¼ (4.81)
2k μðμ λÞ 2k 1 ρ
4.10 Networks of Queues 107
1
E½ T ¼ E W q þ (4.82)
μ
where ρ ¼ λ/μ.
The queues we have considered so far are isolated. In real life, we have a network of
queues interconnected such as shown in Fig. 4.12. Such networks of queues are
usually complicated and are best analyzed using simulation. However, we consider
two simple ones here [13–15].
Consider two M/M/1 queues in tandem, as shown in Fig. 4.13. This is an example of
open queueing network.
The state diagram is shown in Fig. 4.14. From the sate diagram, we can obtain
the balance equations.
μ1 μ2
λ λ λ ...
0, 0 1, 0 2, 0 i, 0
μ2
μ1
μ2 μ1
λ
0, 1 1, 1
μ2 μ1
0, 2
Fig. 4.14 The state diagram for two M/M/1 queues in tandem
Let
λ
pi ¼ ð1 ρ1 Þρi1 , ρ1 ¼ (4.88)
μ1
λ
pj ¼ ð1 ρ2 Þρj2 , ρ2 ¼ (4.89)
μ2
4.11 Jackson Networks 109
λ λ1 μ
1-p
λ
pi, j ¼ ð1 ρ1 Þð1 ρ2 Þρi1 ρj2 , ρ1 ¼ (4.90)
μ1
λ
λ1 ¼ λ þ λ1 p ! λ1 ¼ (4.91)
1p
A Jackson network has a steady state solution in product form. Such product-form
queueing networks can be open or closed. The nature of such networks allows us to
decouple the queues, analyze them separately as individual systems, and then
combine the results. For example, consider a series of k single-server queues with
exponential service time and Poisson arrivals, as shown in Fig. 4.16.
Customers entering the system join queue at each stage. It can be shown that
each queue can be analyzed independently of other queues. Each queue has an
arrival and a departure rate of λ. If the ith server has a service rate of μi, the
utilization of the ith server is
λ
ρi ¼ (4.92)
μi
110 4 Queueing Theory
λ
...
μ1 μ2 μk
and
This is known as Jackson theorem, after J.R. Jackson who first proved the
property. The queueing network is therefore a product-form network. A network
to which Jackson’s theorem is applicable is known as Jackson network. In general,
for a product-form network
1Y k
Pðn1 ; n2 ; ; nk Þ ¼ ρni (4.95)
G i¼1 i
4.12 Summary
Problems
4.1 For the M/M/1 system, find: (a) E(N2) , (b) E(N(N 1)), (c) Var(N).
4.2 In an M/M/1 queue, show that the probability that the number of messages
waiting in the queue is greater than a certain number m is
4.3 For an M/M/1 model, what effect will doubling λ and μ have on E[N], E[Nq],
and E[W]?
4.4 Customers arrive at a post office according to a Poisson process with
20 customers/h. There is only one clerk on duty. Customers have exponential
distribution of service times with mean of 2 min. (a) What is the average
number of customers in the post office? (b) What is the probability that an
arriving customer finds the clerk idle?
4.5 From the balance equation for the M/M/1 queue, obtain the probability
generating function.
4.6 An air-line check-in counter at Philadelphia airport can be modeled as an
M/M/1 queue. Passengers arrive at the rate of 7.5 customers per hour and the
service takes 6 min on the average. (a) Find the probability that there are fewer
than four passengers in the system. (b) On the average, how long does each
passenger stay in the system? (c) On the average, how many passengers need
to wait?
4.7 An observation is made of a group of telephone subscribers. During the 2-h
observation, 40 calls are made with a total conversation time of 90 min.
Calculate the traffic intensity and call arrival rate assuming M/M/1 system.
4.8 Customers arrive at a bank at the rate of 1/3 customer per minute. If X denotes
the number of customers to arrive in the next 9 min, calculate the probability
that: (a) there will be no customers within that period, (b) exactly three
customers will arrive in this period, and (c) at least four customers will arrive.
Assume this is a Poisson process.
4.9 At a telephone booth, the mean duration of phone conversation is 4 min. If no
more than 2-min mean waiting time for the phone can be tolerated, what is the
mean rate of the incoming traffic that the phone can support?
4.10 For an M/M/1 queue operating at fixed ρ ¼ 0.75, answer the following
questions: (a) Calculate the probability that an arriving customer finds the
queue empty. (b) What is the average number of messages stored? (c) What is
the average number of messages in service? (d) Is there a single time at which
this average number is in service?
4.11 At a certain hotel, a lady serves at a counter and she is the only one on duty.
Arrivals to the counter seem to follow the Poisson distribution with mean of
10 customers/h. Each customer is served one at a time and the service time
follows an exponential distribution with a mean of 4 min.
112 4 Queueing Theory
4.12 (a) The probability pn that an infinite M/M/2 queue is in state n is given by
8
> ð 1 ρÞ
>
> , n¼0
< ð 1 þ ρÞ
pn ¼
>
> 2ð 1 ρÞ 2
>
: ð 1 þ ρÞ ρ , n0
λ
where ρ ¼ 2μ . Find the average occupancy E(N) and the average time delay in
the queue E(T).
4.13 Consider M/M/k model. Show that the probability of any server is busy is =kμ.
λ
4.14 For the M/M/1/k system, let qn be the probability that an arriving customer
finds n customers in the system. Prove that
pn
qn ¼
1 pk
References
1. D. G. Kendall, “Some problems in the theory of queues,” J. Roy. Statis. Soc. Series B, vol.
13, 1951, pp. 151–185.
2. T. G. Robertazzi, Computer Networks and Systems: Queueing Theory and Performance
Evaluation. New York: Springer-Verlag, 1990, pp. 43-47.
3. S. Eilon, “A Simpler Proof of L ¼ λW,” Operation Research, vol. 17, 1969, pp. 915–916.
4. R. Jain, The Art of Computer Systems Performance Analysis. New York: John Wiley, 1991,
pp. 513-514.
5. J. Medhi, Stochastic Models in Queueing Theory. San Diego, CA: Academic Press, 1991,
pp. 71–75.
6. G. C. Cassandras, Discrete Event Systems. Boston, MA: Irwin, 1993, pp.349-354, 404-413.
7. M. Schartz, Telecommunication Networks. Reading, MA: Addison-Wesley, 1987, pp. 21-69.
8. D. Gross and C. M. Harris, Fundamentals of Queueing Theory. New York: John Wiley, 1998,
3rd ed., pp. 116-164.
9. E. Gelenbe and G. Pujolle, Introduction to Queueing Networks. Chichester, UK: John Wiley &
Sons, 1987, pp. 94-95.
10. R. Nelson, Probability, Stochastic Processes, and Queueing Theory. New York: Springer-
Verlag, 1995, pp. 295–309.
11. R. B. Cooper, Introduction to Queueing Theory. New York: North-Holland, 2nd ed., 1981,
pp. 208-222.
12. R. B. Cooper, “Queueing Theory,” in D. P. Heyman (ed.), Handbooks in Operations Research
and Management Science. New York: North-Holland, 1990, chap. 10, pp. 469-518.
13. P. J.B. King, Computer and Communication System Performancd Modelling. New York:
Prentice Hall,1989.pp.124-130
14. P. G. Harrison and N. M. Patel, Performance Modelling of Communication Networks and
Computer Architecture. Wokingham, UK: Addison-Wesley, 1993, pp. 258-297.
15. M. K. Molloy, Fundamentals of Performance Modeling. New York: MacMillan, 1989,
pp. 193-248.
16. L. Kleinrock, Queueing Systems. New York: John Wiley, 1975, vol. I.
17. J. D. Claiborne, Mathematical Preliminaries for Computer Networking. New York: John
Wiley, 1990.
18. O. C. Ibe, Markov Processes for Stochastic Modeling. Burlington, MA: Elsevier Academic
Press, 2009, pp. 105-152.
19. —, Fundamentals of Stochastic Networks. New York: John Wiley & Sons, 2011.
20. J. F. Hayes and T. V. J. G. Babu, Modeling and Analysis of Telecommunications Networks.
New York: Wiley-Interscience, 2004, pp. 67-112.
21. A. M. Haghighi and D. P. Mishev, Queueing Models in Industry and Business. New York:
Nova Science Publishers, 2008.
22. G. R. Dattatreya, Performance Analysis of Queuing and Computer Networks. Boca Raton, FL:
CRC Press, 2008.
Chapter 5
Simulation
The previous chapter dealt with one of the tools for performance analysis—queueing
theory. This chapter concentrates on another tool—simulation. In this chapter, we
provide an overview of simulation: its historical background, importance,
characteristics, and stages of development.
There is a lot of confusion among students as to what simulation is really about.
Some confuse simulation with emulation or numerical modeling. While emulation
is building a prototype (either hardware or software or combination of both) to
mimic the real system, simulation is “the process of designing a mathematical or
logical model of a real system and then conducting computer-based experiments
with the model to describe, explain, and predict the behavior of the real system”
[1]. In other words, simulation is modeling the real system, while emulation is an
imitation of the system.
Simulation is designing a model that resembles a real system in certain important aspects.
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 115
DOI 10.1007/978-3-319-01646-7_5, © Springer International Publishing Switzerland 2013
116 5 Simulation
A large number of factors influence the decision to use any particular scientific
technique to solve a given problem. The appropriateness of the technique is one
consideration, and economy is another. In this section, we consider the various
advantages of using simulation as a modeling technique.
A system can be simplified to an extent that it can be solved analytically. Such an
analytical solution is desirable because it leads to a closed form solution (such as in
Chap. 4) where the relationship between the variables is explicit. However, such a
simplified form of the system is obtained by many several assumptions so as to
make the solution mathematically tractable. Most real-life systems are so complex
that some simplifying assumptions are not justifiable, and we must resort to
simulation. Simulation imitates the behavior of the system over time and provides
data as if the real system were being observed.
Simulation as a modeling technique is attractive for the following reasons [4, 5]:
(1) It is the next best thing to observing a real system in operation.
(2) It enables the analysis of very complicated systems. A system can be so
complex that its description by a mathematical model is beyond the capabilities
of the analyst. “When all else fails” is a common slogan for many such
simulations.
(3) It is straightforward and easy to understand and apply. It does not rely heavily
on mathematical abstractions which require an expert to understand and apply.
It can be employed by many more individuals.
(4) It is useful in experimenting with new or proposed design prior to implementa-
tion. Once constructed, it may be used to analyze the system under different
conditions. Simulation can also be used in assessing and improving an existing
system.
(5) It is useful in verifying or reinforcing analytic solutions.
A major disadvantage of simulation is that it may be costly because it requires
large expenditure of time in construction, running, and validation.
5.2 Characteristics of Simulation Models 117
This characteristic has to do with the model variables. A continuous model is one in
which the state variables change continuously with time. The model is
characterized by smooth changes in the system state. A discrete model is one in
which state variables assume a discrete set of values. The model is characterized by
discontinuous changes in the system state. The arrival process of messages in the
queue of a LAN is discrete since the state variable (i.e. the number of waiting
messages) changes only at the arrival or departure of a message.
This characteristic deals with the system response. A system is deterministic if its
response is completely determined by its initial state and input. It is stochastic
(or non-deterministic) if the system response may assume a range of values for
given initial state and input. Thus only the statistical averages of the output
measures of a stochastic model are true characteristics of the real system.
The simulation of a LAN usually involves random interarrival times and random
service times.
Since simulation is the dynamic portray of the states of a system over time, a
simulation model must be driven by an automatic internal clock. In time-based
simulation, the simulation clock advances one “tick” of Δt. Figure 5.1 shows the
flowchart of a typical time-based simulation model.
118 5 Simulation
T = T + ΔT
Generate
events
No
T ≥ Tmax
Yes
STOP
Initialize
variables
Determine
next event
T = Tnextevent
Generate
next event
Update
statistics
No
T ≥Tmax
Yes
STOP
Process
Activity 1
Activity 2
Once it has been decided that software simulation is the appropriate methodology to
solve a particular problem, there are certain steps a model builder must take. These
steps parallel six stages involved in model development. (Note that the model is the
computer program.) In programming terminology, these stages are [5, 9, 10]:
(1) Model building, (2) program synthesis, (3) model verification, (4) model vali-
dation, (5) model analysis, and (6) documentation. The relationship of the stages is
portrayed in Fig. 5.4, where the numbers refer to the stages.
1. Model Building: This initial stage usually involves a thorough, detailed study of
the system to decompose it into manageable levels of detail. The modeler often
simplifies components or even omit some if their effects do not warrant their
inclusion. The task of the modeler is to produce a simplified yet valid abstraction
of the system. This involves a careful study of the system of interest. The study
should reveal interactions, dependence, and rules governing the components of
the system. It should also reveal the estimation of the system variables and
parameters. The modeler may use flowcharts to define or identify subsystems
and their interactions. Since flowcharting is a helpful tool in describing a
problem and planning a program, commonly used symbols are shown in
Fig. 5.5. These symbols are part of the flowcharting symbols formalized by the
American National Standards Institute (ANSI). The modeler should feel free to
adapt the symbols to his own style.
2. Program Synthesis: After a clear understanding of the simplified system and the
interaction between components is gained, all the pieces are synthesized into a
coherent description, which results in a computer program. The modeler must
decide whether to implement the model in a general-purpose language such as
FORTRAN or C++ or use a special-purpose simulation language such GASP,
5.3 Stages of Model Development 121
1 Model
building
2 Program
synthesis
3
Verified? No
Yes
No
4 Validated?
Yes
5
Analysis
6
Documentation
Implementation
Symbol Meaning
4. Model Validation: This stage is the most crucial. Since models are simplified
abstractions, the validity is important. A model is validated by proving that the
model is a correct representation of the real system. A verified program can
represent an invalid model. This stage ensures that the computer model matches
the real system by comparing the two. This is easy when the real system exists.
It becomes difficult when the real system does not exist. In this case, a simulator
can be used to predict the behavior of the real system. Validation may entail using
a statistical proof of correctness of the model. Whichever validation approach is
used, validation must be performed before the model can be used. Validation may
uncover further bugs and even necessitate reformulation of the model.
5. Model Analysis: Once the model has been validated, it can be applied to solve
the problem at hand. This stage is the reason for constructing the model in the
first place. It involves applying alternate input parameters to the program and
observing their effects of the output parameters. The analysis provides estimate
measures of performance of the system.
6. Documentation: The results of the analysis must be clearly and concisely
documented for future references by the modeler or others. An inadequately
documented program is usually useless to everyone including the modeler
himself. Thus the importance of this step cannot be overemphasized.
a ¼ multiplier(a 0),
c ¼ increment (c 0),
m ¼ the modulus
The modulus m is usually 2t for t-digit binary integers. For a 31-bit computer
machine, for example, m may be 231 1. Here Z0, a, and c are integers in the same
range as m > a, m > c, m > Z0.
The desired sequence of random numbers Zn is obtained from
7, 6, 9, 0, 7, 6, 9, 0, . . . (5.4)
Znþ1
U¼ (5.5)
m
U can only assume values from the set {0, 1/m, 2/m, . . ., (m 1)/m}. A set of
uniformly distributed random numbers can be generated using the following
procedure:
(a) Select an odd number as a seed value Z0.
(b) Select the multiplier a ¼ 8r 3, where r is any positive integer and a is close
to 2t/2. If t ¼ 31, a ¼ 215 + 3 is a good choice.
(c) Compute Zn + 1 using either the multiplicative generator
X ¼ A þ ðB AÞU (5.8)
Random numbers based on the above mathematical relations and computer-
produced are not truly random. In fact, given the seed of the sequence, all numbers
U of the sequence are completely predictable or deterministic. Some authors empha-
size this point by calling such computer-generated sequences pseudorandom numbers.
Example 5.1 (a) Using linear congruential scheme, generate ten pseudorandom
numbers with a ¼ 573, c ¼ 19, m ¼ 103, and seed value Z0 ¼ 89. Use these
numbers to generate uniformly distributed random numbers 0 < U < 1.
(b) Repeat the generation with c ¼ 0.
Solution
(a) This is a multiplicative generator. Substituting a ¼ 573, c ¼ 19, m ¼ 1,000,
and Z0 ¼ 89 in Eq. (5.3) leads to
Z1 ¼ 573 89 + 19 (mod 1,000) ¼ 16
Z2 ¼ 573 16 + 19 (mod 1,000) ¼ 187
Z3 ¼ 573 187 + 19 (mod 1,000) ¼ 170
Z4 ¼ 573 170 + 19 (mod 1,000) ¼ 429
Z5 ¼ 573 429 + 19 (mod 1,000) ¼ 836
Z6 ¼ 573 836 + 19 (mod 1,000) ¼ 47
Z7 ¼ 573 47 + 19 (mod 1,000) ¼ 950
Z8 ¼ 573 950 + 19 (mod 1,000) ¼ 369
Z9 ¼ 573 369 + 19 (mod 1,000) ¼ 456
Z10 ¼ 573 456 + 19 (mod 1,000) ¼ 307
Dividing each number by m ¼ 1,000 gives U as
0.016, 0.187, 0.170, . . .,0.307
(b) For c ¼ 0, we have the mixed generator. Thus, we obtain
Z1 ¼ 573 89 (mod 1,000) ¼ 997
Z2 ¼ 573 997 (mod 1,000) ¼ 281
Z3 ¼ 573 281 (mod 1,000) ¼ 13
Z4 ¼ 573 13 (mod 1,000) ¼ 449
Z5 ¼ 573 449 (mod 1,000) ¼ 277
Z6 ¼ 573 277 (mod 1,000) ¼ 721
Z7 ¼ 573 721 (mod 1,000) ¼ 133
Z8 ¼ 573 133 (mod 1,000) ¼ 209
5.5 Generation of Random Variables 125
X ¼ μlnð1 U Þ (5.11)
X ¼ μlnU (5.12)
A number of distributions which can be generated using the inverse method are
listed in Table 5.1.
The rejection method can be applied to the probability distribution of any
bounded variable. To apply the method, we let the probability density function
of the random variable f(x) ¼ 0 for a > x > b, and let f(x) be bounded by M
(i.e. f(x) M) as shown in Fig. 5.6.
We generate random variate by taking the following steps:
(1) Generate two random numbers (U1, U2) in the interval (0,1).
(2) Compute two random numbers with uniform distributions in (a,b) and (0,M)
respectively, i.e.
X ¼ a + (b a) U1 (scale the variable on the x-axis)
Y ¼ U2 M (scale the variable on the y-axis).
126 5 Simulation
a b x
(3) If Y f(X), accept X as the next random variate, otherwise reject X and return
to Step 1.
Thus in the rejection technique all points falling above f(x) are rejected while those
points falling on or below f(x) are utilized to generate X through X ¼ a + (b a)U1.
The C codes for generating uniform and exponential variates using Eqs. (5.8)
and (5.12) are shown in Fig. 5.7. RAND_MAX is defined in stdlb.h and defines the
maximum random number generated by the rand() function. Also, EX represents
the mean value of the exponential variates.
Other random variables are generated as follows [14]:
• Bernoulli variates: Generate U. If U p, return 0. Otherwise, return 1.
• Erlang variates: Generate U in m places and then
!
Y
m
Erlangða; mÞ aln Uk
k¼1
For illustration purposes, we now apply the ideas in the previous sections specifi-
cally to M/M/1 and M/M/n queueing systems. Since this section is the heart of this
chapter, we provide a lot of details to make the section as interesting, self-
explanatory, and self-contained as possible.
As shown in Fig. 5.8, the M/M/1 queue consists of a server which provides service
for the customers who arrive at the system, receive service, and depart. It is a single-
server queueing system with exponential interarrival times and exponential service
times and first-in-first-out queue discipline. If a customer arrives when the server is
busy, it joins the queue (the waiting line).
There are two types of events: customer arrivals (A) and departure events (D).
The following quantities are needed in representing the model [15, 16]:
AT ¼ arrival time
DT ¼ departure time
BS ¼ Busy server (a Boolean variable)
QL ¼ queue length
RHO ¼ traffic intensity
ART ¼ mean arrival time
SERT ¼ mean service time
CLK ¼ simulation global clock
CITs ¼ customer interarrival times (random)
CSTs ¼ customer service times (random)
TWT ¼ total waiting time
NMS ¼ total no. of messages (or customers) served
The global clock CLK always has the simulated current time. It is advanced by
AT, which is updated randomly. The total waiting time TWT is the accumulation of
the times spent by all customers in the queue.
The simulator works as shown in the flowchart in Fig. 5.9a and explained as
follows. As the first step, we initialize all variables.
128 5 Simulation
a
Start
Initialize
variables
Yes No
AT<DT
A C
Arrival Departure
Event Event
B D
Stop
No
Simulation?
Yes
Compute mean
values of
output variables
Stop
Fig. 5.9 (a) Flowchart for the simulation of M/M/1 queue, (b) flowchart of the arrival event, (c)
flowchart for the departure event
5.6 Simulation of Queueing Systems 129
b A
TWT=TWT+QL*(AT-CLK)
CLK=AT
X=RANDOM NO. 0<X<1
CIT = ART*LOG(X)
AT=CLK+CIT
Yes No
BS=FALSE
QL=QL+1
BS=TRUE
X = RANDOM NO. 0<X<1
CST= -SERT*LOG(X)
DT=CST+CLK
c
C
TWT=TWT+QL*(DT-CLK)
CLK=DT
BS = FALSE
NMS=NMS + 1
Yes No
QL>0 ?
BS=TRUE DT=BIGTIME
QL = QL –1
X=RANDOM NO. 0<X<1
CST =SERT*LOG(X)
DT=CST+CLK
Simulation time
First
departure
Scheduled departure time
0 t0 t1
Interarrival time
First Next
arrival arrival
.
.
.
TWT
Average queue length ¼ (5.13)
CLK
TWT
Average waiting time ¼ (5.14)
NMS
Figure 5.11 shows a M/M/n queue, in which n servers are attached to a single queue.
Customers arrive following a Poisson counting process (i.e., exponential
interarrival times). Each server serves the customers with exponentially distributed
service times. Here, we assume that the mean service time is the same for all of the
servers. If all the servers are busy, a new customer joins the queue. Otherwise, it
will be served by one of the free servers. After serving a customer, the server can
serve the customer waiting ahead of queue, if any.
With a careful observation of the way that the customers are served, we can
extend the C program for M/M/1 queue to take care of the more general, M/M/n
queue. The following quantities should be defined as arrays instead of scalar
quantities:
DT[j]—departure time from the jth server, j ¼ 1,2,. . ., n
BS[j]—busy server jth, j ¼ 1,2,. . ., n
We also define a variable named SERVER which is associated with the current
event. The other quantities remain unchanged from the M/M/1 model. Figure 5.12a
illustrates the flowchart of simulator for M/M/n queue.
As the first step, we initialize all variables at the start of the program just like
for the M/M/1 queue (Fig. 5.9). The only difference here is with the two arrays for
BS and DT.
132 5 Simulation
a
Start
Initialize variables
Yes No
Is this an
arrival
event? Identify the “server”
A
associated with this event
Arrival
C
Event
B Departure
Event
Stop
No
Simulation?
Yes
Compute mean
values of
output variables
Stop
Fig. 5.12 (a) Flowchart for the simulation of M/M/n queue, (b) flowchart of the arrival event,
(c) flowchart for the departure event
5.6 Simulation of Queueing Systems 133
b A
TWT=TWT+QL*(AT-CLK)
CLK=AT
X=RANDOM NO. 0<X<1
CIT = ART*LOG(X)
AT=CLK+CIT
BS[SERVER]=TRUE
X = RANDOM NO. 0<X<1
CST= -SERT*LOG(X)
DT[SERVER]=CST+CLK
c
C
TWT=TWT+QL*(DT[SERVER]-CLK)
CLK=DT[SERVER]
BS[SERVER] = FALSE
NMS=NMS + 1
Yes No
QL>0 ?
BS[SERVER]=TRUE DT=BIGTIME
QL = QL –1
X=RANDOM NO. 0<X<1
CST =SERT*LOG(X)
DT[SERVER]=CST+CLK
As the third step, the program performs either the arrival or departure routine
(Fig. 5.12b, c), and updates the statistics accordingly. For an arrival event, the
program updates TWT and CLK and then checks to see if a server is free. If all the
servers are busy, the queue is incremented by one. If some servers are free, the first
available one is made busy and scheduled for a departure event. For departure
event, only the server engaged in this event becomes free. If there is no customer in
queue, this server remains idle and its departure event is assigned “bigtime.” When
the queue is not empty, the server will be busy again and the next departure event
will be scheduled.
Example 5.2 (a) Write a computer program to simulate an M/M/1 queue assuming
that the arrival rate has a mean value of 1,000 bps and that the traffic intensity
ρ ¼ 0.1, 0.2,. . ., 0.9. Calculate and plot the average queue length and the average
waiting time in the queue for various values of ρ. Compare your results with the
exact analytical formulas. (b) Repeat part (a) for an M/D/1 queue.
Solution
(a) Based on the flowchart given in Fig. 5.9 and the variables introduced above, we
develop a program in C to implement the simulator for M/M/1 queue. In this
example each single bit represents a customer, and the customers arrive 1,000
per second on average. The simulator runs according to the flowchart for each
value of ρ ¼ 0.1, 0.2, . . .,0.9. For each ρ, the simulator computes the output
variables after enough number of customers (say 10,000) are served. The arrival
rate is λ ¼ 1,000 bps, and the mean interarrival time (1/λ) is 1 ms. For each ρ,
the mean departure rate is μ ¼ λ/ρ and the corresponding mean service time is
1/μ. In Fig. 5.13, the average waiting time and the average queue length for
M/M/1 queue are shown. The results are given for both the simulation and
analytical solution. The analytical formulas for M/M/1 queue are found in
Chap. 4:
ρ
Eð W Þ ¼ (5.15)
μð1 ρÞ
ρ2
E Nq ¼ (5.16)
1ρ
where E(W) and E(Nq) are the average waiting time and queue length
respectively.
(b) For M/D/1 queue, the service times are deterministic or constant. The only
change in the flowchart of Fig. 5.9 is replacing the statement
CST ¼ SERT*LOG(X)
5.6 Simulation of Queueing Systems 135
a 9
8 Analytical Solution
Simulation
7
Average Waiting Time (ms)
0
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Traffic Intensity
b 9
8 Analytical Solution
Simulation
Average Number Of Bits In Queue
0
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Traffic Intensity
Fig. 5.13 (a) Average waiting time for M/M/1 queue; (b) Average queue length for M/M/1 queue
136 5 Simulation
with CST ¼ SERT. The analytical formulas for an M/D/1 queue are found in
Chap. 4, namely:
ρ
Eð W Þ ¼ (5.17)
2μð1 ρÞ
ρ2
E Nq ¼ (5.18)
2ð 1 ρÞ
Figure 5.14 show the results for M/D/1 queue. We notice that both the
average waiting time and queue length are half of their respective values for
M/M/1 queue which is confirmed by simulation.
Example 5.3 Develop a computer program to simulate an M/M/n queue assuming
that the arrival rate has a mean value of 1,000 bps and that traffic intensity ρ ¼ 0.1,
0.2, . . .. Calculate and plot the average waiting time and the average queue length in
the queue for n ¼ 2 and n ¼ 5 servers. Compare the results with those of M/M/1
queue.
Solution
We use the flowcharts in Fig. 5.12 to modify the program of the last example.
Since n servers are serving the customers, the value of ρ can be up to n, without
the queue being congested by high number of customer waiting. The analytical
formulas for the average waiting time E(W) and queue length E(Nq) respectively
are given by:
ρn ðρ=nÞ
Eð W Þ ¼ p0 (5.19)
n!ð1 ρ=nÞ2
E N q ¼ λEðW Þ (5.20)
The average waiting time and the queue length are given in Fig. 5.15a, b.
We observe good agreement between analytical and simulation results. We can
also see that for a particular value of ρ, both the waiting time and queue length are
smaller for the larger number of servers.
5.6 Simulation of Queueing Systems 137
a 4.5
4 Analytical Solution
Simulation
3.5
Average Waiting Time (ms)
2.5
1.5
0.5
0
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Traffic Intensity
b 4.5
4 Analytical Solution
Simulation
Average Number Of Bits In Queue
3.5
2.5
1.5
0.5
0
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Traffic Intensity
Fig. 5.14 (a) Average waiting time for M/D/1 queue; (b) Average queue length for M/D/1 queue
138 5 Simulation
Fig. 5.15 (a) Average waiting time for M/M/n queue, n ¼ 1, 2, 5. (b) Average queue length for
M/M/n queue, n ¼ 1, 2, 5
5.7 Estimation of Errors 139
Simulation procedures give solutions which are averages over a number of tests.
For this reason, it is important to realize that the sample statistics obtained from
simulation experiments will vary from one experiment to another. In fact, the
sample statistics themselves are random variables and, as such, have associated
probability distributions, means, variances, and standard deviation. Thus the
simulation results contain fluctuations about a mean value and it is impossible
to ascribe a 100 % confidence in the results. To evaluate the statistical uncer-
tainty or error in a simulation experiment, we must resort to various statistical
techniques associated with random variables and utilize the central limit
theorem.
Suppose that X is a random variable. You recall that we define the expected or
mean value of X as
ð
1
μ¼ xf ðxÞdx (5.22)
1
1X N
e
μ ¼ xn (5.23)
N n¼1
provides a measure of the spread in the values of e μ about μ; it yields the order of
magnitude of the error. The confidence we place in the estimate of the mean is given by
the variance of e
μ . The relationship between the variance of e
μ and the variance of x is
σ ðxÞ
μ Þ ¼ pffiffiffiffi
σ ðe (5.25)
N
This shows that if we use e μ constructed from N values of xn according to
Eq. (5.23) to estimate μ, then the spread in our results of e
μ about μ is proportional to
σ(x) and falls off as the number of N of samples increases.
In order to estimate the spread in eμ we define the sample variance
140 5 Simulation
1 X N
S2 ¼ ðxn e
x Þ2 (5.26)
N 1 n¼1
Again, it can be shown that the expected value of S2 is equal to σ 2(x). Therefore
the sample variance is an unbiased estimator of σ 2(x). Multiplying out the square
term in Eq. (5.26), it is readily shown that the sample standard deviation is
1=2 " X #1=2
N 1 N 2
S¼ x e
x 2
(5.27)
N1 N n¼1 n
ð
μþε
Prob½μ ε < e
μ < μ þ ε ¼ f ðe
μ Þde
μ (5.29)
με
ðeμ μÞ
By letting λ ¼ pffiffiffiffiffiffi , we get
2=N σ ðxÞ
pffiffiffiffiffiffi
N=2 ðε=σ Þ
ð
2 pffiffiffiffiffiffiffiffiffi ε
eλ dλ ¼ erf
2
μ < μ þ ε ¼ pffiffiffi
Prob½μ ε < e N=2 (5.30)
π σ ðxÞ
0
or
σ σ
Prob μ zα=2 pffiffiffiffi < e
μ < μ þ zα=2 pffiffiffiffi ¼ 1 α (5.31)
N N
where erf(x) is the error function and zα/2 is the upper α/2 100 percentile of the
standard normal deviation. The random intervale x ε is called a confidence interval
5.7 Estimation of Errors 141
pffiffiffiffiffiffiffiffiffi
and erf N=2 ε=σ ðxÞ is the confidence level. Most simulation experiments use
pffiffiffiffi
error ε ¼ σ ðxÞ= N which implies that e
μ is within one standard deviation of μ, the
true mean. From Eq. (5.31), the probability that the sample mean eμ lies within the
pffiffiffiffi
interval e
μ σ ðxÞ= N is 0.6826 or 68.3 %. If higher confidence levels are desired,
two or three standard deviations may be used. For example,
8
< 0:6826, M ¼ 1
σ σ
Prob μ M pffiffiffiffi < e
μ < μ þ M pffiffiffiffi ¼ 0:954, M ¼ 2 (5.32)
N N :
0:997 M ¼ 3
where
Stα=2;N1
ε¼ pffiffiffiffi (5.35)
N
Thus, if a simulation is performed N times by using different seed values, then in
(1 α) cases, the estimate e μ lies within the confidence interval and in α cases the
estimate lies outside the interval, as illustrated in Fig. 5.16. Equation (5.35) provides
the error estimate for a given number N of simulation experiments or observations.
If, on the other hand, an accuracy criterion ε is prescribed and we want to
estimate μ by e μ within tolerance of ε with at least probability 1 α, we must
ensure that the sample size N satisfies
142 5 Simulation
Prob
eμ μ
< ε 1 α (5.36)
Stα=2;N1 2
N pffiffiffi (5.37)
ε
For further discussion on error estimates in simulation, one should consult [17, 18].
Example 5.4 In a simulation experiment, an analyst obtained the mean values of a
certain parameter as 7.60, 6.60, 7.50, and 7.43 for five simulations runs using
different seed values. Calculate the error estimate using a 95 % confidence interval.
Solution
We first get the sample mean
0:48778x2:776
ε¼ pffiffiffi ¼ 0:6056
5
Thus, the 95 % confidence interval for the parameter is
με<e
μ < μ þ ε ¼ 6:6144 < e
μ < 7:78265
5.8 Simulation Languages 143
5.9 OPNET
(DCF) and the point coordination function (PCF). DCF utilizes the carrier sense
multiple access with collision avoidance (CSMA/CA) approach; it is implemented
in all stations in the wireless local area network (WLAN). PCF is based on polling to
determine the station that can transmit next. Stations in an infrastructure network
optionally implement the PCF access method. In addition to the physical CSMA/CD,
DCF and PCF utilize virtual carrier-sense mechanism to determine the state of the
medium. This virtual mechanism is implemented by means of the network allocation
vector (NAV). The NAV provides each station with a prediction of future traffic on the
medium. Each station uses NAV as an indicator of time periods during which
transmission will not be installed even if the station senses that the wireless medium
is not busy. NAV gets the information about future traffic from management frames
and the header of regular frames being exchanged in the network.
With DCF, every station senses the medium before transmitting. The transmit-
ting station defers as long as the medium is busy. After deferral and while the
medium is idle, the transmitting station has to wait for a random backoff interval.
After the backoff interval and if the medium is still idle, the station initiates data
transmission or optionally exchanges RTS (request to send) and CTS (clear to send)
frames with the receiving station. With PCF, the access point (AP) in the network
acts as a point coordinator (PC). The PC uses polling to determine which station can
initiate data transmission. It is optional for the stations in the network to participate
in PCF and hence respond to poll received from the PC. Such stations are called
CF-pollable stations. The PCF requires control to be gained of the medium by the
PC. To gain such control, the PC utilizes the Beacon management frames to set the
network allocation vector (NAV) in the network stations. As the mechanism used to
set NAV is based on the DCF, all stations comply with the PC request to set their
NAV whether or not they are CF-pollable. This way the PC can control frame
transmissions in the network by generating contention free periods (CFP). The PC
and the CF_pollable stations do not use RTSCTS in the CFP.
The standard allows for fragmentation of the MAC data units into smaller
frames. Fragmentation is favorable in case the wireless channel is not reliable
enough to transmit longer frames. Only frames with a length greater than a
fragmentation and will be separately acknowledged. During a contention period,
all fragments of a single frame will be sent as burst with a single invocation of the
DCF medium access procedure. In case of PCF and during a contention free period,
fragments are sent individually following the rules of the point coordinator (PC),
which will based on the following steps:
3. In the Startup Wizard Initial Topology dialog box, make sure that Create Empty
Scenario is selected ! click next ! choose Office from the Network Scale list
and check Use Metric Units ! Click next twice ! click ok.
Repeat the following for each of the nine nodes in Fig. 5.17:
1. Right-click on the node ! Edit Attributes ! Assign to the Wireless LAN MAC
Address attribute a value equal to the node number. Assign to the Destination
Address attribute the corresponding value shown in Table 5.2 ! Click ok.
Figure 5.18 shows the values assigned to the Destination Address and Wireless
LAN MAC Address attributes for node_1.
1. Select all the nodes in the network simultaneously except node_0 ! Right-click
on any of the selected nodes (i.e. node_1 to node_8) ! Edit Attributes !
Check the Apply Changes to Selected Objects check box.
148 5 Simulation
2. Expand the hierarchies of the Traffic Generation Parameters and the Packet
Generation Arguments attributes ! Edit the attributes to match the values
shown in Fig. 5.19 ! Click ok.
3. Select all the nodes in the network simultaneously including node_0 ! Right-
click on any of the selected nodes ! Edit Attributes ! Check the Apply
Changed to Selected Objects check box.
4. Expand the hierarchy of the Wireless LAN Parameters attribute ! Assign the
value 4608000 to the Buffer Size (bits) attribute, as shown in Fig. 5.20 ! Click
ok.
5. Right-click on node_0 ! Edit Attributes ! Expand the Wireless LAN
Parameters hierarchy and set the Access Point Functionality to Enabled, as
shown in Fig. 5.21 ! Click ok.
To test the performance of the network in our DCF scenario, we collect some of the
available statistics as follows:
1. Right-click anywhere in the project workspace and select Choose Individual
Statistics from the pop-up menu.
2. In the Choose Results dialog box, expand the Global Statistics and Node
Statistics hierarchies ! choose the five statistics, as shown in Fig. 5.22.
3. Click ok and then save your project.
5.9 OPNET 149
In the network we just created, we did not utilize many of the features explained in
the overview. However, by default the distributed coordination function (DCF)
method is used for the medium access control (MAC) sublayer. We will create three
more scenarios to utilize the features available from the IEEE 802.11 standard. In
the DCF_Frag scenario we will allow fragmentation of the MAC data units into
smaller frames and test its effect on the network performance. The DCF_PCF
scenario utilizes the point coordination function (PCF) method for the medium
access control (MAC) sublayer along with the DCF method. Finally, in the
DCF_PCF_Frag scenario we will allow fragmentation of the MAC data and
check its effect along with PCF.
1. Select Duplicate Scenario from the Scenarios menu and give it the name
DCF_Frag ! click ok.
5.9 OPNET 151
1. Switch to the DCF scenario, select Duplicate Scenario from the Scenarios menu
and give it the name DCF_PCF ! Click ok ! Save your project.
2. Select node_0, node_1, node_3, node_5 and node_7 in the DCF_PCF scenario
simultaneously ! Right-click on anyone of the selected nodes ! Edit
Attributes.
3. Check Apply Changes to Selected Objects ! Expand the hierarchy of the
Wireless LAN Parameters attribute ! Expand the hierarchy of the PCF
Parameters attribute ! Enable the PCF Functionality attribute, as shown in
Fig. 5.25 ! Click ok.
4. Right-click on node_0 ! Edit Attributes ! Expand the Wireless LAN
Parameters hierarchy and set the Access Point Functionality to Enabled, as
shown in Fig. 5.26.
5. Click ok and save your project.
2. Click on the row of each scenario and click the Collect Results button. This
should change the values under the Results column to < collect > shown in
Fig. 5.27.
3. Click ok to run the four simulations.
4. After the simulation of the four scenarios complete, click Close and then save
your project.
2. Change the drop-down menu in the lower right part of the Compare Results
dialog box from As Is to time-average ! Select the Delay (sec) statistic from
the Wireless LAN hierarchy as shown in Fig. 5.28.
3. Click Show to show the result in a new panel. The resulting graph should
resemble that shown in Fig. 5.29.
5.9 OPNET 155
4. Go to the Compare Results dialog ! Follow the same procedure to show the
graphs of the following statistics from the Wireless LAN hierarchy: Load (bits/s)
and Throughput (bits/s). The resulting graphs should resemble Figs. 5.30
and 5.31.
156 5 Simulation
5. Go to the Compare Results dialog box ! Expand the Object Statistics hierarchy
! Expand the Office Network hierarchy ! Expand the hierarchy of two nodes.
One node should have PCF enabled in the DCF_PCF scenario (e.g., node_3) and
the other node should have PCF disabled (e.g., node_2) ! Show the result of
the Delay (sec) statistic for the chosen nodes. The resulting graphs should
resemble Figs. 5.32 and 5.33.
6. Repeat step 5 above but for the Retransmission Attempts (packets) statistic. The
resulting graphs should resemble Figs. 5.34 and 5.35.
7. Close all graphs and the Compare Results dialog box ! Save your project.
More information about Opnet can be found in [31].
5.10 NS2
Figure 5.36 shows the process of network simulation in NS2. The simulation
using NS2 can carry two levels: first level is based on configuration and con-
struction of OTcl, and second level, is based on OTcl and C++. It is essential for
NS2 to be upgraded or modified to add the required elements when the module
resources needed do not exist. Therefore, the split object model of NS2 is used to
158 5 Simulation
add a new C++ class and an OTcl class, and then program the OTcl scripts to
implement the simulation [34]. The class hierarchies of C++ and OTcl languages
can be either stand alone or linked together using an OTcl/C++ interface called
TclCL [32].
There are three components for whole network simulation using NS2 [35]. First,
modifying the source code. This step is used only when there is a need to modify the
source codes which requires programming and debugging from the users. Indeed,
the OTcl codes need to be modified as the source codes due to that NS2 supports the
OTcl and C++. Second, writing the Tcl/OTcl scripts of network simulations. In fact,
5.10 NS2 159
in this step, it requires the user writing Tcl codes for describing the network
topology types, defining nodes and network component attributes, controlling the
network simulation process. Third, analyzing the network simulation results.
This step requires the user to understand the structure of the NS2 Trace file and
to be able to use some tools to check the outcome data and draw figures, etc.
Figure 5.37 shows the flow chart for simulation in NS2. Although, the general
architecture of the view of the NS2 for the general users can be presented in
Fig. 5.38.
NS2 is primarily useful for simulating LAN and WAN. It has the capability of
supporting the simulations of unicast node and multicast node. It is complemented
by Network Animator (NAM) for packet visualization purposes such as Fig. 5.39
for simulation topology of wireless network [37]. Indeed, NS2 is widely used
network simulator that has been commonly used in education and research.
NS2 has the following limitations [36]:
1. Large multi format outcome files, which require post processing.
2. Huge memory space consumption due to a very large output file.
3. Relatively slow.
4. Lack of built-in-QoS monitoring modules.
5. Lack of user friendly visual output representation.
6. Requires the users to develop tools by themselves.
160 5 Simulation
There are two types of factors that influence the selection of the special-purpose
language an analyst uses in his simulation. One set of factors is concerned with the
operational characteristics of the language, while the other set is related to its
problem-oriented characteristics [38, 39].
In view of the operational characteristics of a language, an analyst must consider
factors such as the following:
5.11 Criteria for Language Selection 161
Fig. 5.39 Network animator interface (NAM) showing the simulation topology of wireless
network [37]
5.12 Summary
1. This chapter has presented the basic concepts and definitions of simulation
modeling of a system.
2. The emphasis of the chapter has been on discrete, stochastic, digital, software
simulation modeling. It is discrete because it proceeds a step at a time. It is
stochastic or nondeterministic because element of randomness is introduced by
using random numbers. It is digital because the computers employed are digital.
It is software because the simulation model is a computer program.
3. Because simulation is a system approach to solving a problem, we have consid-
ered the major stages involved in developing a model of a given system.
These stages are model building.
4. Since simulation output is subject to random error, the simulator would
like to know how close is the point estimate to the mean value μ it is supposed
to estimate. The statistical accuracy of the point estimates is measured in
Problems 163
Problems
5.1 Define simulation and list five attractive reasons for it?
5.2 Generate 10,000 random numbers uniformly distributed between 0 and
1. Find the percentage of numbers between 0 and 0.1, between 0.1 and 0.2,
etc., and compare your results with the expected distribution of 10 % in each
interval.
5.3 (a) Using the linear congruential scheme, generate ten pseudorandom num-
bers with a ¼ 1573, c ¼ 19, m ¼ 1000, and seed value X0 ¼ 89.
(b) Repeat the generation with c ¼ 0.
5.4 Uniformly distributed random integers between 11 and 30, inclusive, are to
be generated from the random numbers U shown below. How many of the
integers are odd numbers?
0.2311 0.7919
0.2312 0.9218
0.6068 0.7382
0.4860 0.1763
0.8913 0.4057
0.7621 0.9355
0.4565 0.9169
0.0185 0.4103
0.8214 0.8936
0.4447 0.0579
5.7 (a) Using the idea presented in this chapter, generate 100 Gaussian variates
with mean 3 and variance 2.
(b) Repeat part (a) using MATLAB command randn.
(c) By estimating the mean and variance, which procedure is more accurate?
5.8 The probability density function of Erlang distribution is
αk xk1 αx
f ðx Þ ¼ e , x > 0, α > 0
Γ ðk Þ
References
32. T. Issarikakul and E. Hossain, “Introduction to Network Simulator NS2. Springer, 2009.
33. http://www.isi.edu/nsnam/ns/
34. L. Fan and L. Taoshen, “Implementation and performance analyses of anycast QoS routing
algorithm based on genetic algorithm in NS2,” Proceedings of Second International Confer-
ence on Information and Computing Science, 2009, pp. 368 – 371.
35. S. Xu and Y. Yang, “Protocols simulation and performance analysis in wireless network based
on NS2,” Proceedings of International conference on Multimedia Technology (ICMT), 2011,
pp. 638 – 641.
36. M. J. Rahimi et al., “Development of the smart QoS monitors to enhance the performance of
the NS2 network simulator,” Proceedings of 13th International Conference on computer and
Information Technology, 2010, pp. 137-141.
37. R. Huang et al., “Simulation and analysis of mflood protocol in wireless network,”
Proceedings of International Symposium on Computer Science and Computational Technol-
ogy, 2008, pp. 658-662.
38. W. J. Graybeal and U. W. Pooch, Simulation: Principles and Methods. Cambridge, MA:
Winthrop Publishers, 1980, p. 153.
39. J. R. Emshoff and R. L. Sisson, Design and Use of Computer Simulation Models. London:
Macmillan, 1970, pp. 119-150.
40. D. Maki and M. Thompson, Mathematical modeling and Computer Simulation. Belmont, CA:
Thomson Brooks/Cole, 2006, pp. 153-211.
Chapter 6
Local Area Networks
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 167
DOI 10.1007/978-3-319-01646-7_6, © Springer International Publishing Switzerland 2013
168 6 Local Area Networks
6 Presentation
5 Session Higher-level
protocols
4 Transport
3 Network
Logical Link
2 Data Link
Medium access
1 Physical Physical
added or removed. With these go the timing signals, check-sum, and station
addresses, as well as the control system for access.
The physical layer, layer 1, is that part that actually touches the media or cable; the
line is the point within the node or device where the data is received and transmitted.
It sees to it that ones arrive as ones and zeros as zeros. It encodes and physically
transfers messages (raw bits stream) between adjacent stations. It handles voltages,
frequencies, direction, pin numbers, modulation techniques, signaling schemes,
ground loop prevention, and collision detection in CSMA/CD access method.
A good way to remember the layers is this. Starting from the layer 1, one should
remember the saying, “Please Do Not Throw Sausage Pizza Away.”
The IEEE has formulated standards for the physical and logical link layers for
three types of LANs, namely, token buses, token rings, and CSMA/CD protocols.
Figure 6.1 illustrates the correspondence between the three layers of the OSI and the
IEEE 802 reference models. The physical layer specifies means for transmitting and
receiving bits across various types of media. The media access control layer
performs the functions needed to control access to the physical medium. The logical
link control layer is the common interface to the higher software layers.
A local area network (LAN) is distinguished from other types of computer networks
in that communication is usually confined to a moderate geographical area such as a
building or a campus. It has the following characteristics:
• Short distance (up to 1 km)
• High speed (1–100 Mbps)
• Low error rate (108 to 104)
• Ease of access
A LAN is usually owned by a single organization and it is designed for the
purpose of sharing resources.
The topology of a network is the way in which the nodes (or stations) are
interconnected. The basic forms of LAN topologies are shown in Fig. 6.2.
The type of technology used to implement LANs are diverse as the LAN
vendors. Both vendors and users are forced to make a choice. This choice is usually
based on several criteria such as:
– network topology and architecture
– access control
– transmission medium
– transmission techniques (baseband/broadband signaling)
– adherence to standards
– performance in terms of channel utilization, delay, and power
The primary performance criterion is the delay-throughput characteristics
of the system.
170 6 Local Area Networks
(bus)
(ring)
(star)
(tree)
The mean transfer delay of a message is the time interval between the instant the message
is available at the sending station and the end of its successful reception at the receiving
station.
D ¼ W þ S þ Tp (6.1a)
In a token ring, the stations are connected as in all ring networks as illustrated in
Fig. 6.3.
Access to the transmission channel is controlled by means of a special eight-bit
pattern called a token, which is passed around the ring. When the system is
initialized, a designated station generates a free token, such as 11111111. If no
station is ready to transmit, the free token circulates around the ring. When a station
wishes to transmit, it captures the free token and changes it to a busy token, such as
11111110, thereby disallowing other stations from transmitting. The packet to be
transmitted is appended to the busy token. The receiving station copies the infor-
mation. When the information reaches the sending station, the station takes it off the
ring and generates a new free token to be used by another station who may need the
transmission channel.
This operation can be described by a single-server queueing model, as illustrated
in Fig. 6.4.
The server serves as many queues as stations attached to the ring. The server
attends the queues in a cyclic order as shown by the rotating switch which
Ring
interface
unit
r2
r1
r3
r4
H1
represents the free token. Once a station captures the token, it is served according to
one of the following service disciplines:
• Exhaustive service: the server serves a queue until there are no customers left in
that queue.
• Gated service: the server serves only those customers in a queue that were
waiting when it arrived at that queue, i.e. when the server arrives at a queue, a
gate is closed behind the waiting customers and only those customers in front of
the gate are served.
• Limited service: the server serves a limited number of customers, say K (con-
stant) or less, that were waiting when it arrived at the queue.
Consider a single server serving N queues in a cyclic manner as shown in Fig. 6.4.
Let ri denote a constant switchover time from queue i to queue i+1 and Ro be the
sum of all switchover times, i.e.
6.3 Token-Passing Ring 173
X
N
Ro ¼ ri (6.2)
i¼1
We examine the M/G/1 model, that is, messages arrive at queues according to
independent Poisson processes with mean rates λ1, λ2, , λN and the service times
Hi of the messages from queue i are generally distributed with mean E(Si) and
second moment E(Si2). We denote the utilization of queue i by
ρi ¼ λi EðSi Þ (6.3)
X
N
ρ¼ ρi < 1 (6.4)
i¼1
Let Vi denote the intervisit time of queue i, also known as the server-vacation
time, the time interval from the server’s departure from the queue until its return to
the same queue. The moment generating function for the statistical-equilibrium
waiting time distribution is given by [5–7]:
Exhaustive service:
1 ρi 1 G v ðzÞ
GeW ðzÞ ¼ E ezW i ¼ (6.5)
Eð V i Þ z λ i þ λ i G s ð z Þ
Gated service:
Limited service:
1 ρi þ λ i E ð V i Þ 1 Gv ðzÞ
GlW ðzÞ ¼ (6.7)
Eð V i Þ z λi þ λi Gs ðzÞGv ðzÞ
where Gv ðzÞ ¼ EðezV i Þ is the generating function for the intervisit time;
Gs ðzÞ ¼ EðezSi Þ is the generating function for the service time,
zCi
Gc ðzÞ ¼ E e is the generating function for the cycle time.
From Eqs. (6.5)–(6.7), the mean waiting time of messages in queue i is deter-
mined by differentiating GW(z) and setting z ¼ 0. The result is:
Exhaustive service:
EðV i Þ Var ðV i Þ λi E S2i
Ee ðW i Þ ¼ þ þ (6.8)
2 2EðV i Þ 2ð1 ρi Þ
174 6 Local Area Networks
Gated service:
EðCi Þ Var ðCi Þ ρi E S2i
E ðW i Þ ¼
g
þ þ (6.9)
2 2EðCi Þ 2ð1 ρi ÞEðSi Þ
Limited service:
h i
λ i E ð V i þ Si Þ 2
El ð W i Þ ¼ h i (6.10)
2 1 ρi þ λ i E V i i
Hence the mean waiting time can be found provided the first two moments of the
intervisit times Vi are known.
To find the first moment of Vi, let Ci be the total cycle time (i.e. the time between
subsequent visits of the server to queue i) and Ti be the time spent by the server at
queue i, then
Ro
EðCi Þ ¼ (6.12)
1ρ
Since the traffic flow must be conserved, the average number of messages
serviced during one visit of queue i is equal to the average number of arriving
messages at that queue in one cycle time, i.e.
Eð T i Þ
¼ λ i Eð C i Þ
Eð S i Þ
or
Substituting Eqs. (6.12) and (6.13) into Eq. (6.11) gives the mean intervisit time
of queue i as
1 ρi
E ðV i Þ ¼ R (6.14)
1ρ o
Introducing Eqs. (6.12) and (6.14) in Eq. (6.8) leads to
VarðV i Þ 1 ρi ρi E S2i
E ðW i Þ ¼
e
þ Ro þ (6.15)
2EðV i Þ 2ð1 ρÞ 2 ð 1 ρ i Þ Eð S i Þ
6.3 Token-Passing Ring 175
for exhaustive service. Taking similar procedure for gated service discipline
results in
Var ðV i Þ 1 þ ρi ρi E S2i
E ðW i Þ ¼
g
þ Ro þ (6.16)
2EðV i Þ 2ð1 ρÞ 2 ð 1 ρ i Þ Eð S i Þ
For limited service, we have an explicit solution for E(Wi) only in the special
case of statistically symmetric conditions and K ¼ 1 for all stations [5, 7]. However,
an upper bound for E(Wi) for any K is presented in [9].
For symmetric traffic conditions (i.e. in the case of identical stations),
λ
λ1 ¼ λ2 ¼ ¼ λN ¼ (6.17)
N
Ro
r1 ¼ r2 ¼ ¼ rN ¼ ¼r (6.18)
N
and the mean waiting time for all the queues becomes:
Exhaustive service:
δ2 Nr ð1 ρ=N Þ ρE S2
E ðW i Þ ¼ þ
e
þ (6.19)
2r 2ð 1 ρÞ 2ð1 ρÞEðSÞ
Gated service:
δ2 Nr ð1 þ ρ=N Þ ρE S2
E ðW i Þ ¼ þ
g
þ (6.20)
2r 2ð 1 ρÞ 2ð1 ρÞEðSÞ
Limited service:
δ2 Nr ð1 þ ρ=N Þ þ Nλδ2 ρE S2
E ðW i Þ ¼ þ
e
þ (6.21)
2r 2ð1 ρ Nλr Þ 2ð1 ρ Nλr ÞEðSÞ
where δ2 is the variance of the switchover time. An alternative, less rigorous means
of deriving Eqs. (6.19–6.21) is the decomposition theorem [8]. Note that the only
difference between Eqs. (6.19) and (6.20) is the signs in the terms (1 ρ) which
implies that Ee(W ) Eg(W ). Thus, from Eqs. (6.19)–(6.21), we conclude that:
Ee ð W Þ Eg ð W Þ El ð W Þ (6.22)
T ¼ T t þ T pt þ T b (6.23)
where Tt is the token transmission time, Tpt is the token propagation delay, and Tb is
the bit delay per station. Hence, the expected value r ¼ E(T) is given by
r ¼ EðT t Þ þ E T pt þ EðT b Þ (6.24)
and, since the random variables are independent, the variance Var (T) ¼ δ2 is
given by
δ2 ¼ VarðT i Þ þ Var T pt þ VarðT b Þ (6.25)
Lt
Tt ¼
R
Its expected value is constant. Hence
Lt
Eð T t Þ ¼ T t ¼ , VarðT t Þ ¼ 0 (6.26)
R
Assuming that the stations are equally spaced on the ring, the distance between
any adjacent stations is identical to l=N, where l is the physical length of the ring. If
P is the signal propagation delay in seconds per unit length (the reciprocal of the
signal propagation delay velocity u, i.e. P ¼ 1/u), the token propagation delay is
Pl
T pt ¼
N
Hence
Pl
E T pt ¼ T pt ¼ , Var T pt ¼ 0 (6.27)
N
If Lb is the bit delay caused by each station,
Lb
Tb ¼
R
and
Lb
Eð T b Þ ¼ , VarðT b Þ ¼ 0 (6.28)
R
6.3 Token-Passing Ring 177
Pl Lb þ Lt
r¼ þ , δ2 ¼ 0 (6.29)
N R
The average propagation delay suffered from one station is the propagation
delay halfway around the ring, i.e.
E T p ¼ τ=2 (6.30)
where τ is the round-trip propagation delay. Note that the sum of the switchover
times (assumed to be constant) corresponds to the round-trip propagation delay and
the sum of the bit-holding times at each station, i.e
Nr ¼ Pl þ N ðLb þ Lt Þ=R ¼ τ (6.31)
Thus, for large N and symmetric traffic conditions, the mean transfer delay is
obtained by substituting Eqs. (6.19)–(6.21), (6.29), and (6.30) in Eq. (6.1). We obtain:
Exhaustive service:
τð1 ρ=N Þ ρE S2
E ðDÞ ¼
e
þ þ EðSÞ þ τ=2 (6.32)
2ð 1 ρÞ 2ð1 ρÞEðSÞ
Gated service:
τð1 þ ρ=N Þ ρE S2
E ðDÞ ¼
g
þ þ EðSÞ þ τ=2 (6.33)
2ð 1 ρÞ 2ð1 ρÞEðSÞ
Limited service:
l τð1 þ ρ=N Þ ρE S2
E ðD Þ ¼ þ þ EðSÞ þ τ=2 (6.34)
2ð1 ρ λτÞ 2ð1 ρ λτÞEðSÞ
Lp þ Lh
Eð S Þ ¼ ¼ ρ=λ (6.35a)
R
where Lp and Lh are the mean packet length and header length respectively. For
fixed messages (requiring constant service times),
E S2 ¼ E2 ð SÞ (6.35b)
Example 6.1 Messages arrive at a switching node at the rate of 2 bits/min, as shown
in Fig. 6.5. If the messages is exponentially distributed with an average length of
20 bytes and the node serves 10 bits/s, calculate the traffic intensity.
Solution
The arrival rate is the number of messages/second or packets/second.
2
λ ¼ 2bits=minute ¼ bps
60
The service time is the time taken to service 1 packet.
Lp 20 8
Eð S Þ ¼ ¼ ¼ 16s
R 10
The traffic intensity is given by
2
ρ ¼ λEðSÞ ¼ 16 ¼ 0:5333
60
Example 6.2 A token-ring LAN has a total propagation delay of 20 μs, a channel
capacity of 106 bps and 50 stations, each of which generates Poisson traffic and has
a latency of 1 bit. For a traffic intensity of 0.6, calculate:
(a) the switchover time,
(b) the mean service time,
(c) the message arrival rate per station,
(d) the average delay for exhaustive, gated, and limited service disciplines.
Assume 10 bits for overhead and 500 bits average packet length, exponentially
distributed.
Solution
(a) If the end-to-end propagation time is τ ¼ 20 μs, then the switchover time τ is
given by
τ 20
r¼ ¼ ¼ 0:4 μs
N 50
6.3 Token-Passing Ring 179
Lp þ Lh 500 þ 10
Eð S Þ ¼ ¼ ¼ 510μs
R 106
(c) Since ρ ¼ λE(S), the total arrival rate is
λ ¼ ρ =E ðSÞ
ρ 0:6
λi ¼ ¼ ¼ 23:53 bps
NEðSÞ 50 510 106
20 106 ð1 þ 0:6=50Þ
Eg ð D Þ ¼ þ ð765 þ 520Þ μs ¼ 1:3103 ms
2ð1 0:6Þ
Notice that
The token-passing bus was inspired by the token ring and standardized in the IEEE
Standard 802.4. The basic operation of the token bus LAN is fully discussed in
[3, 12] while its delay analysis in [13].
The operation of the token bus is similar in many respects to that of the token ring.
Although the token bus uses bus topology while the token ring uses ring, the
stations on a token bus are logically ordered to form a logical ring, which is not
necessarily the same as the physical ordering of the stations. Figure 6.6 shows a
typical ordering of stations on bus with the sequence AEFHCA. Each station on the
ring knows the identity of the stations preceding and following it. The right of
access to the bus is controlled by the cyclic passing of a token among the stations in
the logical ring. Unlike in a token ring where the token is passed implicitly, an
explicit token with node addressing information is used. The token is passed in
order of address. When a station receives the token, it may transmit its messages
according to a service discipline (exhaustive, gated, or limited) and pass the token
to the next station in the logical ring.
A token bus differs in some respects from token ring. Since token bus is a
broadcast protocol, stations not in the logical ring can receive messages. Stations on
a token bus are passive and thus create no station latency or delay unlike in token
ring where the signal is regenerated at each station. Propagation delay on a token
bus are generally longer because the token may have to travel longer distances to
satisfy the logical ordering of the stations.
A B C D
E F G H
As mentioned earlier, the expressions for waiting time (or queueing delay) in
Eqs. (6.19)–(6.21) are valid for both token ring and token bus protocols except
that the mean value of r of the switchover time and its variance δ2 are different for
the two protocols. We now evaluate these parameters as they apply to the token bus.
Unlike token ring, the token bus requires that the complete token packet be
transmitted, received, and identified before a data packet can be generated and
transmitted. Therefore, the token passing transmission time Tt is a significant delay
in token bus protocol. According to Eq. (6.26),
Lt
Eð T t Þ ¼ T t ¼ , VarðT t Þ ¼ 0 (6.36)
R
Assuming bus length l , uniform distribution of N stations, and an equal
probability of communication between any two stations, the distance between
station i and its logical successor j is given by
jl
dij ¼ jd ¼ , 1jN1 (6.37)
N1
The probability of station i having the token and passing it to station j is given by
1 2
Pij ¼ ¼ (6.38)
N N ðN 1Þ
2
X N X
X i1
2lj ðN þ 1Þl
Eð X Þ ¼ d ij Pij ¼ ¼ (6.39)
i¼1 j¼1 N ð N 1Þ 2 3ð N 1Þ
X
n
n
i ¼ ð n þ 1Þ
i¼1
2
and
X
n
n
i2 ¼ ðn þ 1Þð2n þ 1Þ
i¼1
6
ðN þ 1Þτ
E T pt ¼ (6.40)
3ð N 1Þ
has been incorporated. Thus the variance of the token passing propagation delay is
ðN þ 1ÞðN 2Þτ2
Var T pt ¼ (6.42)
18ðN 1Þ2
The bit delay per station adds to the token passing time a delay corresponding to
token handling and address recognition. In IEEE 802.4, for example, a buffer of
four or five bits may be required depending on the size of the address field. If Lb is
the bit delay caused by each station,
Lb
Tb ¼
R
and
Lb
Eð T b Þ ¼ , VarðT b Þ ¼ 0 (6.43)
R
Substitution of Eqs. (6.36), (6.40), (6.42), and (6.43) into Eqs. (6.24) and (6.25)
yields
τ τ2
r ¼ þ c, δ2 ¼ (6.45)
3 18
where
Lt þ Lb
c ¼ Tt þ Tb ¼
R
6.5 CSMA/CD Bus 183
The packet propagation delay is the same as the token propagation delay so that
for large N,
E T p ¼ τ=3 (6.46)
If we assume large N and symmetric traffic conditions, the mean transfer time is
obtained by substituting Eqs. (6.19)–(6.21), (6.45), and (6.46) into Eq. (6.1).
Exhaustive service:
τ2 ð1 ρ=N Þ ρE S2
E ðDÞ ¼
e
þ N ðτ=3 þ cÞ þ þ EðSÞ þ τ=3
36ðτ=3 þ cÞ 2ð 1 ρÞ 2ð1 ρÞEðSÞ
(6.47)
Gated service:
τ2 ð1 þ ρ=N Þ ρE S2
E ðDÞ ¼
g
þ N ðτ=3 þ cÞ þ þ EðSÞ þ τ=3
36ðτ=3 þ cÞ 2ð1 ρÞ 2ð1 ρÞEðSÞ
(6.48)
Limited service:
where the mean service time E(S) is given by Eq. (6.35) and the end-to-end
propagation delay by
τ ¼ Pl (6.50)
Multiple access local area network (LAN) protocols divide broadly into two classes
[14]: random (or contention ) access protocols and controlled access protocols. In
random access protocols, transmission rights are simultaneously offered to a group
of stations in the hope that exactly one of the stations has a packet to send. However,
if two or more stations send packets simultaneously on the channel, these messages
interfere with each other and none of them are correctly received by the destination
stations. In such cases, a collision has occurred and stations retransmit packets until
they are successfully received by the destination stations.
184 6 Local Area Networks
In the nonpersistent CSMA-CD scheme, a node with a packet ready for trans-
mission senses the channel and acts as follows.
1. If the channel is sensed idle, the node initiates transmission of the packet.
2. If the channel is sensed busy, the node schedules the retransmission of its packet
to some later time. It waits for a random amount of time and resenses the
channel.
3. If a collision is detected during transmission, the node aborts its transmission,
and schedules the retransmission of the packet later.
In the 1-persistent CSMA-CD protocol (which is a special case of the
p-persistent), a node which finds the channel busy persists on transmitting as soon
as the channel becomes free. If it finds the channel idle, it transmits the packet
immediately with probability one. In other words, a ready node senses the channel
and proceeds as in nonpersistent CSMA-CD, except that, when the channel is
sensed busy, it monitors the channel until it is senses idle and then with probability
one initiates transmission of its packet.
In the p-persistent protocol, a ready node senses the channel and proceeds as in
non-persistent protocol except that when the channel is sensed busy, the node
persists until the channel is idle, and
(i) With probability p it initiates transmission of the packet
(ii) With probability 1-p it delays transmission by τ seconds (the end-to-end
propagation delay).
If at this instant, the channel is sensed idle, then the node repeats steps (i) and
(ii); otherwise it schedules retransmission of its packet later.
Note that in all CSMA-CD protocols, given that a transmission is initiated on an
empty channel, it takes at most one τ seconds for the packet transmission to reach
all nodes. Beyond this time the channel will surely be sensed busy for as long as
data transmission is in process. A collision can only occur if another transmission is
initiated before the current one is sensed, and it will take at most additional τ
seconds before interference reaches all devices. Moreover, Ethernet has a collision
consensus reinforcement mechanism by which a device, experiencing interference,
jams the channel to ensure that all other interfering nodes detect the collision.
In addition to the variations in the protocols, the transmission medium may be
slotted or unslotted.
λ E S2 þ ð4e þ 1ÞτEðSÞ þ 5τ2 þ 4eð2e 1Þτ2
Eð D Þ ¼
2ð1 λ½EðSÞ þ τ þ 2eτÞ
2λτ
(6.51)
1e ðe þ λτ 3λτeÞ
ð Þ þ e2λτ 1
þ 2τe þ EðSÞ þ τ=3
λe½FðλÞe 1þλτ
where τ is the end-to-end propagation delay as in Eq. (6.50), E(S) and E(S2) are
respectively the first and second moments of the message transmission (or service)
time as given by Eq. (6.35). The term τ/3 is the mean source-destination propaga-
tion time E(Tp). It is heuristically taken as τ/2 in other works, but we have used τ/3
to be consistent with the derivation in Eq. (6.46). The function F(λ) is the Laplace
transform of the message transmission time distribution, i.e.
ð
1
Fð λ Þ ¼ f ðtÞeλt dt (6.52)
0
1
Fð λ Þ ¼ , E S2 ¼ 2E2 ðSÞ (6.54)
1þρ
It is important to note the two limiting cases of operation of CSMA/CD from
Eq. (6.51). The mean delay becomes unbounded as the traffic intensity ρ approaches
the maximum value of
1 1
ρmax ¼ ¼ (6.55)
1 þ ð2e þ 1Þa 1 þ 6:44a
6.5 CSMA/CD Bus 187
where a ¼ τ/E(S). Also as the traffic intensity ρ approaches zero, the mean delay
approaches the minimum value of
Example 6.3 A CSMA/CD network with a channel bit rate of 1 Mbps connects
40 stations on a 2-km cable. For fixed packet length of 1,000 bits, calculate the
mean transfer delay. Assume propagation delay of 5 μs/km and an average arrival
rate/station of 0.015 packets/s.
Solution
The mean service time is
LR 1, 000
Eð S Þ ¼ ¼ ¼ 103 s
R 106
The mean arrival rate for each station is
λi ¼ 0.015 1,000 bits/s ¼ 15 bps
Hence, the total arrival rate is
λ ¼ Nλi ¼ 40 15 ¼ 600 bps
The traffic intensity is
ρ ¼ λE(S) ¼ 103 600 ¼ 0.6
The end-to-end propagation delay is
l
τ¼ ¼ lP ¼ 2 km 5μs=km ¼ 10μs
u
For constant packet lengths,
FðλÞ ¼ eρ , E S2 ¼ E2 ðSÞ ¼ 106
600 106 þ ð4e þ 2Þ 105 103 þ 5 1010 þ 4eð2e 1Þ 1010
EðDÞ ¼
2 1 600 103 þ 105 þ 2e 105
3
1 e2x6x10 e þ 6 103 3e 6 103 105
h i þ 2e 105 þ 103 þ
600e e0:6 eð1þ6x10 Þ þ e12x10 1
3 3
3
¼ ð761:35 103:87 þ 1005:77Þμs
¼ 1:663 ms
188 6 Local Area Networks
6.6 STAR
Due to their simplicity, the star networks evolved as the first controlled-topology
networks. They are regarded as the oldest communication medium topologies
because of their use in centralized telephone exchanges. As we shall see, the star
topology has some disadvantages which led to its apparent unpopularity in local
area networks. While the control of traffic is distributed in both the bus and the ring
topologies, it is concentrated in the star.
A star topology usually consists of a primary node (hub) and secondary nodes (the
nodes on the periphery). The primary node is the central node which acts like a
switch or traffic director. Communication between any two nodes is via circuit
switching. When a peripheral node has data to transmit, it must first send a request
to the central node which establishes a dedicated path between the node and the
destination node. All links must therefore be full duplex to allow two-way commu-
nication between the primary and secondary nodes as shown in Fig. 6.7.
The use of a central node to perform all routing provides a fairly good mapping
of technology, but at the expense of creating a complex routing station. The central
node is a complex one from a hardware standpoint. It is also a limiting element in
the star growth because it requires the hub to have a spare port to plug a new link.
The delay caused by the hub affects the performance of the network. Because of the
problems associated with the central switch, the star network exhibits growth
Central node
limitations, low reliability, poor expandability, and a complex central node. In spite
of the bottleneck caused by the central node, however, the star is one of the common
topologies commonly in use. Although the star may not be as effective as the bus or
ring in terms of routing, the star is effectively used for other reasons.
The star networks offer positive features that many other networks lack. For
example, the interconnection in star networks is point to point which makes them
suitable for optical fiber-based implementation. That is, in fiber-optic systems, star-
shaped topologies are usually preferred because they allow the interconnection of
more nodes, are less prone to catastrophic failure, and are relatively flexible and
expandable. In fact the first optical fiber networks were built in the star configura-
tion [20]. Also, the throughput of star networks is usually very high and can easily
approach unity, which means that the bandwidth is effectively utilized. Very high
data rates can be sustained on star networks. Star systems allow simple modular
expansion, and their performance is in general better than the performance of other
networks [21].
Delay analyses of star networks have been carried out by Kamal [21] and Mehmet-
Ali, Hayes and Elhakeem [22]. Here we adopt the approximate analysis in [22].
The underlying assumptions of the analysis are as follows. Messages are
assumed to arrive at each source node according to Poisson process with an average
arrival rate of λi and have an arbitrary length distribution. Messages arrive to the
system at one of the N nodes and are switched to one of the other (N 1) nodes. It
is assumed that the source-destination line pair must be free before a message can
be transmitted and that the probability that a message will have its destination as its
source is zero. It is also assumed that messages are transmitted from the source
queues strictly in their order of arrival. Finally, it is assumed that the traffic is
symmetric. With each source modeled as an M/G/1 queue, the waiting time or
queueing delay is obtained as [22]:
λ^y 2
EðW Þ ¼ ^y þ (6.57)
2ð1 ρÞ
where
^y ¼ ½1 þ ðN 2ÞρGEðSÞ (6.58a)
^y 2 ¼ 2 1 þ 2ðN 2ÞρG þ ðN 2ÞðN 3Þρ2 G2 E S2 (6.58b)
λEðSÞ
ρ¼ (6.58c)
1 ðN 2ÞGλEðSÞ
190 6 Local Area Networks
λ ¼ λi, and G ¼ 1/(N 1) is the probability that a message from source i will have
node j as its destination. From Eq. (6.57), the stability requirement ρ 1 implies
that λE(S) (N 1)(2N 3). For large N, this implies λE(S) 1/2.
The source-destination propagation time E(Tp) is given by
E Tp ¼ τ (6.59)
where τ is the round-trip or two-way propagation delay between any node and the
central hub.
By substituting Eqs. (6.57) and (6.59) into Eq. (6.1), we obtain
λ^y 2
EðDÞ ¼ ^y þ þ Eð S Þ þ τ (6.60)
2ð 1 ρÞ
E(S) and E(S2), the first and second moments of the message service time, are
given by Eq. (6.35).
desirable than CSMA-CD networks. Performance, however, may not be the only
consideration in selecting a LAN technology. From a reliability viewpoint, for
example, token ring presents problems: whenever a station attached to the ring fails,
the whole network fails since the message must be retransmitted at each station. Also
considering the ease of maintenance, availability, extendibility, and complexity of a
physical layer design, a bus architecture has some advantages over ring.
Our major concern in the previous sections has been on using delay as the major
performance criterion of the LANs. In this section, we will use throughput as the
major performance measure. The throughput of a LAN is a measure in bits per
second of the successful (or error-free) traffic being transmitted between stations.
The throughput is the fraction of time that is used to transmit information.
Since the information can be corrupted as it travels from one station to another, it
is conventional to count only the error-free bits when measuring throughput.
To find the channel throughput S, we let E(U) be the average time that the
channel is used without collisions, E(B) be the average busy period, and E(I) be the
average idle period. The throughput is given by
Eð U Þ
S¼ (6.61)
Eð BÞ þ Eð I Þ
This is based on the assumption that the stations are statistically identical and
that the network has reached steady state. The throughput is usually expressed in
terms of the offered traffic rate G and the parameter a
propagation delay τ
a¼ ¼ (6.62)
packet transmission delay T p
GeaG
S¼ (6.63)
GeaG þ bGð1 eaG Þ þ 2aGð1 GeaG Þ þ 2ð2 eaG Þ
where b is the jamming time or the length of the jamming signal. For slotted
nonpersistent CSMA/CD,
aGeaG
S¼ (6.64)
aGeaG þ bGð1 eaG aGeaG Þ þ að2 eaG aGeaG Þ
Problems 193
6.9 Summary
Problems
No. of stations ¼ 50
Transmission rate ¼ 1 Mbps
Mean packet length ¼ 1,000 bits (exponentially distributed)
Length of the ring ¼ 2 km
Token length ¼ 24 bits
Header length ¼ 0 bit
Bit delay ¼ 1 bit
Propagation delay ¼ 5 μs/km
Calculate the mean delay of a message for exhaustive service discipline for
ρ ¼ 0.1, 0.2, . . ., 0.9.
6.6 For both constant exponential packet distributions, calculate the mean delay
for a token bus LAN with the following parameters:
No. of stations ¼ 50
Transmission rate ¼ 5 Mbps
Mean packet length ¼ 1,000 bits
Bus length ¼ 1 km
Token length ¼ 96 bits
Header length ¼ 0 bit
(continued)
194 6 Local Area Networks
Try cases for ρ ¼ 0.1, 0.2, . . ., 0.9 and assume exhaustive service discipline.
6.7 Explain how CSMA/CD protocol works.
6.8 Repeat problem 6.6 for the CSMA/CD protocol.
6.9 (a) Assuming an exhaustive service discipline, calculate the average transfer
delay of a token bus with the following parameters.
No. of stations ¼ 40
Transmission rate ¼ 1 Mbps
Mean packet length ¼ 500 bits (exponentially distributed)
Cable length ¼ 4 km
Token length ¼ 96 bits
Header length ¼ 0 bit
Bit delay ¼ 1 bit
Propagation delay ¼ 2 μs/km
Traffic intensity ¼ 0.4
References
1. J. R. Freer, Computer Communications and Networks. New York: Plenum Press, 1988,
pp. 284, 285.
2. P. J. Fortier, Handbook of LAN Technology. New York: McGraw-Hill, 1989, chap. 16,
pp. 305-312.
3. J. L. Hammond and P. J. P. O’Reilly, Performance Analysis of Local Computer Networks.
Reading, MA: Addison-Wesley, 1986, pp. 225-237.
4. W. Bux, “Local-area subnetworks: a performance comparison,” IEEE Trans. Comm., vol.
COM-29, no. 10, Oct. 1981, pp. 1465-1473.
5. H. Tagaki, Analysis of Polling Systems. Cambridge: MIT Press, 1986.
6. M. J. Ferguson and Y. J. Aminetzah, “Exact results for nonsymmetric token ring systems,”
IEEE Trans. Comm., vol. COM-33, no. 3, March 1985, pp. 223-231.
7. K. S. Watson, “Performance evaluation of cyclic service strategies – a survey,” in E. Gelenbe
(ed.), Performance ‘84. Amsterdam: North-Holland, 1984, pp. 521-533.
8. S. W. Fuhrmann and R. B. Cooper, “Application of decomposition principle in M/G/1 vacation
model to two continuum cyclic queueing models – especially token-ring LANs,” AT & T
Technical Journal, vol. 64, no. 5, May-June 1985, pp. 1091-1099.
9. I. Rubin and L. F. M. de Moraes, “Message delay analysis for polling and token multiple-
access schemes for local communication networks,” IEEE Jour. Sel. Area Comm., vol. SAC-1,
no. 5, Nov. 1983, pp. 935-947.
References 195
10. A. G. Konheim and M. Reiser, “A queueing model with finite waiting room and blocking,”
J. ACM, vol. 23, no. 2, April 1976, pp. 328-341.
11. G. B. Swartz, “Polling in a loop system,” J. ACM, vol. 27, no. 1, Jan. 1980, pp. 42-59.
12. F. -J. Kauffels, Practical LANs Analysed. Chichester: Ellis Horwood, 1989.
13. S. R. Sachs et al., “Performance analysis of a token-bus protocol and comparison with other
LAN protocols,” Proc. 10th Conf. on Local Computer Networks, Oct. 1985, pp. 46-51.
14. R. Rom and M. Sidi, Multiple Access Protocols: Performance and Analysis. New York:
Springer-Verlag, 1990.
15. G. E. Keiser, Local Area Networks. New York: McGraw-Hill, 1989.
16. F. A. Tobagi and V. B. Hunt, Performance analysis of carrier sense multiple access with
collision detection, Computer Networks, vol. 4, 1980, pp. 245-259.
17. S. S. Lam, “A carrier sense multiple access protocol for local networks,” Computer Networks,
vol. 4, no. 1, Jan. 1980, pp. 21-32.
18. J. F. Hayes, Modeling and Analysis of Computer Communications Networks. New York:
Plenum Press, 1984, pp. 226–230.
19. W. Bux, “Performance issues in local-area networks,” IBM Syst. Jour., vol. 23, no. 4, 1984,
pp. 351-374.
20. E. S. Lee and P. I. P. Boulton, “The principles and performance of Hebnet: A 40 Mbits/s glass
fiber local area network,” IEEE J. Select. Areas Comm., vol. SAC-1, Nov. 1983, pp. 711-720.
21. A. E. Kamal, “Star local area networks: a performance study,” IEEE Trans. Comp., vol. C-36,
no. 4, April 1987, pp. 484-499.
22. M. K. Mehmet-Ali et al., “Traffic analysis of a local area network with a star topology,” IEEE
Trans. Comm., vol. COM-36, no. 6, June 1988, pp. 703-712.
23. C. Androne and T. Palade, “Radio coverage and performance analysis for local area
networks,” Proc. of 9th International Symposium on Electronics and Telecommunications,
2010, pp. 213-216
Chapter 7
Metropolitan Area Networks
With some of the characteristics of LANs and some reflecting WANs, the metro-
politan area network (MAN) technology embraces the best features of both. The
motivations for MAN technology include the need for: (1) interconnection of
LANs, (2) high-speed services, and (3) integrated services. The proliferation of
LANs and the need for connecting them has brought MANs to the fore. The
increasing customer demand for high-speed services has spawned the search
for new technologies with wideband transport capabilities. For example, it is
important that a travel agent gets prompt responses from the host computer when
making airline reservations. The salary of the agent depends on high speed data
communication.
We begin this chapter by first looking at some characteristics of MAN. We then
consider various types of internetworking devices and how they are used in
constructing non-standard MANs. The performance analysis of interconnected
token rings is given as an example of a LAN-based MAN.
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 197
DOI 10.1007/978-3-319-01646-7_7, © Springer International Publishing Switzerland 2013
198 7 Metropolitan Area Networks
Although the concept of a MAN is modeled after LAN principles, there are some
major differences between the two types of networks. These differences can be
summarized as follows [1–3]:
• Distance: Whereas a LAN operates within a few kilometers, a MAN spans a city
and its suburbs. IEEE Project 802 set a distance optimization of 50 km diameter
in order to match the dimensions of typical large metropolitan areas.
• Backbone: A backbone for interconnecting LANs is needed in a MAN to ease
administration. The switching function is free; no large up-front expenditure for
a switch is necessary in a shared-medium network.
• Service: It is desirable that MAN is optimized for carrying voice and video as
well as computer data thus having a more demanding access requirement. Voice
has stringent requirements—a guaranteed bandwidth (64 kbps per voice chan-
nel) and bounded delay (2 s at worst for round trip). These requirements for so-
called isochronous channels cannot be met by conventional LANs.
• Central Management: MAN requires a central management for installation,
operation, maintenance, and billing of users.
• Public Operation: MAN is shared between many user organizations rather than
being privately owned. This raises privacy and security issues in addition to
requiring centralized operation and a need to gain right-of-way.
In a MAN, the speed of the backbone network is anticipated to be ten to a
hundred times greater than that of a LAN. This speed disparity between the high
speed backbone and the lower speed LANs that are connected to it creates a
bottleneck situation at the gateways.
There are two kinds of MAN:
(1) Standard MANs are fiber distributed data interface (FDDI) and distributed
queue dual bus (DQDB). FDDI is ANSI standard. DQDB is IEEE 802.6
standard which has been implemented as switched multisegment data service
(SMDA). It is no longer popular and will not discussed further in this chapter.
(2) Non-standard MANs involving LANs that are interconnected by bridges,
routers or gateways.
Since many organizations already have more than one LAN, the most common
approach to building a MAN is the interconnection of LANs; it is more economical
to interconnect them than to build a network that will serve the same purpose. This
approach was taken on ad hoc basis before standard MANs were developed.
Internetworking devices are the building blocks for constructing computer
networks. The primary purpose of internetworking is to enable a network user to
establish communication link with a user of another network and vice versa.
To achieve the connectivity and facilitate communications between computer
systems, network designers have implemented a number of interconnection
7.2 Internetworking Devices 199
3 Network Router
1 Physical Repeater
devices: repeaters, routers, bridges, gateways, and most recently hybrid devices
called brouters, trouters, and routing bridges [4–9]. The devices can be viewed in
reference to the ISO model. Interconnecting devices may operate at any of the
seven layers of the OSI reference model. When connectivity between two systems
is through an intermediary, the term “relay” is chosen to denote the intermediary in
the ISO reference model. In the ISO terminology, a relay is known as a “layer n
relay” if it shares a common layer n protocol with other systems but does not
participate in a layer n + 1 protocol in the relaying process. Thus,
• a repeater is a physical layer relay,
• a bridge is a data link layer relay,
• a router is a network layer relay, and
• a gateway is any higher layer than network layer relay.
The relationships of these interconnecting devices and the OSI model is shown
in Fig. 7.1. It should be noted that these terms are used loosely in the market-place.
A vendor may call its product a “bridge” when it is capable of providing routing and
protocol conversion.
7.2.1 Repeaters
The most basic and simplest interconnecting device is the repeater. The term
“repeater” denotes a device that regenerate a signal received from the input and
correct it to its original shape, as shown in Fig. 7.2. A repeater is a physical layer
device which receives, amplifies, and retransmits all incoming signals, including
collisions. It simply forwards every packet from one network to the other.
200 7 Metropolitan Area Networks
LAN 1 LAN 2
Application Application
Presentation Presentation
Session Session
Transport Transport
Network Network
LAN 1 LAN 2
Host
Host
Network
Network
LLC Bridge
LLC
Relaying
MAC 1
MAC1 MAC2 MAC 2
A repeater connects similar LANs at the physical layer, as shown in Fig. 7.3.
Repeaters help overcome the electrical limits of a LAN—the limited length and the
limited number of stations.
7.2.2 Bridges
As a result, it can extend LANs far beyond the distance that repeaters can. It
performs the function of a repeater in that it amplifies the signal. In the majority of
cases, bridges interconnect homogeneous or similar LANs (i.e. LANs with the same
MAC Protocols). For example, a token bus bridge will interconnect two token bus
LANs. The main attribute of bridges is transparency—a feature in a distributed
system where users can access any local or remote resources just as if they were
local. Bridges automatically initialize, configure themselves, and run with no
intervention from network management.
A bridge is an intelligent device because it is capable of making decisions. It
does this by referring to a table of addresses created for each LAN connected to the
bridge. A bridge examines each packet as it passes, checking the source
and destination addresses. If a packet coming from Station 2 on LAN A is destined
for Station 5 on LAN A, the bridge allows the packet to move on, a process called
filtering. If the packet is destined for Station 1 on LAN B, the bridges copies the
packet onto LAN B, a process known as forwarding. Thus, local traffic is kept on
the LAN from which it originated, while non-local traffic is forwarded to
the appropriate destination. The decision to filter or forward a frame is made after
the bridge considers the fields of the MAC frame, as shown typically in Fig. 7.5.
The information concerning which frame to filter or forward is learned by the
bridge and stored in the forwarding table. The forwarding table consists of known
data link layer or MAC addresses and the associated network segment connected to
the bridge. The table is built by the bridge monitoring both incoming and outgoing
ports and listening to all transmissions, a process known as learning.
Example 7.1 A bridge connects two CSMA/CD networks, each transmitting at the
rate of 10 Mbps. Determine how many frames per second the bridge must be
capable of forwarding. What would happen if the bridge cannot handle so many
frames per second?
Solution
The bridge is receiving data at 20 Mbps. If each frame is 512 bits long plus 64 bits
of preamble and 96 bits of interframe gap, the total number of frames that the bridge
must handle is
bits=s 20 106 bits=s
No:of frames=s ¼ ¼ ffi 29, 762
bits=frame ð512 þ 64 þ 96Þ bits=frame
202 7 Metropolitan Area Networks
Presentation Presentation
Session Session
Transport Transport
Router:
7.2.3 Routers
A router is a device that connects dissimilar networks and operates at the network
layer in the OSI model, as shown in Fig. 7.6 (The need for connecting dissimilar
networks may be due to a corporate merger or acquisition).
All routers possess a number of common characteristics:
• Link networks using different network identities
• Transmit only the data needed by the final destination across the LAN
• Examine and rebuild packets without passing errors on the next LAN
• Store and forward data packets, each with its header containing a destination and
source networks from one LAN or WAN to another.
Routers form the core of an internetwork, ranging from LAN to WAN.
A router is protocol-dependent in that it connects logically separate networks
operating under identical protocols. In other words, it distinguishes among different
7.2 Internetworking Devices 203
protocols and applies the appropriate routing technique to each. It can connect to and
speak the protocols of any communication media such as Ethernet and SONET. Its
operation depends on internet protocol (IP), a protocol at OSI layer 3. Consequently,
it does not matter whether underlying networks are ethernet, token ring, or FDDI
(fiber distributed data interface). This implies that routers accommodate a number
of differences among networks. Such differences include different addressing
schemes, routing techniques, maximum packet size, access control, and error
recovery. For example, a router can be used to connect token ring and ethernet.
All router designs follow the same functional architecture, typically shown in
Fig. 7.7. It consists of line cards, a routing processor (or CPU), and a backplane. For
high-speed router, the backplane is replaced by a switch fabric. A switch fabric is
used for interconnection because it offers a much higher aggregate capacity than
that available from the more conventional backplane bus. While a bus typically
offers hundreds of megabits of bandwidth to be shared by all line cards, a switching
fabric provides a high-speed dedicated path from the input port to the output port.
7.2.4 Gateways
Presentation Presentation
Session Session
Transport Transport
Network Network
Physical Physical
Gateway
Gateway
Bridge
Bridge
packets that go from one type of network to another. The amount and type of
protocol conversion done by the gateway vary with the protocols and physical
media of the networks involved. In addition to being protocol converters, gateways
act as buffers between networks with different transmission rates.
Unlike bridges and routers, a gateway is not used to build a network but to link
two or more unrelated networks. A gateway converts a packet from one protocol to
another, while a router chooses the best route for the packet but changes only its
addressing. Like a router, a gateway performs routing at the network layer. As
illustrated in Fig. 7.8, gateways implement the entire protocol suite for each
network. Depending on the level of incompatibility, gateways function at the
transport through application layers of the OSI model. It is evident that gateways
cause more delay than bridges and routers.
A typical example of direct interconnection of three bus and two ring LANs is
shown in Fig. 7.9.
7.3 Performance Analysis of Interconnected Token Rings 205
Token Ring 1
Backbone Ring
Token Ring 3
To other rings
ηk in the network
Λk From other
rings in the
network
from the local ring and transmits into the backbone ring. The packets are buffered in
the bridge until they are successfully transmitted into the appropriate ring.
There are two kinds of messages (internetwork and intranetwork messages) and
two modes of operation (priority and non-priority) in an interconnected token ring
network system. In the non-priority mode, the bridge and all other stations can
transmit at most one message each time they receive the token. In the priority mode,
on the other hand, the bridge transmits exhaustively while other stations can
transmit at most one message upon receiving the token. It is assumed that the
network operates in the priority mode in this section.
We consider a system with K token rings network labeled 1, . . ., K, connected to
a FDDI backbone ring as shown in Fig. 7.10. In each token ring there are Nk 1
identical stations and a bridge.
7.3.1 Notation
ηk ¼ rate at which messages arrive from individual stations in ring k at bridge k for
transmission in the backbone ring
λk ¼ arrival rate of messages which form a Poisson process for ring k
Λk ¼ rate at which messages arrive from other rings at bridge k for transmission
in ring k
Note that the switchover time is variably known as the walk time, the polling
time, or the token-passing time.
A stream of messages arrive at each station on ring k at the same average rate of λk,
which is an independent Poisson process. The number of stations sending messages
to bridge k from its own ring has a binomial distribution with parameters Nk 1
and q ¼ 1 qkk. Therefore the probability of n stations sending messages to the
bridge is [9]
Nk 1 n
PðnÞ ¼ q ð1 qÞNk 1n (7.1)
n
Since the stations that communicate with each other are mostly likely on the
same ring, the probability q of a station sending messages to stations on other rings
is usually small. Also, the number of stations Nk 1 is often large (more than 20).
For small q and large Nk, this binomial distribution approximates Poisson distribu-
tion. Thus the arrival process to the bridge can be approximated to be Poisson with
parameter (Nk 1)(1 qkk). In an average cycle time Ck, an average of (Nk 1)
(1 qkk) messages arrive at bridge k and hence the arrival rate at the bridge is
Having shown that the arrival of messages to the bridge is Poisson and because
the sum of independent Poisson processes is also Poisson, the arrival process of
messages from other rings is Poisson distributed with rate
X
K
Λk ¼ ðN l 1Þλl qlk , k ¼ 1, . . . , K (7.3)
l¼1, l6¼k
Our measure of performance is delay. The delay (or transfer time) includes the
queuing time (or waiting delay) at the source station, the source bridge delay and
destination bridge delay. The mean transfer delay of a message is therefore the sum
of the following terms:
208 7 Metropolitan Area Networks
Dss k
¼ the mean message delay at the source station
τs ¼ the propagation delay from the source station to the source bridge
k
In general the propagation delays are negligibly small compared to other delays
and can be ignored. Therefore, the total mean delay in Eq. (7.4) becomes
For the local message, the mean message delivery time for the message in
ring k is
For an arbitrary message generated in ring k, the mean message delivery time is
given by
X
Dkarb ¼ qkk Dkss þ qkl Dkl
remote (7.7)
l6¼k
Arbitrary delay denotes the delay of a message which is generated in a ring but
has an arbitrary destination, which could be the ring itself or any other ring.
Substituting Eq. (7.5) into Eq. (7.7) gives
X
Dkarb ¼ qkk Dkss þ qkl Dkss þ Dksb þ Dldb
l6¼k
X
where qkk þ qkl ¼ 1. Thus,
l6¼k
X
Dkarb ¼ Dkss þ qkl Dksb þ Dldb (7.8)
l6¼k
Following Ibe and Cheng’s mathematical model [10], it is assumed that all the
stations in each ring are labeled 2,. . .,Nk, whereas a bridge is labeled as node 1.
Since it is assumed that all the stations are identical in each ring, the local delay and
the delay at the destination bridge are given by
where node 2 represents any non-bridge station; w1k and w2k are the waiting delays
at the destination bridge and source station, respectively; and b1k and b2k are their
respective service times. The traffic intensities at the bridge and each station in ring
k are respectively given by
X
K
ρ1k ¼ Λk b1k ¼ ðN l 1Þλl qlk b1k (7.11)
l¼1, l6¼k
and
The total traffic intensity of the ring k is the sum of the two traffic intensities and
given by
The mean cycle time is defined as the mean time between two successive visits
of the server to a particular node and it is given by
sk
Ck ¼ (7.14)
1 ρk
where
X
Nk
sk ¼ r jk (7.15)
j¼1
In terms of these variables, the mean waiting time at the destination bridge is
given by [10, 11]:
ð2Þ ð2Þ ð2Þ ð2Þ
Λk b1k ðN k 1Þλk b2k ð1 ρk Þr 1k þ ðN k 1Þð1 ρ1k þ ρ2k Þr 2k
w1k ¼ þ þ
2ð1 ρ1k Þ 2ð1 ρk þ ρ2k Þ 2sk ð1 ρ1k Þ
ðN k 1Þρ2k sk ðN k 1ÞðN k 2Þρ22k sk ðN k 1Þð1 ρk Þr 1k r 2k
þ þ þ
2ð1 ρ1k Þ 2ð1 ρ1k Þð1 ρk þ ρ2k Þ sk ð1 ρ1k Þ
ðN k 1Þ½ðN k 2Þð1 ρk Þ N k ρ2k r 22k
þ
2sk ð1 ρ1k Þ
(7.16)
The mean waiting time at any non-bridge node in ring k is [19]
where
h i s
ð2Þ
ð2Þ ð2Þ
A ¼ ρk Λk b1k þ ðN k 1Þλk b2k þ ρk ð1 ρk Þ k
sk
h i
ð2Þ
þ sk ρk ρ21k þ ðN k 1Þρ22k (7.18)
To compute the mean delay Dsbk at the source bridge, let Xk denote the mean
transmission time of a message at bridge k in the backbone ring, where xk and xk2
are the first and second moments of Xk, respectively. Let
γ k ¼ η k xk (7.19)
denote the offered load at bridge k, where ηk is the arrival rate at each bridge in the
backbone ring. The total traffic intensity γ of the backbone ring is given by
X
K
γ¼ γk (7.20)
k¼1
The approximate mean waiting time at bridge k of the backbone ring is given
in [20] as
2 !3
X K
ð2Þ
6 γ ð1 γ ÞΔb þ sb
2
ηl xl 7
1 γk 6 6 l¼1 7
7
wsb ¼
k
6s b þ 7 (7.21)
2ð 1 γ Þ 4 XK
5
sb γ l ð1 γ l Þ
l¼1
where sb and Δb are respectively the mean and variance of the total walk time of
2
where w1l and b1l are the waiting delay and service time at the destination bridge,
respectively.
7.3 Performance Analysis of Interconnected Token Rings 211
Table 7.2 Arrival rates Arrival from local Arrival from backbone
ηk and Λk ring to backbone ring ring to local ring
η1 ¼ 2λ1 Λ1 ¼ 44λ1
η2 ¼ 16λ1 Λ2 ¼ 20λ1
η3 ¼ 36λ1 Λ3 ¼ 10λ1
η4 ¼ 30λ1 Λ4 ¼ 10λ1
SY tα=2 ; N 1
X¼Y pffiffiffiffi (7.26)
N
where tα/2; N 1 is the percentage point of the Student-t distribution with N 1
degrees of freedom, Y is the mean sample value, N (¼5 for our case) is the number
of simulation runs, SY is the sample standard deviation.
212 7 Metropolitan Area Networks
The results are presented in terms of delay versus traffic intensity of ring 1
(i.e., ρ1). Tables 7.4, 7.5, and 7.6 show comparison (for ring 2, i.e. k ¼ 2, l ¼ 1)
between analytical and simulation results for local, remote (or end-to-end), and
arbitrary delays. The percent error in each result is also included in the tables, where
the percent error is defined as
It is evident from these tables that analytical results agree fairly well with the
simulation results.
Figure 7.12 shows the variation of the normalized mean total delay (Dtotal/b)
with traffic intensity for constant packet length. It is evident from the figure that in
general the mean delay increases with traffic intensity. This should be expected
because as the traffic intensity increases many messages are serviced, thereby
compelling the arriving message to wait longer.
Figure 7.13 shows local delay, bridge delay, and backbone delay for ring 3. It is
clear from this figure that the backbone delay is very small compared to the bridge
and local delays. The reasons for this include: (1) the backbone ring operates at a
very high speed, (2) it has very few stations, and (3) it employs an exhaustive
service discipline which always has less delays. Figure 7.13 also shows that the
bridge and the local delay are almost the same at low traffic intensity. The priority
given to the bridge has no effect on the local and bridge delays from low to
moderate traffic intensities. However, at high traffic intensities it is observed that
214 7 Metropolitan Area Networks
the priority for the messages at the bridge makes the bridge delay much lower than
the local delay.
Figure 7.14 shows the arbitrary delay for the four rings.
These figures show the effect of asymmetric traffic conditions (i.e., different
arrival rates in each ring) and routing probabilities given in Table 7.1. The arrival
rate of ring 1, 2, 3, and 4 are λ1 , 2λ1 , 3λ1 , and 3λ1 respectively. The arbitrary delay
for ring 1 is the lowest because it has the lowest routing probability (i.e., qkl ¼ 0.1)
for the inter-messages. The routing probability for inter-messages of ring 2, 3, and 4
are 0.6, 0.4, and 0.5, respectively. Since the routing probabilities are so close for
ring 2, 3, and 4, the arrival rates have the dominating effect on the arbitrary delay.
It can be seen from this figure that the higher the arrival rate of the ring the higher
the delay.
Problems 215
7.4 Summary
Problems
7.1 Give two reasons for building MANs using internetworking devices.
7.2 (a) Describe a repeater as an interconnecting device? It is a hardware or
software device?
(b) How is a repeater different from a bridge?
216 7 Metropolitan Area Networks
7.3 Explain the three basic functions of a bridge: forwarding, filtering, and
learning.
7.4 Two token rings operating at 16 Mbps are connected by a bridge. If each
frame transmitted is 176 bits, calculate the number of frames/second the
bridge can handle. Repeat the calculation if the transmission rate is 4 Mbps.
7.5 Compare bridges and routers. When should they each be used?
7.6 Describe three internetworking devices and specify the limitations of each.
7.7 In a home, a coaxial cable interconnects audiovisual devices, while a twisted
pair is used for controlling general purpose devices such as cooking machine,
heater, and washing machine. What kind of interconnecting device can be
used to connect the twisted pair and coaxial cable media to provide a low cost
solution?
7.8 Write a computer program to find the normalized delays in a system
of interconnected token rings based on the data provided in Example 7.2.
(a) Reproduce the result in Table 7.4 and plot normalized Darb versus ρ1
for ring 2.
(b) Reproduce the result in Table 7.6 and plot normalized Dlocal versus
ρ1 ¼ 0.1, 0.2, . . ., 0.9.
7.9 (a) Write a computer program to reproduce the result in Table 7.5 and plot
normalized Dremote versus ρ1 for ring 2.
(b) For ring 4, calculate normalized Dremote versus ρ1 ¼ 0.1, 0.2, . . ., 0.9 and
plot the data.
7.10 For ring 3, calculate normalized Dremote versus ρ1 ¼ 0.1, 0.2, . . ., 0.9 and plot
the data.
7.11 Show that when no station receives service (Nk ¼ 1), w1k in Eq. (7.16)
becomes
ð2Þ ð2Þ
Λk b1k r
w1k ¼ þ 1k
2ð1 ρ1k Þ 2r 1k
which is the exact solution for the symmetric polling system with exhaustive
service.
7.12 For a symmetric single-service polling system, ρ1k ¼ 0 ¼ r1k. Obtain the
corresponding expression for w2k.
7.13 Reproduce the entries in Table 7.2 using Eqs. (7.2) and (7.3).
7.14 Reproduce the entries in Table 7.3 using Eqs. (7.11)–(7.13) and (7.19).
References 217
7.15 Consider an interconnected token ring network with three rings each having 10
stations and 1 bridge. Let λ1 ¼ λ2 ¼ λ3 ¼ λ. Assuming routing probabilities
shown in Table 7.7, obtain ηk and Λk, k ¼ 1, 2, 3 in terms of λ.
References
1. M. N. O. Sadiku, Metropolitan Area Networks. Boca Raton, FL: CRC Press, 1995, p. 3.
2. M. N. O. Sadiku and S. M. Musa, Computer Communication for Metropolitan and Wide Area
Networks. New York: Nova Science Publishers, 2010, p. 4.
3. J. F. Mollenauer, “Standards for Metropolitan Area Networks,” IEEE Communications Maga-
zine, vol. 26, no. 4, 1988, pp. 15-19.
4. C. Smythe, Internetworking: Designing the Right Architectures. Wokingham, U.K.: Addison-
Wesley, 1995, pp. 171-318.
5. E. Taylor, McGraw-Hill Internetworking. New York: McGraw-Hill, 2nd ed., 1998, pp. 569-
628, 647-673.
6. R. C. Dixon and D. A. Pitt, “Addressing, Bridging, and Source Routing,” IEEE Network,
vol. 2, no. 1, Jan. 1988, pp. 25-32.
7. W. M. Seifert, “Bridges and Routers,” IEEE Network, vol. 2, no. 1, Jan. 1988, pp. 57-64.
8. M. Gerla and L. Kleinrock, “Congestion Control in Interconnected LANs,” IEEE Network,
vol. 2, no. 1, Jan. 1988, pp. 72-76.
9. R. Kuruppillai and N. Bengtson, “Performance Analysis in Local Area Networks of
Interconnected Token Rings,” Computer Communications, vol. 11, no. 2, April 1988,
pp. 59-64.
10. O. C. Ibe and X. Cheng, “Analysis of Interconnected Systems of Token Ring Networks,”
Computer Communications, vol. 13, no. 3, 1990, pp. 136-142.
11. O. C. Ibe and X. Cheng, “Approximate Analysis of Asymmetric Single-Service
Token-Passing Systems,” IEEE Transactions on Communications, vol. 37, no. 6, June 1989,
pp. 572-577.
12. W. Bux and D. Gillo, “Flow Control in Local Area Networks of Interconnected Token Rings,”
IEEE Transactions on Communications, vol. 33, no. 10, October 1985, pp. 1058-1066.
13. I. Rubin and J. K. Lee, “Performance Analysis of Interconnected Metropolitan Area Circuit-
Switched Telecommunications Networks,” IEEE Transactions on Communications, vol. 36,
no. 2, Feb. 1988, pp. 171-185.
14. I. Stavrakakis and D. Kazakos, “Performance Analysis of a Star Topology of Interconnected
Networks Under 2nd-Order Markov Network Output Processes,” IEEE Transactions on
Communications, vol. 38, no. 10, Oct. 1990, pp. 1724-1731.
15. B. Berg and R. H. Deng, “End-to-end Performance of Interconnected LANs,” Computer
Communications, vol. 14, no. 2, March 1991, pp. 105-112.
16. G. S. Poo, “Performance Measurement of Interconnected CSMA/CD LANs,” Computer
Communications, vol. 12, no. 1, Feb. 1989, pp. 3-9.
17. T. Kaneko, S. Hosokawa, and K. Yamashita, “An Interconnection Method for Two
CSMA/CD LANs,” Memoirs of the Faculty of Engineering, Osaka City University, vol. 29,
1988, pp. 81-89.
18. G. M. Exley and L. F. Merakos, “Throughput-Delay Performance of Interconnected CSMA
Local Area Networks,” IEEE Journal on Selected Areas in Communications, vol. 5, no. 9,
Dec. 1987, pp. 1380-1390.
19. M. Murata and H. Takagi, “Performance of Token Ring Networks with a Finite Capacity
Bridge,” Computer Networks and ISDN Systems, vol. 24, 1992, pp. 45-64.
20. D. Everitt, “Simple Approximation for token rings,” IEEE Transactions on Communications,
vol. 34, no. 7, July 1986, pp. 719-721.
218 7 Metropolitan Area Networks
8.1 Internet
The Internet is a global network of computer systems (or wide area network) that
exchange information via telephone, cable television, wireless networks, and satellite
communication technologies. It is being used by an increasing number of people
worldwide. As a result, the Internet has been growing exponentially with the number
of machines connected to the network and the amount of network traffic roughly
doubling each year. The Internet today is fundamentally changing our social, political,
and economic structures, and in many ways obviating geographic boundaries.
The Internet is a combination of networks, including the Arpanet, NSFnet,
regional networks such as NYsernet, local networks at a number of universities
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 219
DOI 10.1007/978-3-319-01646-7_8, © Springer International Publishing Switzerland 2013
220 8 Wide Area Networks
Application Layer TELNET, FTP, Finger, Http, DNS, RIP, SNMP, etc.
Network Layer Ethernet, Token ring, X.25, FDDI, ISDN, SMDS, DWDM,
and research institutions, and a number of military networks. Each network on the
Internet contains anywhere from two to thousands of addressable devices or nodes
(computers) connected by communication channels. All computers do not speak the
same language, but if they are going to be networked they must share a common set
of rules known as protocols. That is where the two most critical protocols, Trans-
mission Control Protocol/Internet Protocol (TCP/IP), come in. Perhaps the most
accurate name for the set of protocols is the Internet protocol suite. (TCP and IP are
only two of the protocols in this suite.) TCP/IP is an agreed upon standard for
computer communication over Internet. The protocols are implemented in software
that runs on each node.
For example, FTP (file transfer protocol) allows a user to transfer files to and
from computers that are connected to the Internet. Security is handled by
requiring the user to specify a user name and password for the other computer.
TELNET (network terminal protocol for remote login) allows a user to log on to
and use other computers that are connected to the Internet regardless of their
location. SMTP (simple mail transfer service; for computer mail) allows a user
to send messages to users on other computers. Originally, people tended to use
only one or two specific computers. They would maintain “mail files” on those
machines. The computer mail system is simply a way for you to add a message to
another user’s mail file.
• Transport layer: This layer controls the movement of data between nodes. The
layer provides communication services directly to the application processes
running on different hosts. The communication services may include the
multiplexing/demultiplexing function. In the Internet, there are two transport
protocols: TCP and UDP. TCP (Transmission Control Protocol) is connection-
oriented service that provides services needed by many applications. TCP also
provides segmentation of long messages and a congestion control mechanism.
UDP (User Datagram Protocol) provides connectionless services.
• Internet Layer: This handles addressing and routing of the data. It is also
responsible for breaking up large messages and reassembling them at the
destination. IP (Internet Protocol) provides the basic service of getting
datagrams to their destination. ARP (Address resolution protocol) figures out
the unique address of devices on the network from their IP addresses. The
Internet Protocol (IP) can be described as the common thread that holds the
entire Internet together. It is responsible for moving datagrams from one host to
another, using various techniques (or “routing” algorithms). Prior to transmitting
data, the network layer might subdivide or fragment it into smaller packets for
ease of transmission. When all the pieces finally reach the destination, they are
reassembled by the network layer into the original datagram.
• Network layer: This layer is responsible for routing datagrams from one host to
another. It contains the IP protocol as well as several routing protocols that
determine the routes of the datagrams. The network layer involves every host
and router in the network. It also supervises addressing and congestion control.
Protocols at this layer are needed to manage a specific physical medium, such as
Ethernet or a point-to-point line.
IP provides a connectionless, unreliable, best-effort packet delivery service.
Information is transferred as a sequence of datagrams. Those datagrams are treated
by the network as completely separate. For example, suppose we want to transfer a
15000 octet file. Most networks cannot handle a 15000 octet datagram. So the
protocols will break this up into something like 30 500-octet datagrams. Each of
these datagrams will be sent to the other end. At that point, they will be put back
together into the 15000-octet file. However, while those datagrams are in transit, the
network does not know that there is any connection between them. It is perfectly
possible that datagram 27 will actually arrive before datagram 19. It is also possible
222 8 Wide Area Networks
that somewhere in the network, an error will occur, and some datagram would not
get through at all. In that case, that datagram has to be sent again.
As shown in Fig. 8.2, each layer of the protocol stack adds a header containing
layer-specific information to the data packet. A header for the network layer might
include information such as source and destination addresses. The process of
appending data with headers is called encapsulation. Figure 8.2 shows how data
is encapsulated by various headers. The reverse occurs during decapsulation: the
layers of the receiving stack extract layer-specific information and process the
encapsulated data accordingly. It is interesting to note that the process of encapsu-
lation increases the overhead involved in transmitting data. Although each of these
layers provides unique and valuable services, the Internet Protocol is perhaps the
most important to the overall operation of the Internet in general because it is
responsible for getting data from one host to another.
TCP puts a header at the front of each datagram. This header actually contains at
least 20 octets, but the most important ones are a source and destination “port
number” and a “sequence number.” The port numbers are used to keep track of
different conversations. Each datagram has a sequence number which is used so
that the other end can make sure that it gets the datagrams in the right order, and that
no datagrams are missing. Finally, the checksum is a number that is computed by
adding up all the octets in the datagram. The result is put in the header. TCP at the
other end computes the checksum again. If they disagree, then something bad
happened to the datagram in transmission, and it is thrown away. Figure 8.3
shows the datagram format.
8.1 Internet 223
Bit 0 31
Other items in the header are generally involved with managing the connection.
In order to make sure the datagram has arrived at its destination, the recipient has to
send back an “acknowledgement.” This is a datagram whose “Acknowledgement
number” field is filled in. For example, sending a packet with an acknowledgement
of 1500 indicates that you have received all the data up to octet number 1500. If the
sender does not get an acknowledgement within a reasonable amount of time, it
sends the data again. The “window” is used to control how much data can be in
transit at any one time. Each end indicates how much new data it is currently
prepared to absorb by putting the number of octets in its “Window” field. As the
computer receives data, the amount of space left in its window decreases. When it
goes to zero, the sender has to stop. As the receiver processes the data, it increases
its window, indicating that it is ready to accept more data. Often the same datagram
can be used to acknowledge receipt of a set of data and to give permission for
additional new data (by an updated window). The “Urgent” field allows one end to
tell the other to skip ahead in its processing of a particular octet.
8.1.3 IP level
IP (Internet Protocol) is the standard that defines the manner in which the network
layers of two hosts interact. All IP packets or datagrams consist of a header part and a
text part (payload). The payload has a maximum size limit of 65,536 bytes per
packet. The IP header consists of a 20-byte fixed part plus a variable part. Its size
is optimized to maximize the packet processing rate without utilizing excessive
resources. The header begins with a 4-bit version field that keeps track of the version
of the IP protocol to which the datagram belongs. This field helps smoothen the
transition from one version of IP to another, which can take months or even years.
IP packet contains a source and a destination address. The source address
designates the originating node’s interface to the network, and the destination
address specifies the interface for an intended recipient or multiple recipients (for
multicasting). These addresses are in the form of 32-bit binary strings.
224 8 Wide Area Networks
Bit 0 31
The header also consists of a Time to Live (TTL) that is used to limit the life of
the packet on the network. This is to take care of a situation in which an IP packet
gets caught in the system and becomes undeliverable. The TTL field maintains a
counter that is normally initialized to 30 count and is decremented each time the
packet arrives at a routing step. If the counter reaches zero, the packet is discarded.
TCP sends datagrams to IP with the Internet address of the computer at the other
end. IP’s job is simply to find a route for the datagram and get it to the other end. In
order to allow gateways or other intermediate systems to forward the datagram, it
adds its own header, as shown in Fig. 8.4. The main things in this header are the
source and destination Internet address (32-bit addresses, like 128.6.4.194), the
protocol number, and another checksum. The source Internet address is simply the
address of your machine. The destination Internet address is the address of the other
machine. The protocol number tells IP at the other end to send the datagram to TCP
or UDP or some other protocol. Although most IP traffic use TCP, there are other
protocols that can use IP, so you have to tell the IP which protocol to send the
datagram to. Finally, the checksum allows IP at the other end to verify that the
header was not damaged in transit. Note that TCP and IP have separate checksums.
IP needs to be able to verify that the header did not get damaged in transit, or it
could send a message to the wrong place. After IP has tacked on its header, the
message looks like what is in Fig. 8.4.
Conventionally IP addresses are usually written as four integers separated by
dots; each integer corresponding to 8 bits. For example, the binary address
10000000 00001011 00000110 00011110
is written in decimal form as
128.11.6.30
Thus, IP addresses are usually written as a sequence of four numbers separated
by three dots such as NNN.NNN.HHH.HHH, where N stands for octets that identify
network and H denotes octets that specify the host. Each number can be between
0 and 255 except the last number which must be between 1 and 254. Inside your
8.1 Internet 225
The Internet has some characteristics that make it exceedingly hard to analyze,
model or simulate. Such characteristics include its size, complexity, heterogeneity
of the subnetworks involved, and the fact that it changes drastically with time.
These difficulties have been tackled in different ways [6–11].
One way is to calculate the end-to-end delay. The end-to-end delay analysis will
involve the following components [6]:
• Packetization delay: This is time to fill an IP packet at the source. If we assume
that the source produces a constant bit stream, the packetization delay is the
payload size divided by the source information rate.
• Queueing delay: Packets have to be queued at every router since only one packet
can be processed at a time.
• Propagation delay: This is time taken by the packets to pass through the
transmission medium (copper or fiber).
Several other factors may contribute to the end-to-end delay but are usually not
significant.
Another way is to consider the end-to-end congestion control mechanism. It is
conventional to use packet drops as an indication of congestion. A conformant TCP
connection is one where the TCP sender follows the following two traits. First, the
TCP data sender interprets any packet drop in a window of data as an indication of
congestion, and responds by reducing the congestion window at least in half.
Second, during the congestion avoidance phase in the absence of congestion, the
TCP sender increases congestion control by at most one packet per round-trip time.
We say a flow is TCP-friendly when its arrival rate does not exceed the arrival rate
of a conformant TCP connection in the same circumstances. In order to be
TCP-friendly, the source’s average sending rate must not be higher than that
achieved by a TCP connection along the same path. Estimation of the steady state
throughput of a long-live TCP connection is given by
k M
T¼ pffiffiffi (8.1)
R p
M
T ¼ qffiffiffiffiffiffi qffiffiffiffiffiffi (8.2)
R 2 þ 3T o 3bp
2bp
8 pð1 þ 32p Þ
2
The integrated services digital network (ISDN) is a facility which many claim to be
the most significant advance in telecommunications since the introduction of the
telephone itself. It is a digital end-to-end telecommunication wide area network
(WAN) in which voice, video, and data services are integrated. However, the
characteristics of narrowband ISDN are inadequate for many applications of inter-
est and in meeting the perceived users’ needs for higher speed, broader bandwidth,
and more flexibility such as video distribution, HDTV, and HiFi stereo. The needs
are accommodated in broadband ISDN (BISDN). Consequently, as far as data
networks are concerned, real excitement of ISDN comes about when one considers
the capabilities of BISDN [12].
Broadband is the provision of subscriber access at bit rates in excess of 2 Mbps.
Broadband applications are those implemented through broadband access and
require data rate greater than is generally available in narrowband ISDN. The
BISDN concept developed from the fact that a large range of voice, data, and
video services can be simultaneously carried on the same optical system. Broad-
band is the provision of subscriber access at bit rates in the range of 1.5 Mbps up to
approximately 150 Mbps. The demand for broadband communication originated
from business and residential customers. Residential customers are interested in
distribution services such as TV. Business customers require services for video,
data, and graphics. The bit rates for these services are in the range of 2–130 Mbps
and require broadband communication [13].
BISDN is regarded as an all-purpose digital network in that it will provide an
integrated access that will support a wide variety of applications in a flexible and
cost-effective manner.
8.3 Summary
1. The TCP/IP has been the foundation of the Internet and virtually all multivendor
internetworks. They are the world’s most popular open-system (nonproprietary)
protocol suite because they can be used to communicate across any set of
interconnected networks and are equally suited for LAN, MAN, and WAN
communications.
228 8 Wide Area Networks
2. BISDN started out as an extension of ISDN and has many concepts similar
to ISDN.
More about WAN can be found in [14] and its performance analysis is
presented in [15].
Problems
8.1 It is called TCP/IP. Mention three other protocols in the suite and what they
are for.
8.2 What is the difference between TCP and UDP if they both operate at
the transport layer?
8.3 What are the layers of the TCP/IP model and how are they related to the
OSI model?
References
What you do speaks so loudly that I cannot hear what you say.
—Ralph Waldo Emerson
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 229
DOI 10.1007/978-3-319-01646-7_9, © Springer International Publishing Switzerland 2013
230 9 Wireless Networks
ALOHA is the simplest broadcast protocol. The original goal of ALOHA was to
investigate the use of radio communications as an alternative to the telephone
system for computer networks. At that time, the University of Hawaii was com-
posed of six campuses on different islands all within a radius of 300 km from the
main campus near Honolulu. It was envisaged that such a radio data network would
connect these campuses and allow sharing of computer resources [2]. Thus,
ALOHA networks were proposed to make short delays possible. They are random
time-division multiple access networks because stations or terminals make use of
the channel at random times. The principles of ALOHA systems are incorporated in
both LANs and WANs. For example, ALOHA-based protocols are used in CSMA/
CD and token ring, which are LANs. They are also used in VSAT networks, which
are WANs [3].
In a pure ALOHA network, all users can initiate transmission at any time, in
completely unsynchronized manner. Any station which has a packet to transmit
simply transmits the packet regardless of whether other stations are transmitting. If,
within some appropriate time-out period, an acknowledgement is received from the
destination, the transmission is regarded successful. A transmission is unsuccessful
if no acknowledgement is received after a certain time. The station will then assume
its packet is lost. Through a random process, the station will determine a certain
waiting time and retransmit the packet when that time expires.
A useful performance characteristic for ALOHA network is the relationship
between throughput S and offered load G. Assume that the start times of packets in
the channel comprise a Poisson point process with parameter λ packets/s so that
ðλτÞk λτ
Prob½k arrivals in τ seconds ¼ e (9.1)
k!
If each packet lasts τ seconds, we define the normalized channel traffic G as
G ¼ λτ (9.2)
We may assume that only those packets which do not overlap with other packets
are correctly received. We define the normalized channel throughput S as
S ¼ GPs (9.3)
Fig. 9.1 Throughput versus offered load for pure and slotted ALOHA
Thus,
S ¼ Ge2G (9.5)
S ¼ GeG (9.6)
Example 9.1 Suppose an ALOHA network employs a 4.8-kbps channel for sending
packets which are each 200 bits. What is the maximum throughput possible for pure
and slotted ALOHA?
Solution
The system transmits packets at the rate of
24 0:184 4 packets=s
24 0:368 8 packets=s
WLAN does not compete with wired LAN. Rather, WLANs are used to extend
wired LANs for convenience and mobility. Wireless links essentially fill in for
wired links using electromagnetic radiation at radio or light frequencies between
transceivers. A typical WLAN consists of an access point and the WLAN adapter
installed on the portable notebook. The access point is a transmitter/receiver
(transceiver) device; it is essentially the wireless equivalent of a regular LAN
hub. An access point is typically connected with the wired backbone network at a
fixed location through a standard Ethernet cable and communicates with wireless
devices by means of an antenna. WLANs operate within the prescribed 900 MHz,
2.4 GHz, and 5.8 GHz frequency bands. Most LANs use 2.4 GHz frequency bands
because it is most widely accepted.
A wireless link can provide services in several ways including the following
three [5]:
• Replace a point-to-point connection between two nodes or segments on a LAN.
A point-to-point link is a connection between two devices for transferring data.
A wireless link can be used to bridge two LAN segments. Like a point-to-point
link, the link connects two wireless bridges attached to the two LANs. Such an
arrangement is useful for linking LANs in two buildings where a highway or
river makes direct connection difficult.
• Provide a connection between a wired LAN and one or more WLAN nodes.
In this case, a device is attached to the wired LAN to act as a point of contact
(called access point) between the wired LAN and the wireless nodes as shown in
Fig. 9.2. The device can be a repeater, bridge or router.
• Act as a stand-alone WLAN for a group of wireless nodes. This can be achieved
using topologies similar to wired LAN, namely, a star topology can be formed
with central hub controlling the wireless nodes, a ring topology with each
wireless node receiving or passing information sent to it or a bus topology
with each wireless capable of hearing everything said by all the other nodes.
9.2.2 Technologies
Wireless
Access Point/
Bridge
Wireless Nodes
50 dB. However, in the ISM band used in WLAN, the available bandwidth critically
limits the ratio of spreading and so the advantages of DSSS scheme against
interference is greatly limited. It has been shown that for the WLAN system
using DSSS, the spreading ratio is at best ten times. DSSS is characterized by
high cost, high power consumption, and more range than FHSS and infrared
physical layers. FHSS is characterized by low cost, low power consumption, and
less range than DSSS but greater range than infrared. Most WLAN systems
use FHSS.
The second technology used in WLAN is Infra Red (IR), where the communi-
cation is carried by light in the invisible part of the spectrum. It is primarily used for
very short distance communications (less than 1 m), where there is a line-of-sight
connection. Since IR light does not penetrate solid materials (it is even attenuated
greatly by window glass), it is not really useful in comparison to RF in WLAN
system. However, IR is used in applications where the power is extremely limited
such as a pager.
9.2.3 Standards
Channel 1 Channel 7
frequency bands. (The ISM bands 902–928 MHz, 2,400–2,483.5 MHz, and
5,725–5,850 MHz do not require a license to operate.) The IEEE 802.11
specifications for DSSS wireless LAN is shown in Fig. 9.3.
• Added features to the MAC that can maximize battery life in portable clients via
power-management schemes.
• Data security through which the wireless LANs can achieve wired equivalent
privacy.
The standard basically defines the media and configuration issues, transmission
procedures, throughput requirements, and range characteristics for WLAN technol-
ogy. It avoids rigid requirements and gives room for vendors in the following areas:
multiple physical media, common MAC layer irrespective of the physical layer,
common frame format, power limit, and multiple on-air data rates [7].
There are three major problems encountered by an RF LAN [8]. First, frequency
allocation is limited for LANs. But since LANs operate with low power, frequency
reuse is possible. Second, interference from other wireless LANs controlled
by different organization and other wireless sources is a problem. This problem
can be controlled by using spread spectrum techniques. Third, security is at stake
because RF signal can penetrate through the wall and hostile operators can intercept
RF LAN communications. Encryption can be used to lessen this problem. IR LAN
uses both laser diodes and light-emitting diodes as emitters. It is useful in high
electromagnetic interference (EMI) environments. It is also secure since IR signal
cannot penetrate the wall.
9.2 Wireless LAN 237
CSMA/CA is slightly different from carrier sense multiple access with collision
detection (CSMA/CD), which is the MAC protocol used in Ethernet wired LAN. In
CSMA/CA, when a node has something to transmit, it waits for silence on the
network. When no other nodes are heard, it transmits and waits to receive an
acknowledgement from the recipient node. If it fails to receive an acknowledge-
ment within a time period, it assumes that collision has occurred and follows a
process similar to CSMA/CD. Each node then waits for silence and only transmits
after a random amount of waiting. While CSMA/CA protocol is slower that CSMA/
CD due to the need for waiting for acknowledgement, it works well for wireless
LANs. Also, WLANs operate in strong multipath fading channel where channel
characteristics can change resulting in unreliable communication.
The ETSI devoted its attention to RF wireless LANs. The ETSI is close to
finalizing its standard, which is based on the 2.4 GHz range used for spread-
spectrum LANs in several European countries. European standard WLAN, called
HiperLAN, will allow speeds of 24 Mbps [9].
Besides IEEE and ETSI, there are organizations that are more interested in the
implementation and interoperability of WLAN products. Such organizations
include Wireless LAN Alliance (WLANA at www.wlana.com) and Wireless Ether-
net Compatibility Alliance (WECA at www.wi-fi.org or www.wirelessethernet.
com). WLANA was formed in 1996 with 12 members as a trade association for
wireless LAN vendors. WECA is a nonprofit manufacturing consortium with over
60 companies as members; it was formed in 1999 to certify interoperability of IEEE
802.11 products. Research groups are working hard to shrink radios into a chip that
can be mass produced cheaply. If they succeed, the demand for radio LANs may
follow the same trend as cellular phones in recent years.
where λ is the arrival rate; N is the number of stations; t is the packet transmission
time with first moment t and second moment t2 ; R is the walk time with first
moment R and second moment R2 . For exhaustive policy, the corresponding
equation is
!
e1 Nλt2 ð1 λt ÞNR R2
W ¼ þ þ R 1 þt 1 (9.8)
2 1 Nλt2 1 Nλt R
The above analysis has been presented in a summarized form. For more details,
the interested reader is referred to [10, 11].
The above model is on a general WLAN. We now consider an IEEE 802.11
based WLAN, where the nodes use Distributed Coordination Function (DCF) mode
of the MAC protocol. We recall that DCF is governed by a “listen-before-talk”
protocol known as CSMA. Every station that wants to transmit first senses the
channel for at least a duration of DIFS (Distributed Inter Frame Spacing). If the
channel is idle for the entire DIFS, the station transmits the packet. Otherwise, it
avoids collision by selecting a random back-off time uniformly distributed in the
range [0, CW], where CW is the Contention Window. Under saturation conditions,
the CSMA/CA process can be modeled as a two dimensional Markov chain.
We now can express the probability τ that a station transmits in a randomly
selected slot time. Let p be the probability that its transmission will collide with at
least one other node. In [12–14], the access probability τ is related to the collision
probability of each packet p as
2ð1 2pÞ
τ¼ (9.9)
ð1 2pÞðW þ 1Þ þ pW ½1 ð2pÞm
where W is the minimum backoff window in terms of backoff slots, and m is the
maximum backoff stage. Notice from Eq. (9.9) that when m ¼ 0, i.e. no exponen-
tial backoff is considered,
2
τ¼ (9.10)
Wþ1
i.e. τ is independent of p. However, τ generally depends on the collision
probability p, which is yet to be found. To find p. we note that p is the probability
that, in a time slot, at least one the n 1 remaining stations transmits
p ¼ 1 ð1 τÞn1 (9.11)
Equations (9.9) and (9.11) together form a system of nonlinear system and need
to solved using numerical techniques (e.g. Newton’s method). Once τ is known, we
can calculate the throughput.
9.3 Multiple Access Techniques 239
Let S be the normalized system throughput, defined as the fraction of time the
channel is used to successfully transmit. Let Ptr be the probability that there is at
least one transmission in the considered slot time. Since n stations contend for
transmission and each transmit with probability τ:
If E[P] is the average packet payload size, the average amount of payload
information successfully transmitted in a slot time is PtrPsE[P], since a successful
transmission occurs in a slot time with probability PtrPs. Hence, Eq. (9.14) becomes
Ps Ptr E½P
S¼ (9.15)
ð1 Ptr Þσ þ Ptr Ps T s þ Ptr ð1 Ps ÞT c
Where σ is the duration on an empty slot time, Ts is the average time the channel
is senses busy because of a successful transmission, and Tc is the average time the
channel is sensed busy by each node during a collision.
Other models on performance analysis of WLAN and WMAN can be found in
[15–17].
Since spectrum is a scarce and limited resource, multiple access schemes are
designed to share the resource among a large number of wireless users. There are
three popular multiple-access techniques for sharing the available bandwidth in a
wireless communication system:
• The frequency division multiple access (FDMA) serves users with different
frequency channels. Signals are transmitted in nonoverlapping frequency
bands that can be separated using bandpass filters.
• The time division multiple access (TDMA) serves users with different time slots.
Signals are transmitted in nonoverlapping time slots in a round-robin fashion.
In each slot only one user is allowed to either transmit or receive.
240 9 Wireless Networks
Guard Time
a b
User 1
Guard Band
Frequency Frequency
User 2
User 1 User 2 User 3
Guard Band
User 3
Time Time
FDMA TDMA
c
User User User
1 2 3
Frequency
Time
CDMA (FH)
• The code division multiple access (CDMA) serves users with different code
sequences. Different users employ signals that have small cross-correlation.
The three access methods are portrayed in Fig. 9.4. In addition to FDMA,
TDMA, and CDMA, there are other two multiple access schemes—polarization
division multiple access (PDMA) which serves users with different polarization and
space division multiple access (SDMA) which controls the radiated energy for users
in space by using spot beam antenna [18].
FDMA requires that the total bandwidth be divided into a number of disjoint
frequency subchannels. Each subchannel is assigned on demand to individual
users who request service. As shown in Fig. 9.4, guard bands are maintained
9.3 Multiple Access Techniques 241
between adjacent spectra to minimize cross talk between channels. The present FM
radio subdivides the spectrum into 30-kHz channels so that each channel is assigned
to one user. In FDMA, the 30-kHz channel can be split into three 10-kHz channels.
This band-splitting, however, incurs costs. For reasons of spectral efficiency, the
transmission rate on a single FDMA channel is usually close to the maximum rate
required by the user. Consequently, FDMA is suitable for users with nonbursty and
predictable traffic. Cellular networks do not use FDMA by itself anymore. That
passed with first generation networks. TDMA, at least in cellular, is used with
FDMA. TDMA and CDMA can support more users in the space spectrum region.
The GSM air interface uses a mixture of FDMA and TDMA.
TDMA is a channelization scheme that triples the capacity of the available
channels without requiring additional RF spectrum. A frame consists of a number
of time intervals called slots. As shown in Fig. 9.5, each TDMA frame consists of a
preamble, information message, and trail bits. The preamble has the address and
synchronization information that both the base station and the subscribers will use to
identify each other. Guard times are used between slots to minimize cross talk. One
downside of TDMA is that the high rate switching/multiplexing of the time-domain
transmission signals places stringent requirements on the analog components follow-
ing the modulator.
CDMA is a spread spectrum technique in which the narrowband signal from
each user is spread out in frequency using a unique spreading code. Several signals
may occupy the same frequency band and still be individually recovered by the
receiver with the knowledge of the spreading code. Each user operates indepen-
dently of other users. Each user is assigned a unique code sequence that he uses to
encode his information signal. The receiver, fully aware of the code sequence of the
user, decodes the received signal after reception and recovers the original data.
In this section, we develop some analytical models to provide insights into the
characteristics of FDMA and TDMA systems [19]. Suppose N users, each with
infinite buffer size, transmit packets of constant length L bits. The packet arriving
242 9 Wireless Networks
.
.
.
λ R/N
rate is λ packets/s. For TDMA, packets are transmitted using the full channel
bandwidth of NR bps, while FDMA systems transmit at R bps.
2
λE ðSÞ
2 λ L
R=N λN 2 L2
E ðW Þ ¼ ¼ ¼ 2 (9.16)
2ð1 ρÞ 2ð1 ρÞ 2R ð1 ρÞ
Eð D Þ ¼ Eð W Þ þ E S
λN 2 L2 NL (9.17)
¼ 2 þ
2R ð1 ρÞ R
λNL
ρ ¼ λEðSÞ ¼ <1 (9.18)
R
9.3.2.2 Time Division Multiple Access
The delay in TDMA comprises of two components: (a) waiting time for the start of
the time slot, (b) waiting time for packets that arrived earlier in the same queue to be
transmitted. Using the result of M/G/1 queue,
9.4 Cellular Communications 243
λE2 ðSÞ E S2
Eð W Þ ¼ þ
2ð1 ρÞ 2EðSÞ
0 12 0 12
L A @ L A
λ@
R=N R=N
¼ þ 0 1 (9.19)
2ð 1 ρÞ
L
2@ A
R=N
λN 2 L2 NL
¼ þ
2R2 ð1 ρÞ 2R
The second term represents the fact that on the average, an arriving packet has to
wait half the frame length (NL/R) before it is transmitted in its own time slot. The
overall delay is
L
Eð D Þ ¼ Eð W Þ þ
R
(9.20)
λN 2 L2 NL L
¼ þ þ
2R2 ð1 ρÞ 2R R
Note that
NL
EðW ÞTDMA ¼ EðW ÞFDMA þ > EðW ÞFDMA (9.21)
2R
L NL
EðDÞTDMA ¼ EðDÞFDMA þ (9.22)
R 2R
i.e.
NL L
EðDÞFDMA > EðDÞTDMA ! >0!N>2 (9.23)
2R R
This indicates that in terms of performance TDMA is superior to FDMA because
the packet delay in FDMA is typically larger than TDMA. For three or more users,
the overall delay in FDMA is greater than TDMA.
Perhaps no single development has done more for wireless technologies than has
cellular communications. It is one of the fastest growing and most demanding
telecommunication applications. It has been predicted that cellular will be the
universal method of personal communication.
244 9 Wireless Networks
6 3
1,13,20 3,10,17
6 3 4 1 5
6,13,20 3,10,17 4,11,18 1,8,15 5,12,19
4 1 5 2 7 6 3
4,11,18 1,8,15 5,12,19 2,12,19 7,14,21 6,13,20 3,10,17
2 7 6 3 4 1 5
2,12,19 7,14,21 6,13,20 3,10,17 4,11,18 1,8,15 5,12,19
6 3 4 1 5 2 7
6,13,20 3,10,17 4,11,18 1,8,15 5,12,19 2,12,19 7,14,21
4 1 5 2 7 6 3
4,11,18 1,8,15 5,12,19 2,12,19 7,14,21 6,13,20 3,10,17
2 7 6 3 4 1 5
2,12,19 7,14,21 6,13,20 3,10,17 4,11,18 1,8,15 5,12,19
4 1 5 2 7
4,11,18 1,8,15 5,12,19 2,12,19 7,14,21
2 7
2,12,19 7,14,21
systems, the base station communicates with mobiles via a channel. The channel is
made of two frequencies: the forward link for transmitting information to the base
station and the reverse link to receive from the base station.
Besides the idea of cells, the essential principles of cellular systems include cell
splitting, frequency reuse, hand-off, capacity, spectral efficiency, mobility, and
roaming [1, 20].
• Cell splitting: As a service area becomes full of users, the area is split into small
ones. Consequently, urban regions with heavy traffic can be split into as many
areas as necessary to provide acceptable service, while a large cell can be used to
cover remote rural regions. Cell splitting increases the capacity of the system.
• Frequency reuse: This is the core concept that defines the cellular system. The
cellular-telephone industry is faced with a dilemma: services are growing
rapidly and users are demanding more sophisticated call-handling features, but
the amount of the electromagnetic spectrum allocation for cellular service is
fixed. This dilemma is overcome by the ability to reuse the same frequency
(channel) many times. Several frequency reuse patterns are in use. A typical
example is shown in Fig. 9.8, where all available channels are divided into
246 9 Wireless Networks
There are two common performance indices used in designing cellular systems
[21, 22]. The first index is the call blocking probability, which is the probability that
a new, originating call is denied due to the unavailability of free channels. The
second index is the call dropping probability of hand-off call, which is the proba-
bility that an ongoing call is ended while a hand-off attempt is being made, again
due to the unavailability of free channels. These two metrics are used with different
traffic load to show the performance of a proposed system. A major goal is to keep
these probabilities as low as possible by effectively utilizing the bandwidth.
To determine the two metrics, let λi be the hand-off request rate for traffic
type i ∈ {0,1, ,n}, which follows a Poisson process and 1/μi be the mean
holding time of a channel for traffic type i within an exponential distribution.
When j channels are busy, handoff calls depart at rate jμi. When the number of
requested channels reaches the total number of available channels si, i.e. j ¼ si,
then all channels are in use and the channel exchange rate is siμi. In this case, any
new arriving hand-off call is blocked.
Let Pj be the probability that j channels exchanges are requested for traffic type i.
Then P0 is the probability that no channel exchange is requested for traffic
type i. The balance equations are [23]:
λi P0 ¼ μi PI for j ¼ 0
(9.26)
λi Pj1 ¼ jμi Pj for 0 < j < si
P1 ¼ ρ 1 P 0
ρ Pj1 ρji P0 (9.27)
Pj ¼ i ¼
j j!
where ρi ¼ μλi is the offered load. Since the sum of the probabilities must be 1,
i
1
P0 ¼ (9.28)
X
si
ρji
j¼0
j!
248 9 Wireless Networks
ρji
Pj ¼ (9.29)
Xsi
ρji
j!
j¼0
j!
When j ¼ si, all the available channels are busy and any handoff call gets blocked.
Thus, the handoff dropping probability is given by
ρsi i
Psi ¼ (9.30)
Xsi
ρji
si !
j¼0
j!
It is evident from Eq. (9.30) that the dropping probability Psi is directly
proportional to the mean channel exchange time. Also, the dropping probability
decreases when the number of available channels increases. This means that the
more bandwidth is available in a cell, the less chance a handoff call is blocked.
9.5 Summary
1. The ALOHA systems are random time-division multiple access systems. They
are used as a basis of comparing various random access methods. It is found that
slotted ALOHA performs better than pure ALOHA
2. Wireless LAN allows laptop PC and LAN users to link through radio waves or
infrared links, eliminating the need for restrictive cables and opening a wider
range of possible applications.
3. The IEEE 802.16 standard addresses the “first-mile/last-mile” connection in
wireless MANs. Such wireless MANs allow thousands of users share capacity
for data, voice, and video.
4. Multiple access techniques include TDMA, FDMA, and CDMA. In TDMA
protocol, the transmission time is divided into frames and each user is assigned
a fixed part of each frame, not overlapping with parts assigned to other users. In
FDMA protocol, the channel bandwidth is divided into nonoverlapping fre-
quency bands and each user is assigned a fixed band. CDMA protocols constitute
a class of protocols in which multiple-access capability is primarily achieved by
means of coding.
5. Cellular systems operate on the principles of cell, frequency reuse, and hand-off.
References 249
Problems
9.1 Show that the maximum value of the throughput is 0.184 for pure ALOHA
and 0.368 for slotted ALOHA.
9.2 A computer network uses a pure ALOHA access method. Let the channel bit
rate be 100 kbps and packet length be 20 bytes. If each node generates
20 packets/min on the average, how many stations can the network support?
9.3 A random access network uses the ALOHA access scheme. It consists of two
stations which are 800 m apart. Assume each station generates frames at an
average rate of 600 packets/s and that the data rate is 2 Mbps. Let the packet
length be 12 bytes and the propagation velocity be 2 108 m/s. (a) Calculate
the probability of collision for pure ALOHA protocol. (b) Repeat for slotted
ALOHA.
9.4 Compare and contrast CSMA/CD and CSMA/CA.
9.5 Compare and contrast RF LAN and IR LAN.
9.6 Consider a system with ten stations and deterministic values of walking
times with R ¼ 0:4μs . Assume message lengths are exponentially
distributed with mean message length of 1,000 bits and gated service. Plot
the mean message delay as a function of the total traffic load ρ ¼ λt ¼ 0:1,
0:2, . . . 0:8. Take the bit rate to be 1 Mbps.
9.7 Repeat the previous problem for exhaustive service.
9.8 Describe the requirements for the PHY, MAC, and DLC layers of a wireless
ATM network.
9.9 Describe FDMA and CDMA.
9.10 An FDMA system has the following parameters:
λ/station ¼ 100 bps
R ¼ 106 bps
N ¼ 50
L ¼ 1,000 bits
Plot the mean delay versus offered load ρ.
References
1. M. N. O. Sadiku, Optical and Wireless Communications. Boca Raton: CRC Press, 2002.
2. N. Abramson, “Development of the ALOHANET,” IEEE Transactions on Information
Theory, vol. 31, no. 2, March 1985, pp. 119-123.
3. A. Kumar et al., Wireless Networking. New York: Morgan Kaufman Publishers, 2008,
pp. 194, 195.
4. G. Keiser, Local Area Networks. New York: McGraw-Hill, 2nd ed., 2002, pp.108-112.
5. P. T. Davis and C. R. McGuffin, Wireless Local Area Networks. New York: McGraw-Hill,
1995, pp. 41-117.
6. N. J. Muller, Mobile Telecommunications Factbook. New York: McGraw-Hill, 1998,
pp. 219-270.
250 9 Wireless Networks
In 1993, it was found out that there are modeling problems with using Markovian
statistics to describe data traffic. A series of experiments on Ethernet traffic
revealed that the traffic behavior was fractal-like in nature and exhibit self-
similarity, i.e. the statistical behavior was similar across many different time scales
(seconds, hours, etc.) [1, 3]. Also, several research studies on traffic on wireless
networks revealed that the existence of self-similar or fractal properties at a range of
time scale from seconds to weeks. This scale-invariant property of data or video
traffic means that the traditional Markovian traffic models used in most perfor-
mance studies do not capture the fratal nature of computer network traffic. This has
implications in buffer and network design. For example, the buffer requirements in
multiplexers and switches will be incorrectly predicted. Thus, self-similar models,
which can capture burstiness (see Fig. 10.1) over several time scales, may be more
appropriate.
In fact, it has been suggested that many theoretical models based on Markovian
statistics should be reevaluated under self-similar traffic before practical implemen-
tation potentially show their faults.
Self-similarity is the property of an object which “looks the same” when viewed at
different scales [4].
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 251
DOI 10.1007/978-3-319-01646-7_10, © Springer International Publishing Switzerland 2013
252 10 Self-Similarity of Network Traffic
out the object has a similar (sometimes exact) appearance. For example, if an object
is self-similar or fractal, its parts, when magnified resemble the shape of the whole.
This idea is easily illustrated using the Sierpinski triangle (also known as Sierpinski
gasket named after the Polish mathematician) shown in Fig. 10.2. The triangle S
consists of three self-similar copies of itself, each with magnification of 2. We can
look further and find more copies of S. The triangle S also consists of nine self-
similar copies of itself, each with magnification of 4. Or we may cut S into 27 self-
similar pieces, each with magnification factor 8. This kind of self-similarity at all
scales is a hallmark of the images known as fractals.
Another example is the well known Koch snowflake curve shown in Fig. 10.3.
As one successively zooms in the resulting shape is exactly the same no matter how
far in the zoom is applied. A far more common type of self similarity is an
approximate one, i.e. as one looks at the object at different scales one sees structures
that are recognizably similar but not exactly so.
This chapter attempts to account for the self-similar traffic. We begin by first
introducing the mathematics of self-similar process. We then present Pareto distri-
bution as a typical example of a heavy-tailed distribution. We investigate the
behavior of single queueing system with interarrival times having a large variance.
We finally consider wireless networks with self-similar input traffic.
10.1 Self-Similar Processes 253
E½XðatÞ
1: E½XðtÞ ¼ ðmeanÞ (10.1)
aH
Var½XðatÞ
2: Var½XðtÞ ¼ ðvarianceÞ (10.2)
a2H
RX ðat; asÞ
3: RX ðt; sÞ ¼ ðautocorrelationÞ (10.3)
a2H
The Brownian motion process and fractional Brownian motion process satisfy
our definition of self-similarity. The fractional Brownian motion (FBM) is a
continuous, zero mean, Gaussian process with parameter H, 0 < H < 1. FBM
reduces to Brownian motion when H ¼ 0.5.
A discrete-time definition of self-similarity may be given as follows. Let
X ¼ (Xt : t ¼ 0, 1, 2, ) be a covariance stationary (also called wide-sense sta-
tionary) stochastic process—a process with a constant mean μ ¼ E[Xt], finite
variance σ 2 ¼ E[(Xt μ)2], and autocorrelation function
where 0 < β < 1, the symbol means “behaves asymptotically as,” and L(t) is
“slowly varying” at infinity, i.e.
LðtxÞ
lim ¼1 (10.7)
t!1 LðtÞ
H ¼ 1 β=2 (10.8)
There are two important characteristics of self-similar processes [6–10]. The first
feature has to do with the their long-range dependence (LRD), i.e. their autocorre-
lation function decays hyperbolically (less than exponentially fast). Equation
(10.5a) implies this. In spite of the serious effects of this characteristic on queueing
behavior, it cannot be accounted for in Markovian traffic models. For short range
dependent (SRD) processes, such as the traditional traffic models, their functions
show a fast exponential decay. The two concepts of self-similarity and long-range
dependence are often used interchangeably to mean the same thing.
The second feature of self-similar process is the slowly decaying variance
(SDV). The variance of the sample mean decays more slowing than the reciprocal
of the sample size:
h i
Var XðmÞ a1 mβ , m ! 1 (10.9)
a1 is a positive constant and H ¼ 1 β/2. This result indicates that the process
has infinite variance. However, this result differs from traditional Markovian
models where the variance is given by
h i
Var XðmÞ a1 m1 (10.10)
1
Prob½X > x ¼ 1 FðxÞ (10.11)
xα
256 10 Self-Similarity of Network Traffic
where 1 < α < 2. One of the distributions that are heavy-tailed is the Pareto
distribution, which is defined as
α
δ
Prob½X > x ¼ (10.12)
x
where δ is a parameter which indicates the minimum value that the distribution can
take, i.e. x δ and α is the shape parameter (1 α 2), which describes the
intensity of self-similarity. α also determines the mean and variance of X. Thus, the
cumulative distribution function is
α
δ
Fð x Þ ¼ 1 (10.13a)
x
so that the mean number of arrivals in any batch is 2. Calculate the probability of
having more than x arrivals in any time slot if the batch size is: (a) exponentially
distributed, (b) Pareto-distributed.
Solution
(a) Prob½batch size > x ¼ ex=2
10.3 Generating and Testing Self-Similar Traffic 257
so that
E½ X
α¼ ¼2
E½ X 1
Thus,
2
1
Prob½batch size > x ¼
x
For the two distributions, the probability is of the same order of magnitude. This
indicates that for a batch size of greater than 10 arrivals, there is not much
difference between the two distributions. However, there would be significant
difference is we try more than 100 arrivals. For exponential case,
This algorithm is used for generating Fractional Brownian Motion (FBM) with
Hurst parameter H ∈ (0.5,1) in a given time interval. If the trajectory of FBM
Z(t) is to be computed in the interval [0,T], we start by setting Z(0) ¼ 0 and
Z(T) from a Gaussian distribution with mean 0 and variance T2H. Next Z(T/2) is
calculated as the average of Z(0) and Z(T) plus an offset δ1, i.e.
1
Z ðT=2Þ ¼ ½Zð0Þ þ ZðT Þ þ δ1 (10.15)
2
where δ1 is a Gaussian random variable with zero mean and a standard deviation
given by T2H times the initial scaling factor s1, i.e.
T 2H pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ffi
Δ1 ¼ T 2H :s1 ¼ H
1 22H2 (10.16)
2
The two intervals from 0 to T/2 and from T/2 to T are further subdivided and
we reduce the scaling factor by 21H and so on. At the nth stage, a random Gaussian
variable δn is added to the midpoint of the stage n 1 with a variance.
T 2H pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ffi
Δn ¼ n H
1 22H2 (10.17)
ð2 Þ
Once a given point has been determined, its value remains unchanged in all later
stages. As H goes to 1, Δn goes to 0 and Z(t) remains a collection of smooth line
segment connecting the starting points.
This traffic model is aggregated by multiple single ON/OFF traffic source. In other
words, traffic is generated by a large number of independent ON/OFF sources such
as workstations in a large computer network. An ON/OFF source is a burst traffic
source which alternates active (ON) with silent (OFF) periods. During an active
period (that is, a burst), data is generated at a fixed peak rate, while during silent
periods no data is generated. Every individual ON/OFF source generates an
ON/OFF process consisting of alternating ON- and OFF-periods. The lengths of
the ON-periods are identically distributed and so are the lengths of OFF-periods.
The ON/OFF source model with the “heavy-tailed” (Pareto-like) distribution
reproduces the self-similar traffic. In other words, the superposition of many
independent and identically distributed (i.i.d.) ON/OFF sources results in self-
similar aggregate traffic.
10.3 Generating and Testing Self-Similar Traffic 259
Suppose there are N traffic sources, let the ON time of the ith traffic by τ(i) and
OFF time be θ(i). The random variables τ(i) and θ(i) are i.i.d.; they satisfy
where X is the length of the ON or OFF period. Since Pareto distribution is the
simplest example of a heavy-tailed distribution, we may say that X follows Pareto
distribution with finite mean and infinite variance.
There are several statistical methods that can be used for testing the time scale of
self-similarity in traffic generation. These methods are used in the estimation of the
Hurst parameter. They include R-S (Rescaled adjusted Range statistic) analysis and
Variance-Time analysis.
Variance-Time Analysis
The method applies the following fact. The process X is said to be exactly second-
order self-similar with Hurst parameter
β
H ¼1 ð 0 < β < 2Þ (10.19)
2
if, for any m ¼ 1, 2, 3, . . .,
Var XðmÞ / mβ (10.20)
We take advantage of this equation. Taking the logarithm of both sides results in
h i
log Var XðmÞ ¼ c1 βlogðmÞ (10.21)
for some constant c1. Plotting log[Var(X(m))] versus log(m) (i.e. a log-log graph) for
many values of m of a self-similar process will result in a linear series of points with
slope β or 2H 2. This plot is known as a variance-time plot.
R-S Analysis
X
m
W0, Wm ¼ Xi mX ðmÞ, m ¼ 1, 2, 3, . . . , M (10.22)
i¼1
260 10 Self-Similarity of Network Traffic
The ratio R(M)/S(M) is called the rescaled adjusted range or R/S statistic. The
log of R/S statistics (for several values of M) plotted against log(M) will have an
asymptotic slope, which is the approximation of H.
rλðrλtÞr1 rλt
f X ðt Þ ¼ e , λ, t > 0, 0 < r < 1 (10.24)
Γ ðr Þ
Packet interarrival times which have a Gamma distribution with a specific range
of parameter values give large values of variances. The service time is assumed to
be exponentially distributed with parameter μ. The results of the G/M/1 queue can
be readily used. Let pn be the probability that k packets are in the queue at the
arrival moment. Then
pn ¼ ð1 σ Þσ k (10.25)
σ ¼ FX ðμ μσ Þ, 0<σ<1 (10.26)
ð
1 r
st rλ
F X ðsÞ ¼ f X ðtÞe dt ¼ (10.27)
s þ rλ
0
If Wq is the random variable which denotes the waiting time of a packet in the
queue, the mean and variance of Wq are respectively
10.4 Single Queue 261
σ
E Wq ¼ (10.28)
μ ð1 σ Þ
1 ð1 σ Þ2
Var W q ¼ σ 2W q ¼ (10.29)
μ2 ð1 σ Þ2
rρ
z¼ (10.32)
1 σ þ rρ
then
rρ
σ ¼ 1 þ rρ (10.33)
z
From Eqs. (10.31) to (10.33), we obtain
rρ zrþ1
z¼ þ (10.34)
ð1 þ rρÞ ð1 þ rρÞ
X1
ξn Γðnr þ n þ 1Þ nrþ1
z¼ a (10.36)
n¼0
n!Γðnr þ 2Þ
X
1
z¼ dn (10.37)
n¼0
where
ξn Γðnr þ n þ 1Þ nrþ1
dn ¼ a (10.38)
n! Γðnr þ 2Þ
d0 ¼ a
d 1 ¼ ξar d 0 (10.39)
d2 ¼ ξar ðr þ 1Þd1
dn ¼ bn dn1 , n3
where
Y
n2
ðnr þ k þ 1Þ
bn ¼ ξar ðr þ 1Þ , n3 (10.40)
k¼1
ðnr r þ k þ 1Þ
Although self-similarity was originally found for Ethernet traffic [1, 2, 18], research
has shown that the same holds for wireless networks [19]. This implies that
simulating a wireless network with Poisson distributed input traffic will give
wrong results.
A logistic function or logistic curve can be described by the following differen-
tial equation.
Problems 263
dP P
¼ rP 1 (10.41)
dt K
dx
¼ rxð1 xÞ (10.42)
dt
Logistic map is a discrete representation of Eq. (10.42) and is written as
recurrence relation as follows:
This equation has been used to obtain self-similar time sequence which could be
used for traffic generation for wireless network systems [19]. Values of r in the
range 3.50 < r < 3.88 and 0 < x0 < 0.5 have been used.
10.6 Summary
1. Studies of both Ethernet traffic and variable bit rate (VBR) video have
demonstrated that these traffics exhibit self-similarity. A self-similar phenome-
non displays the same or similar statistical properties when viewed at different
times scales.
2. Pareto distribution is a heavy-tailed distribution with infinite variance and is
used in modeling self-similar traffic.
3. The most common method of generating self-similar traffic is to simulate several
sources that generate constant traffic and then multiplex then with ON/OFF
method using heavy-tailed distribution such as Pareto.
4. We analytically modeled the performance of a single server queue with almost
self-similar input traffic and exponentially distributed service times.
5. Logistic map for self-similar traffic generation is used for wireless network.
6. OPNET can be used to simulate the network traffic’s self-similarity [20].
Problems
References
1. W. E. Leland et al., “On the self-similar nature of Ethernet traffic,” Computer Communications
Review, vol. 23, Oct. 1993, pp. 183-193.
2. –, “On the self-similar nature of Ethernet traffic (extended version),” IEEE/ACM Transactions
on Networking, vol. 5, no. 6, Dec. 1997, pp. 835-846.
3. M. E. Crovella and A. Bestavros, “Self-similarity in World Wide Web traffic: Evidence and
possible causes,” IEEE/ACM Transactions on Networking, vol. 5, no. 6, Dec. 1997,
pp. 835-846.
4. C. D. Cairano-Gilfedder and R. G. Cleggg, “A decade of internet research—advances in
models and practices,” BT Technology Journal, vol. 23, no. 4, Oct. 2005, pp. 115-128.
5. B. Tsybakov and N. D. Georganas, “On self-similar traffic in ATM queues: definitions,
overflow probability bound, and cell delay distribution,” IEEE/ACM Transactions on
Networking, vol. 5, no. 3, June 1997, pp. 397-409.
6. W. Stallings, High-Speed Networks and Internets: Performance and Quality of Service. Upper
Saddle, NJ: Prentice Hall, 2nd ed., 2002, pp. 219-247.
7. W. Jiangto and Y. Geng, “An intelligent method for real-time detection of DDOS attack based
on fuzzy logic,” Journal of Electronics (China), vol. 25, no. 4, July 2008, pp. 511-518.
8. D. Kouvatsos (ed.), Performance Evaluation and Applications of ATM Networks. Boston, MA:
Kluwer Academic Publishers, 2000, pp. 355-386.
9. A. Ost, Performance of Communication Systems. New York: Springer Verlag, 2001,
pp. 171-177.
10. K. Park and W. Willinger (eds.), Self-similar Network Traffic and Performance Evaluation.
New York: John Wiley & Sons, 2000.
11. J.M. Pitts and J. A. Schormans, Introduction to IP and ATM Design and Performance.
Chichester, UK: John Wiley & Sons, 2000, pp. 287-298.
12. Z. Harpantidou and M. Paterakis, “Random multiple access of broadcast channels with Pareto
distributed packet interarrival times,” IEEE Personal Communications, vol. 5, no. 2, April
1998, pp. 48-55.
13. Z. Hadzi-Velkov and L. Gavrilovska, “Performance of the IEEE 802.11 wireless LANs under
influence of hidden terminals and Pareto distributed packet traffic,” Proceedings of IEEE
International Conference on Personal Wireless Communication, 1999, pp. 221-225.
14. W. Willinger et al., “Self-similarity through high-variability: statistical analysis of Ethernet
LAN traffic at the source level,” IEEE/ACM Transactions on Networking, vol. 5, no. 1, 1997,
pp. 71-86.
15. A. R. Prasad, B. Stavrov, and F. C. Schoute, “Generation and testing of self-similar traffic in
ATM networks,” IEEE International Conference on Personal Wireless Communications,
1996, pp. 200-205.
16. N. Bhatnagar, “Model of a queue with almost self-similar or fractal-like traffic,” Proc. IEEE
GLOBECOM ‘97, 1997, pp. 1424-1428.
17. E. Y. Peterson and P. M. Ulanov, “Methods for simulation of self-similar traffic in computer
networks,” Automatic Control and Computer Science, vol. 36, no. 6, 2002, pp. 62-69.
18. M. S. Taqqu, “The modeling of Ethernet data and of signals that are heavy-tailed with infinite
variance.” Scandinavian Journal of Statistics, vol. 29, 2002, pp. 273-295.
References 265
19. R. Yeryomin and E. Petersons, “Generating self-similar traffic for wireless network
simulation,” Proc. of Baltic Congress of Future Internet and Communications, 2011,
pp. 218-220.
20. Y. Fei et al., “An intrusion alarming system based on self-similarity of network traffic,” Wuhan
University Journal of Natural Sciences (WUJNS), vol. 10, no. 1, 2005, pp. 169-173.
Appendix A: Derivation for M/G/1 Queue
ð
1 ð
1
ðλtÞk λt
pk ¼ pðkÞdH ðtÞ ¼ e dH ðtÞ (A.1)
k!
0 0
It can be shown using the theorem of total probability and the equilibrium
imbedded-Markov-chain that
X
jþ1
Πj ¼ pj Π0 þ pjiþ1 Πi , j ¼ 0, 1, 2, (A.3)
i¼1
X
1
gð z Þ ¼ Πj zj (A.4a)
j¼0
X
1
hð z Þ ¼ pj z j (A.4b)
j¼0
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 267
DOI 10.1007/978-3-319-01646-7, © Springer International Publishing Switzerland 2013
268 Appendix A: Derivation for M/G/1 Queue
ðz 1ÞhðzÞ
gð z Þ ¼ Π0 (A.5)
z hð z Þ
X
1
Πj ¼ 1 (A.6)
j¼0
Π0 ¼ 1 ρ (A.7)
ð
1
and substitution of (Eq. A.7) and (Eq. A.9) into (Eq. A.5) leads to
ðz 1Þηðλ λzÞ
gðzÞ ¼ ð 1 ρÞ (A.10)
z ηðλ λzÞ
The mean values of the number of customers in the system and queue are
respectively given by
X
1
0
Eð N Þ ¼ jΠj ¼ g ð1Þ (A.12a)
j¼0
X
n
n
i ¼ ð n þ 1Þ
i¼1
2
X
n
n
i2 ¼ ðn þ 1Þð2n þ 1Þ
i¼1
6
" #2
X
n X
n
n2
i ¼ 3
i ¼ ðn þ 1Þ2
i¼1 i¼1
4
X
1
1
xn ¼ , jxj < 1
n¼1
1x
X
1
xk
xn ¼ , jxj < 1
n¼k
1x
X
k
x xkþ1
xn ¼ , x 6¼ 1
n¼1
1x
X
k
1 xkþ1
xn ¼ , x 6¼ 1
n¼0
1x
X
1
x
nxn ¼ , jxj < 1
n¼1 ð1 xÞ2
X
k
1 xk kxk ð1 xÞ
nx ¼ x
n
, x 6¼ 1
n¼1 ð1 xÞ2
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 271
DOI 10.1007/978-3-319-01646-7, © Springer International Publishing Switzerland 2013
272 Appendix B: Useful Formulas
X
1
x ð1 þ x Þ
n2 x n ¼ , jxj < 1
n¼1 ð1 xÞ3
X
1
2x
nðn þ 1Þxn ¼ , jxj < 1
n¼1 ð1 x Þ3
X1
ðn þ kÞ! n k!
x ¼ , jxj < 1, k 0
n¼0
n! ð1 xÞkþ1
X1
xn
¼ ex , 1<x<1
n¼0
n!
X
1
xn ex 1
¼ , 1<x<1
n¼0
ðn þ 1Þ! x
X1
xn 1
¼ ln , jxj < 1
n¼1
n 1x
X1
xð2n1Þ ex ex
¼ , 1<x<1
n¼1
ð2n 1Þ! 2
1
X x N
Nþn1
xn ¼ , jxj < 1
n¼0
n x1
n
X n
xk ¼ ð1 þ x Þn
k¼1
k
Bibliography
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 273
DOI 10.1007/978-3-319-01646-7, © Springer International Publishing Switzerland 2013
274 Bibliography
22. L. Kleinrock, Queueing Systems. New York: John Wiley, 1975, vol. I.
23. S. S. Lavenberg (ed.), Computer Performance Modeling Handbook. New York: Academic
Press, 1983.
24. D. Maki and M. Thompson, Mathematical modeling and Computer Simulation. Belmont, CA:
Thomson Brooks/Cole, 2006, pp. 153-211.
25. J. Medhi, Stochastic Models in Queueing Theory. San Diego, CA: Academic Press, 1991.
26. M. K. Molloy, Fundamentals of Performance Modeling. New York: MacMillan, 1989.
27. R. Nelson, Probability, Stochastic Processes, and Queueing Theory. New York: Springer-
Verlag, 1995.
28. M. S. Obaidat and N. A. Boudriga, Fundamentals of Performance Evaluation of Computer and
Telecommunication Systems. Hoboken, NJ: John Wiley & Sons, 2010.
29. T. G. Robertazzi, Computer Networks and Systems: Queueing Theory and Performance
Evaluation. New York: Springer-Verlag, 1990.
30. S.M. Ross, Simulation. San Diego, CA: Academic Press, 3rd ed., 2002.
31. M. N. O. Sadiku and M. Ilyas, Simulation of Local Area Networks. Boca Raton, FL: CRC
Press, 1995.
32. M. Schartz, Telecommunication Networks. Reading, MA: Addison-Wesley, 1987.
Index
M.N.O. Sadiku and S.M. Musa, Performance Analysis of Computer Networks, 275
DOI 10.1007/978-3-319-01646-7, © Springer International Publishing Switzerland 2013
276 Index