2000: Homework 3 - Model answer

Notice! The role of this model answer is
instructional only. The answers might not cover everything in detail
that the questions asks. The answers give you the content of the
answer and idea what it should be. The things that are important in
the grading of the homework have been emphasized. If you think there is a
mistake in the model answer, please let the course
staff know!

1. Warm-up (4 points)

A 4 kbps channel has a propagation delay of 20 msec. With frames of what size can a Stop-and-Wait protocol achieve >50 % utilization rate?

Let's mark the number of bits in a frame with b, the transmission time with s
and the delay with v.

Then, the transmission of the frame and getting an acknowledgement will take
time t (neglecting the handling):

t = b/s + 2v

The time to transmit the payload is t2:

t2 = b/s

And the utilization rate therefore:

b/s
---------- .
b/s + 2v

In order to solve the number of bits in a frame, an inequality is formed:

Functionality: n frames can be sent before an acknowledgement must arrive

n = 2^3-1 = 7

Therefore the utilization rate will be

nb
--------- = 1.3%
vs+b+vs+b

Selective-repeat

Using selective-repeat, only half of the window size can be sent
before receiving an acknowledgement (why?).

n = 2^3/2

Therefore the utilization rate will be

nb
--------- = 0.7%
vs+b+vs+b

3. Effect of bit errors (6 points)

Assume that frames are being transmitted over a channel, in which the
probability for a frame to be lost or to be received erroneously is
p. Consider how the erroneous frames affect the result. How many
re-transmissions are needed on an average compared to the number of
transmitted frames using the following protocols?

In the assignment a ratio

re-transmissions
-----------------------
successful transmissions

is calculated.

Using this ratio, also

re-transmissions
-----------------------
all transmissions

can easily be calculated.

Stop-and-Wait

For each lost or broken frame another one will be sent.
Therefore, the expected number of retransmissions will be

p+p^2+p^3+... = p/(1-p)

where p is the probability of losing a frame.

Go-back-n

For each lost or broken frame the whole contents of the transmission
window will be sent.

Let's mark the number of frames transmitted before the error is noticed
with k.

Therefore we need to send k frames for each sent frame with probability p.
Each of these k frames can also be corrupted.

Let's assume the number of retransmissions is distributed binomially
i.e when n frames are sent, pn of them will be corrupted. Out of these
ppn will be further corrupted and so on.

Therefore the total number of retransmissions will be

np+np^2+np^3+... = n/(1-p)

For each corrupted frame, k frames needs to be transmitted, that is
nk/(1-p) frames.

So we have,

p(1/2k)+(p(1/2k))^2+(p(1/2k))^3+p(1/2k)^4+... = p(1/2)k/(1-p(1/2)k)

Selective repeat

The expected value will be the same as in a) (why?).

4. Windows in several layers (3 points)

The basic functionality is the same for both layers - contents of
a window will be sent in pieces of certain size (pipelining) and
acknowledgements will be expected.

On datalink layer the the transmission time is about constant whereas
on the transport layer the selected route, congestion and possible
duplicates affects the time elapsed. However, the transport layer
may be working on a reliable architecture that guarantees that the
packets are always delivered successfully.

What also affects the flow control is that you do not necessarily
know the capasity of the underlying network, which may become
a bottleneck. The windowing on the transport layer should adapt
to the restrictions of the network and the receiving party, depending
on which of them are lower.