University of California, San Diego
Department of Computer Science and Engineering
CSE 123A -- Computer Networks -- Winter 1996
Solutions to Homework by James Han
A graduate student wrote and subsequently ran a simulation program of a complex multiprocessor system. The simulation program produced the following results: (i) the average number of jobs in the system was equal to 12.3, (ii) the average arrival rate was equal to 15.6 jobs per second, and (iii) the average delay for a job was equal to 2.3 seconds. The student presents the results to the advisor who is skeptical; why? If you were the advisor, what question would you ask the student in order to confirm your suspicion of an error?
The advisor is skeptical due to Little's Law:
, for
any queuing system with a mean arrival rate of
customers per unit
time in equilibrium, where N is the mean number of customers in the system
at any given time
and T is the mean delay for any customer. A simple multiplication shows
that this equation does not hold for the above numbers. This result is much
more general than the M/M/1 systems that we have examined; it does not assume
any specific distributions of either interarrival or service times. However,
it assumes that the system is in equilibrium, or in steady-state. This
would mean that the system has stabilized at some average rates that will not
change over time; if the system is at a steady-state, our measurements will
make the equality above hold. Thus, the only possible explanation for these
measurements is that the system is not yet in steady state; else, the
measurements are erroneous. A question that would determine which of these
two cases holds, would be: Were these measurements taken while the system
was in equilibrium? A positive answer indicates an error in the measurements,
while a negative answer means that the measurements are useless; they cannot be
used to predict the future behavior of the system. Note that a system may
never reach equilibrium; a queue for example may grow indefinitely. In this
case, average measurements have no meaning at all.
Since transmission of one frame per frame time is guaranteed, there is no need to backoff. It's always better to send packets as soon as possible for maximum throughput. (One problem with this is starvation. Stations farther out from the central cite may never get a chance to transmit.)
Stuff a zero into the bit string after each five consecutive ones. Then
the output string is
01111011111001111101111101101101111100.
?
Given
,
and the degree of
r=5, we
append r zero bits to the low order of the frame
, which results
in
. Then the checksummed frame is obtained by

The output frame to be transmitted,
is 111010000110010.
Note that the subtraction using modulo 2 is the same as addition.
(packets/sec) and
the service times of packets through the first choice queue for this traffic
stream are assumed to be exponentially distributed with parameter
(packets/sec).
To begin, note that even though we could come up with a model that describes
all possible states in the system, we are concerned only with events relating
to the first choice queue. Looking at the description we can see that
essentially the first choice queue
behaves as if it has no space for
queueing packets; it can only hold the packet that is transmitted at any time.
The only events that change the state of this queue are packet arrivals
when
is empty, which make
full, so all new arrivals will use
the second choice queue
, and packet departures from
, which
make it again ready to send one packet. It is important to note that we do
not care what happens at
; it may grow without bound for all we know.
It is enough to model the behavior of
for our problem, so our state
model will show only states
(empty) and
(full, a packet is being
transmitted). This model is shown in Figure
.
Figure 1: State model for Exercise 5
The events that relate to
are arrivals when the queue is
either empty or full, and departures from
when it is full (note that
we do not care about departures from
at all; also, when
is empty
there can be no departures from it). The transition rates (shown near the
arrows denoting the transitions) can be calculated by using the arrival
rate for
, which is just
, the total arrival rate, since all new
packets consider
first, and the service rate
for
. Denoting the
probability that the system is in
as
and in
as
, the
transition rates are as shown in the figure: if a packet arrives when we are at
(
empty), we move to
(
full); when
is full, if
packets arrive we remain at
, while if a packet leaves
(the rate
for this is
), we move back to
. The transition rates are computed
by multiplying the rates at which these events happen by the probability that
the system is in a given state.
What we want is
: the probability that the system is at
at any
given time, or, equivalently, that a packet arriving to the system will find
empty and use it.
Another way to see this is that the number of packets per unit of time
making the transition from
to
(i.e., using the first queue)
is
, while the total number of packets per unit of time is
and thus the ratio is
.
The equations describing this system are:

The first is a balance equation for the system and the second one arises from
the fact that the system must be in one of these two states. Note that we can
assume that
is in equilibrium since a queue cannot build up; all the
overflowing packets are directed to
, for which we do not care. Also,
the loop on
(a packet arrives when
is full), shows up in both
sides of the first equation, since it gets out of and back into
. Solving
the first one for
and substituting into the second, we have that

which is what we are looking for.
Figure 2: Function plot for Exercise 5
.
We already saw that since the first choice queue does not build up, it is
always in steady state, regardless of arrival and service rates. Thus, the
usual constraint for M/M/1 models that
does not need to hold
here. The reason is that the traffic that
cannot handle goes
automatically to
. In Section A.2 in the text, we had to assume that
was less than one to guarantee that the mean number of customers in
the system would not grow without bounds; here this problem cannot arise by
definition. To plot the desired function, we just have to formulate the
that we found before as a function of
; this is just the first form that
we saw above

An approximation is shown in Figure 2, for values of
from 0 to 2. Remember
that
can be larger than one in this problem.
Let k be the number of nodes along the path, C be the transmission rate, p be the packet size in bits, d be the propagation delay along the path.
If each node transmits on a FCFS basis, then an incoming packet has
to wait for an average of
packet transmission times.
Thus, the total for the packet to go through the path is

Since an expedited packet will skip to the head of the queue, the packet
has to wait for an average of
packet transmission time. Thus

Figure 3: Queueing system for Exercise 7
,
. We can say that the
throughput is the effective output rate of a queueing system. This is
different from the service rate, which can be much larger than the throughput
for systems that do not have many customers. The assumption that the system is in
equilibrium, implies that each queue is in equilibrium, thus the throughput for
each queue is equal to the arrival rate for that queue. Examining the figure
we can see that the throughputs are given by the following system of equations:

The input rate for queue 1 is calculated by adding up all the smaller inputs: the output of queue 2 and the input to the system. Note that we must take the probabilities of a packet taking a specific route into account, by factoring them into the equations. By substituting the second equation in the first, we have:

For the last step to be permissible, the inequality
must
hold.
,
, and
.
As we said before, the system is in equilibrium when all queues are in equilibrium. This means that the service rate for each queue must be strictly greater than its throughput, which we fund in part (a) above. The conditions for equilibrium are then:

Solving these inequalities for
and
and
substituting the values
,
and
, we have

The necessary and sufficient condition for the system to be in equilibrium is shown as a shaded area in Figure 4.
Figure 4: Condition for the system to be in equilibrium (Exercise 7)
Assuming
,
, and
,find:
The average number of customers waiting or being served for each
queue,
,
. To find these, we can use Little's Law (remember that
each queue is in equilibrium by implication). The effective arrival rate for
each queue is just
and
, computed above, and the average time on
each queueing system is given by the general formula
. Substituting our values, we have:

Substituting the values
,
and
,
we have
and
.
and
and the average number of customers is the
sum of the customers in both queues; at any given time, the customers in the
system are at either of the two queues. Substituting the values for
and
and
that we found above, we have:
