2. 第二章课后习题及答案 下载本文

Internet. Suppose that the average object size is 900,000 bits and that the average request rate from the institution’s browsers to the origin servers is 10 requests per second. Also suppose that the amount of time it takes from when the router on the Internet side of the access link forwards an HTTP request until it receives the response is two seconds on average (see Section 2.2.5).Model the total average response times as the sum of the average access delay (that is, the delay from Internet router to institution router) and the average Internet delay. For the average access delay, use △/(1-△β), where △ is the average time required to send an object over the access link and βis the arrival rate of objects to the access link.

a. Find the total average response time.

b. Now suppose a cache is installed in the institutional LAN. Suppose the hit rate is 0.6. Find the total response time.

Answer:

a. The time to transmit an object of size L over a link or rate R is L/R. The average timeis

the average size of the object divided by R: Δ= (900,000 bits)/(1,500,000 bits/sec) = 0.6 sec

The traffic intensity on the link is (1.5 requests/sec)(0.6 sec/request) = 0.9. Thus, theaverage access delay is (0.6 sec)/(1 - 0.9) = 6 seconds. The total average response timeis therefore 6 sec + 2 sec = 8 sec.

b. The traffic intensity on the access link is reduced by 40% since the 40% of therequests

are satisfied within the institutional network. Thus the average access delayis (0.6 sec)/[1– (0.6)(0.9)] = 1.2 seconds. The response time is approximately zero if therequest is satisfied by the cache (which happens with probability 0.4); the averageresponse time is 1.2 sec + 2 sec = 3.2 sec for cache misses (which happens 60% of thetime). So the average response time is (0.4)(0 sec) + (0.6)(3.2 sec) = 1.92 seconds. Thusthe average response time is reduced from 8 sec to 1.92 sec.

16. (P12) What is the difference between MAIL FROM: in SMTP and From: in the mail message itself?

Answer: The MAIL FROM: in SMTP is a message from the SMTP client that identifies the senderof the mail message to the SMTP server. TheFrom: on the mail message itself is NOTanSMTP message, but rather is just a line in the body of the mail message.

17. (P16) Consider distributing a file of F = 5 Gbits to N peers. The server has an upload rate of us = 20 Mbps, and each peer has a download rate of di =1 Mbps and an upload rate of u. For N = 10, 100, and 1,000 and u = 100 Kbps, 250 Kbps, and 500 Kbps, prepare a chart giving the minimum distribution time for each of the combinations of N and u for both client-server distribution and P2P distribution.

Answer:For calculating the minimum distribution time for client-server distribution, we use thefollowing formula:

Dcs = max {NF/us, F/dmin}

Similarly, for calculating the minimum distribution time for P2P distribution, we use thefollowing formula:

Where,

Client Server:

200 Kbps u 600 Kbps 1Mbps

Peer to Peer:

200 Kbps U 600 Kbps 1 Mbps

????2??= ??????{??/????,??/????????,????/( ????+ ????=1???? )}

F = 5 Gbits = 5 * 1024 Mbits u??= 20 Mbps dmin = di = 1 Mbps

N

10 100 1000

10240 51200 512000 10240 51200 512000

10240 51200 512000 N

10 100 1000

10240 25904.3 47559.33 10240 13029.6 16899.64

10240 10240 10240