You are on page 1of 3

Problem 7

The total amount of time to get the IP address is


RTT1 + RTT2 + L + RTTn .
Once the IP address is known, RTTO elapses to set up the TCP connection and another
RTTO elapses to request and receive the small object. The total response time is
2 RTTo + RTT1 + RTT2 + L + RTTn

Problem 9

a) The time to transmit an object of size L over a link or rate R is L/R. The average time
is the average size of the object divided by R:

Δ= (900,000 bits)/(15,000,000 bits/sec) = .06 sec

The traffic intensity on the link is (15 requests/sec)(.06 msec/request) = .9. Thus, the
average access delay is (.06 sec)/(1 - .9) = .6 seconds. The total average response time
is therefore .6 sec + 2 sec = 2.6 sec.

b) The traffic intensity on the access link is reduced by 40% since the 40% of the
requests are satisfied within the institutional network. Thus the average access delay
is (.06 sec)/[1 – (.6)(.9)] = .12 seconds. The response time is approximately zero if the
request is satisfied by the cache (which happens with probability .4); the average
response time is .12 sec + 2 sec = 2.12 sec for cache misses (which happens 60% of
the time). So the average response time is (.4)(0 sec) + (.6)(2.12 sec) = 1.272 seconds.
Thus the average response time is reduced from 2.6 sec to 1.272 sec.

Problem 18

a) Define u = u1 + u2 + ….. + uN. By assumption

us <= (us + u)/N Equation 1

Divide the file into N parts, with the ith part having size (ui/u)F. The server transmits
the ith part to peer i at rate ri = (ui/u)us. Note that r1 + r2 + ….. + rN = us, so that the
aggregate server rate does not exceed the link rate of the server. Also have each peer i
forward the bits it receives to each of the N-1 peers at rate ri. The aggregate
forwarding rate by peer i is (N-1)ri. We have

(N-1)ri = (N-1)(usui)/u <= ui,

where the last inequality follows from Equation 1. Thus the aggregate forwarding rate
of peer i is less than its link rate ui.
In this distribution scheme, peer i receives bits at an aggregate rate of
ri + ∑ r j = us
j <>i

Thus each peer receives the file in F/us.

b) Again define u = u1 + u2 + ….. + uN. By assumption

us >= (us + u)/N Equation 2

Let ri = ui/(N-1) and


rN+1 = (us – u/(N-1))/N

In this distribution scheme, the file is broken into N+1 parts. The server sends bits
from the ith part to the ith peer (i = 1, …., N) at rate ri. Each peer i forwards the bits
arriving at rate ri to each of the other N-1 peers. Additionally, the server sends bits
from the (N+1) st part at rate rN+1 to each of the N peers. The peers do not forward the
bits from the (N+1)st part.

The aggregate send rate of the server is

r1+ …. + rN + N rN+1 = u/(N-1) + us – u/(N-1) = us

Thus, the server’s send rate does not exceed its link rate. The aggregate send rate of
peer i is

(N-1)ri = ui

Thus, each peer’s send rate does not exceed its link rate.
In this distribution scheme, peer i receives bits at an aggregate rate of

ri + rN + 1 + ∑ r j = u /( N − 1) + (us − u /( N − 1)) / N = (us + u ) / N


j <>i

Thus each peer receives the file in NF/(us+u).


(For simplicity, we neglected to specify the size of the file part for i = 1, …., N+1. We
now provide that here. Let Δ = (us+u)/N be the distribution time. For i = 1, …, N, the ith
file part is Fi = ri Δ bits. The (N+1)st file part is FN+1 = rN+1 Δ bits. It is straightforward to
show that F1+ ….. + FN+1 = F.)

c) The solution to this part is similar to that of 17 (c). We know from section 2.6 that

DP 2 P >= max{F/us, NF/(us + u)}


Combining this with (a) and (b) gives the desired result.

Problem 20

a) In this case, each of the five Gnutella clients immediately learns that it has one less
neighbor. Consider one of these five clients, called, Bob. Suppose Bob has only three
neighbors after X drops out. Then Bob needs to establish a TCP connection with another
peer. Bob should have a fresh list of active peers; he sequentially contacts peers on this
list until one accepts his TCP connection attempt.

b) In this case, Bob does not immediately know that X has departed. Bob will only learn
about X’s departure when it attempts to send a message (query or ping) to X. When Bob
attempts to send a message, Bob’s TCP will make several unsuccessful attempts to send
the message to B. Bob’s TCP will then inform the Gnutella client that X is down. Bob
will then try to establish a TCP connection with a new peer (see part (a)) to rebuild a fifth
connection.

You might also like