Uploaded by Ranjit Jana

Tutorial8

advertisement
Lund University
ETSN01 Advanced Telecommunication
Tutorial 5 : Link layer
Author:
Antonio Franco
Course Teacher:
Emma Fitzgerald
April 10, 2014
Contents
I
II
Before you start
Exercises
3
3
1
3
2
3
3
3
4
4
III
Solutions
4
1
4
2
4
3
5
4
5
Part I
Before you start
This tutorial is given to prepare you to the exam. Since time is limited, it is
highly advised that you first try to solve the exercises (Part II) at home, then
have a look at the solutions (Part III), and, finally, ask questions during the
exercises sessions.
Part II
Exercises
1
A disadvantage of a broadcast network is the capacity wasted when multiple
hosts attempt to access the channel simultaneously. Consider the following
simplistic example, suppose time is divided into discrete slots with each of n
hosts attempting to access the channel with a probability p during each slot.
What fraction of slots will be wasted due to collisions?
2
Consider a link layer protocol which requires lost frames to be retransmitted.
The probability of a frame being lost is p. What is the expected number of
transmissions to successfully send a frame if acknowledgements are never lost?
3
Consider a wireless network where each node generates packets from a number of
independent sources where both the inter-packet spacing and the packet lengths
are negative exponentially distributed with a mean rate of λ and mean size
β=10000 bit. Each host has an infinite transmit buffer where packets are stored
while waiting for transmission on the wireless link. The data rate on the link C
= 100 Mbps.
a) If there are N identical nodes in the network, derive an expression for the
expected delay for a packet, from generation until it has been successfully
sent.
b) Calculate the delay when N = 10 and λ = 900 packets/s.
3
4
Two CSMA/CD stations are each trying to transmit long (multiframe) files.
After each frame is sent, they contend for the channel using the binary exponential backoff algorithm. What is the probability that the contention ends on
round k and what is the mean number of rounds per contention period?
Part III
Solutions
1
Distinguish between n + 2 possible events E[n].
• E[1] - E[n] = successful transmission by one of the n hosts (i.e. only one
host transmits in one slot and the others remain silent),
• E[n+1] = no host attempts transmission (i.e. zero hosts transmit in one
slot),
• E[n+2] = unsuccessful transmission (i.e. two or more hosts transmit in
the same slot);
we can write:
Pr{E[i]} = p · (1 − p)n−1 , i = 1, . . . , n
Pr{E[n + 1]} = (1 − p)n
n+2
X
Pr{E[j]} = 1
j=1
⇒ Pr{E[n + 2]} = 1 − Pr{E[1] − E[n]} − Pr{E[n + 1]} = 1 − n · p · (1 − p)n−1 − (1 − p)n
, and Pr{E[n + 2]} is, effectively, the fraction of lost slots.
2
The probability, Pk , of a frame requiring exactly k transmissions is the probability of the first k - 1 attempts failing, pk−1 , times the probability of the
k-th transmission succeeding, (1 - p). The mean number of transmission is then
simply1 :
∞
X
1
pk−1 · (1 − p) · k =
1−p
k=1
1 remember
that
∞
P
k=1
k · xk =
x
(1−x)2
4
.
3
a) The formula is the standard formula for delay for an M/M/1 queue where
β
1
, ρ = µλ and Ts = C
; so:
E[Tr ] = µ1 · 1−ρ
E[Tr ] =
β
1
β
·
=
C 1−ρ
C · (1 − λ ·
β
C)
=
C
β
1
−λ
(1)
;
b) first we calculate the total λtot =
N
P
λi = N · λ = 9000, then substituting
i=1
into (1) we have:
E[Tr ] =
1
= 1 ms
10000 − 9000
.
4
Number the attempts starting from 1. Attempt i is distributed among 2i−1 slots
(see Figure 1). Thus, the probability of a collision on attempt i is 2−(i−1) . The
probability that the first k-1 attempts will fail is then:
Pk = (1 − 2−(k−1) ) ·
k−1
Y
2−(i−1)
i=1
, which can be simplified
2
to:
Pk = (1 − 2−(k−1) ) · 2−
, so, the expected number of rounds is simply:
X
k · Pk
k
.
2 remember
that
N
Q
2−i = 2
−N ·(1+N )
2
.
i=1
5
(k−1)·(k−2)
2
p
0
1-p
{
{
p
p
0
1-p
p
{
20
21
2k-1
0
1-p
{
2k
p
0
1-p
Figure 1: After k consecutive collisions (in this figure a single collision happens
with probability p), a station delays retransmission by a random interval uniformly distributed beetween 0 and 2k , (so the packet is transmitted k+1 times
in total).
6
Download