Вы находитесь на странице: 1из 3

ECE/CS 372Introduction to Computer Networks SolutionAssignment # 1

Bechir Hamdaoui, School of EECS, Oregon State University

P6, Page 72 (or P5, Page 73 version 5) a) dprop = m/s seconds b) dtrans = L/R seconds c) dend to end = (m/s + L/R) seconds d) The bit is just leaving Host A e) The rst bit is in the link and has not reached Host B f) The rst bit has reached Host B L 8 s = 56120 g) Want m = R 103 (2.5 10 ) 536 km. P7, Page 72 (or P6, Page 74 version 5) Consider the rst bit in a packet. Before this bit can be transmitted, all of the bits in the packet must be generated. This requires 56 8/(64 103 ) seconds = 7 milliseconds. The time required to transmit the packet is 56 8/(2 106 ) seconds = 224 microseconds. Propagation delay = 10 milliseconds. The delay until decoding is 7 milliseconds + 224 microseconds + 10 milliseconds = 17.224 milliseconds P8, Page 72 (or P7, Page 74 version 5) a) 3 1000kbps/150kbps = 20 users can be supported because each user requires one tenth of the bandwidth b) p = 0.1 n 120n c) (120 n )p (1 p) 20 120 n d) 1 n=0 (n )p (1 p)120n 0.003. P10, Page 73 (or P9, Page 74 version 5) The rst end system requires L/R1 to transmit the packet onto the rst link; the packet propagates over the rst link in d1/s1; the rst packet switch adds a processing delay of dproc ; after receiving the entire packet, the rst packet switch requires L/R2 to transmit the packet onto the second link; the packet propagates over the second link in d2/s2; the second packet switch adds a processing delay of dproc ; after receiving the entire packet, the second packet switch requires L/R3 to transmit the packet onto the third link; the packet propagates over the third link in d3/s3. Adding all these delays gives dendend = L/R1 + L/R2 + L/R3 + d1/s1 + d2/s2 + d3/s3 + 2 dproc To answer the second question, we simply plug the values into the equation to get 6 + 6 + 6 + 20 + 16 + 4 + 3 + 3 = 64 msec

P11, Page 73 (or P10, Page 75 version 5) Because bits are immediately transmitted, the packet switch does not introduce any delay; in particular, it does not introduce a transmission delay. Thus, dendend = L/R + d1/s1 + d2/s2 + d3/s3 For the values in the previous problem (P10), we get 6 + 20 + 16 + 4 = 46 msec. P12, Page 73 (or P11, Page 75 version 5) Given that one packet is already been transmitted, and n packets are in the queue waiting their turns, the queuing delay of the (n+1)th packet is [nL + (L x)]/R

P13, Page 73 (or P12 and P13, Page 75 version 5) a) (or P12 version 5) The queuing delay is 0 for the rst transmitted packet, L/R for the second transmitted packet, and generally, (N-1)L/R for the Nth transmitted packet. Thus, the average delay for the N packets is (L/R + 2L/R + ....... + (N 1)L/R)/N which is equal to L/(RN ) (1 + 2 + ..... + (N 1)) = L/(RN ) N (N 1)/2 = LN (N 1)/(2RN ) = (N 1)L/(2R) Note that here we used the well-known fact that 1 + 2 + ....... + N = N (N + 1)/2 b) (or P13 version 5) It takes LN/R seconds to transmit the N packets. Thus, the buffer is empty when a batch of N packets arrive. The rst of the N packets has no queuing delay. The 2nd packet has a queuing delay of L/R seconds. The N th packet has a delay of (N 1)L/R seconds. Note that the N th packet has already been transmitted when the second batch of N packets arrives. Hence, the next N packets arrive at an empty queue; that is, the (N + 1)th packet has no queueing delay; the (N + 2)th packet has a queueing delay of L/R, etc. Therefore, it sufces to average over a batch of N packets to determine the average over all packets. The average queueing delay is then 1 N
N

n=1

(n 1)L/R =

L 1 RN

N 1

n=
n=0

L 1 (N 1)N L (N 1) = RN 2 R 2

P14, Page 74 (or P14, Page 75 version 5) a) The transmission delay is L/R. Hence, the total (queueing + transmission) delay is IL L/R + L/R = R(1 I ) 1I b) Let x = L/R. Thus, the total delay is
x 1ax .

Note that 1 ax > 0 or x < 1/a must hold.


a = 10

100 80 total delay 60 40 20 0 0.09

0.092

0.094 0.096 x or L/R

0.098

0.1

Fig. 1.

Total delay as a function of L/R for a=10

P15, Page 74 (or P15, Page 75 version 5) First, note that = R/L packets per second. From previous problem (P14), we derived the total (queueing + transmission) delay as L/R 1I

Replacing I by aL/R and R/L by implies that the total delay is L/R 1/ 1 = = 1 aL/R 1 a/ a

P23, Page 75 (or P22, Page 77 version 5) Let us call the rst packet A and the second packet B. a) If the bottleneck link is the rst link (that is, Rs < Rc ), then, packet B is queued at the rst link waiting for the transmission of packet A. So, the packet inter-arrival time at the destination is simply L/Rs . b) If the second link is the bottleneck link (i.e., Rc < Rs ) and since both packets are sent back to back, it must be true that the second packet arrives at the input queue of the second link before the second link nishes the transmission of the rst packet. That is, since Rc < Rs , L/Rs + L/Rs + dprop < L/Rs + dprop + L/Rc The left hand side of the above inequality represents the time needed by the second packet to arrive at the input queue of the second link (the second link has not started transmitting the second packet yet). The right hand side represents the time needed by the rst packet to nish its transmission onto the second link (which is the minimum time needed for the second packet to start its transmission onto the second link). The inequality above clearly shows that the second packet must have queuing delay at the input queue of the second link. Now if we send the second packet T seconds later, then we can ensure the there is no queueing delay for the second packet at the second link if we have: L/Rs + L/Rs + dprop + T L/Rs + dprop + L/Rc Thus, T must be equal to or greater than L/Rc L/Rs in order to ensure no queueing delay before the second link. P25, Page 76 (or P24, Page 77 in version 5) a) bandwidth x propagation delay = R d/s = 2.106 20000 103 /(2.5 108 ) = 160, 000 bits b) It takes 1/R second for each bit to be transmitted (to be pushed onto the link). Thus, at any time, there will be as many bits as the propagation delay allows to push. That is, dprop /(1/R), which is 160,000 bits c) The bandwidth-delay product of a link is the maximum number of bits that can be in the link at any time d) The width is the distance divided by the total number of bits in the link. That is, 20, 000 103 /160, 000 = 125 meters long, which is longer than a football eld e) The width is then (d/number of bits) (from d) above) which is equal to (d/bandwidth delay product) (from c) above) which is equal to d/(R dprop ) (from a) above) which is equal to d/(R d/s) or s/R P29, Page 76 (or P28, Page 78 in version 5) Recall geostationary satellite is 36,000 kilometers away from earth surface. a) propagation delay is dprop = d/s = 36 106 /(2.4 108 ) = 0.15 sec b) bandwidth-delay product is R dprop = 10 106 0.15 = 1, 500, 000 bits c) The transmission of x bits should take full minute. That is, x should be large enough so that the last bit completes its transmission exactly after 1 minute. Hence, x should be at least 60/(1/R) = 600, 000, 000 bits P33, Page 78 (or P32, Page 79 in version 5) Time at which the rst packet is received at the destination = S +80 R 3 seconds. After this, one packet is received at destination every S +80 seconds. Thus delay in sending the whole le is R S + 80 S + 80 S + 80 3 + (F/S 1) ( ) = (F/S + 2) R R R To calculate the value of S which leads to the minimum delay, delay (S ) = d F S + 80 1 F F delay (S ) = 0 ( 2 ) + (F/S + 2) = 0 2 (S + 80) = + 2 S = 40F dS S R R S S