P. 1

advertisement
Problems
P. 1
Consider 2 hosts A and B, that are connected through a link of bandwidth R = 1.2
Mbps. The distance between A and B is d=10km. The propagation speed is c = 2*108
m/s.
a) Find the propagation delay
b) Find the transmission delay, for a packet of L = 1.2Kb.
c) Find the packet length, such that host B receives the first bit of the packet the
same time that host A sends the last bit.
d) Consider that we double the length of the link. How will the delays be
affected?
Solution
a) The propagation delay is
๐‘‘๐‘๐‘Ÿ๐‘œ๐‘
๐‘‘
10 ∗ 103 ๐‘š
= =
= 5 ∗ 10−5 ๐‘ ๐‘’๐‘
๐‘
2 ∗ 108 ๐‘š/๐‘ 
b) The transmission delay is
๐‘‘๐‘ก๐‘Ÿ๐‘Ž๐‘›๐‘  =
๐ฟ
1.2 ∗ 103
=
= 10−3 ๐‘ ๐‘’๐‘
๐‘…
1.2 ∗ 106
c) This is true when:
๐‘‘๐‘ก๐‘Ÿ๐‘Ž๐‘›๐‘  = ๐‘‘๐‘๐‘Ÿ๐‘œ๐‘ ↔
๐ฟ
๐‘‘
=
↔
๐‘…
๐‘
๐‘‘∗๐‘…
๐ฟ=
๐‘
d) When the length of the link is doubled we have d’ = 2*d
The propagation delay thus becomes
′
๐‘‘๐‘๐‘Ÿ๐‘œ๐‘
=
๐‘‘′
๐‘
=
2∗๐‘‘
๐‘
= 2 ∗ ๐‘‘๐‘๐‘Ÿ๐‘œ๐‘
Thus the propagation delay is also doubled.
′
The transmission delay becomes ๐‘‘๐‘ก๐‘Ÿ๐‘Ž๐‘›๐‘ 
=
๐ฟ
๐‘…
= ๐‘‘๐‘ก๐‘Ÿ๐‘Ž๐‘›๐‘ 
Thus the transmission delay does not change because it is independent from
the length of the link
P. 2
Find the time required for the transmission of a file of M bits in a network that uses
TDMA with N time-slots. The total bandwidth is B bits/sec. Also consider that the
end-to-end circuit establishment needs time τ sec. Ignore the length of the packet
header.
Solution
Consider that the length of a single time-slot is t seconds. So, in a single-time slot B*t
๐‘€
bits are transmitted. Given that the total length of the file is M bits, r = ๐ต∗๐‘ก total
TDMA rounds are needed for whole file to be transmitted. Every TDMA round lasts
for N*t seconds. So, for the transmission of the file
๐›ฟ = ๐‘∗๐‘ก∗๐‘Ÿ =๐‘∗๐‘ก∗
๐‘€
๐ต∗๐‘ก
=
๐‘∗๐‘€
๐ต
seconds are needed.
In this time we must also add the time that the end-to-end circuit needs in order to be
established, so the total time needed is
๐œ+๐›ฟ =๐œ+
๐‘∗๐‘€
๐‘ ๐‘’๐‘
๐ต
P. 3
Consider sending a large file of F bits from Host A to Host B. There are two links
(and one switch) between A and B, and the links are uncongested (i.e., no queueing
delays). Host A segments the file into segments of S bits each and adds 40 bits of
header to each segment, forming packets of L = 40 + S bits. Each link has a
transmission rate of R bps. Find the value of S that minimizes the delay of moving the
packet from Host A to Host B. Neglect propagation delay.
Answer
The total number of packets are F/S.
Assume that F/S is integer.
Denote, h = 40, the header size.
The total delay will be
(
(๐‘† + โ„Ž)๐น ๐‘† + โ„Ž
๐‘†+โ„Ž ๐น
1
๐นโ„Ž
) ( + 1) =
+
= (๐น + ๐‘† + โ„Ž +
)
๐‘…
๐‘†
๐‘…๐‘†
๐‘…
๐‘…
๐‘†
Taking the derivative of the delay for S
1
โ„Ž๐น
(1 − 2 )
๐‘…
๐‘†
And setting it to zero we have
1
โ„Ž๐น
(1 − 2 ) = 0 ↔
๐‘…
๐‘†
โ„Ž๐น
(1 − 2 ) = 0 , ๐‘ ๐‘–๐‘›๐‘๐‘’ ๐‘… ๐‘๐‘Ž๐‘›๐‘›๐‘œ๐‘ก ๐‘๐‘’ 0
๐‘†
๐‘† 2 = โ„Ž๐น ↔
๐‘† = √โ„Ž๐น
So the value of S that minimizes the delay of moving the packet from Host A to Host
B is √โ„Ž๐น
P. 4
Suppose users share a 1 Mbps link. Also suppose each user requires 100 Kbps when
transmitting, but each user only transmits 10% of the time. (See the discussion on
"Packet Switching versus Circuit Switching" in Section 1.4.1.)
a) When circuit-switching is used, how many users can be supported?
b) For the remainder of this problem, suppose packet-switching is used. Find the
probability that a given user is transmitting.
c) Suppose there are 40 users. Find the probability that at any given time, n users
are transmitting simultaneously.
d) Find the probability that there are 10 or more users transmitting
simultaneously.
Answer
a) Each user requires 1/10th of the bandwidth. So, when circuit-switching 10
users can be supported.
b) Each user transmits 10% of the time so
P(a given user is transmitting) = 10/100 = 0.1
c) Consider p the probability that a user transmits,
so (1-p) is the probability that a user does not transmit
There are (40
) possible combinations of n users, given that the total users are
๐‘›
40.
Remember that : (๐‘›๐‘˜) =
๐‘›!
๐‘“๐‘œ๐‘Ÿ 0 ≤ ๐‘˜ ≤ ๐‘›
๐‘˜!(๐‘›−๐‘˜)!
So the probability is: (40
)๐‘๐‘› (1 − ๐‘)40−๐‘›
๐‘›
d) The probability that 0 or 1 or 2 or … or 9 users transmit is
9
∑(
๐‘›=0
40 ๐‘›
) ๐‘ (1 − ๐‘)40−๐‘›
๐‘›
So the probability that 10 or more users transmit is
9
1− ∑(
๐‘›=0
40 ๐‘›
) ๐‘ (1 − ๐‘)40−๐‘›
๐‘›
Download