Exercícios do Capítulo 1 para 28/3

Observação: nas respostas abaixo, supunha-se que 1 MB = 106 bytes, ao invés do valor correto de 220 ≈ 1,05 × 106 bytes.

3. Calculate the total time required to transfer a 1000-KB file in the following cases, assuming an RTT of 50 ms, a packet size of 1 KB data, and an initial 2×RTT of “handshaking” before data is sent:

(a) The bandwidth is 1.5 Mbps, and data packets can be sent continuously.

(b) The bandwidth is 1.5 Mbps, but after we finish sending each data packet we must wait one RTT before sending the next.

(c) The bandwidth is “infinite,” meaning that we take transmit time to be zero, and up to 20 packets can be sent per RTT.

(d) The bandwidth is infinite, and during the first RTT we can send one packet (211), during the second RTT we can send two packets (221), during the third we can send four (231), and so on. (A justification for such an exponential increase will be given in Chapter 6.)

No. total de pacotes = 1000.

(a) tempo total = handshake + tempo transmissão + tempo de propagação do último bit

= 2×RTT + 8000000 bits / 1,5 Mbps + 0,5×RTT

= 100 ms + 16/3 s + 25 ms

= 5,458 s

(b) tempo total = tempo total (a) + 999×RTT

= 5,458 s + 49,95 s  =  55,408 s

(c) tempo total = handshake + (no. de pacotes / 20) × RTT (aprox.)

=(2+ 50)  × 50 ms = 2,6 s

(d) tempo total = handshake + N × RTT (aprox) ,
onde N = menor n tal que
(∑ 2j1) (j=1..n) = 2n-1-1 ≥ 1000 => N = 11.

Tempo total  = (2+11) × 50 ms = 0,65 s

5. Consider a point-to-point link 4 km in length. At what bandwidth would propagation delay (at a speed of 2×108m/s) equal transmit delay for 100-byte packets? What about 512-byte packets?

Tempo de propagação = 4 km / 2×108m/s = 2 x 10-5 s = 20 μs.

(a) Tempo de transmissão = 100 bytes / N bps.

Logo, 800 / N = 2 x 10-5 , e N = 800 / (2 x 10-5) bps = 400 x 105 bps = 40 Mbps

(b) Tempo de transmissão = 512 bytes / N’ bps

Logo, 4096 / N’ = 2 x 10-5 , e N’ = 4096 / (2 x 10-5) bps = 2048 x 105 bps = 204,8 Mbps

13. Suppose a 1-Gbps point-to-point link is being set up between the Earth and a new lunar colony. The distance from the moon to the Earth is approximately 385,000 km, and data travels over the link at the speed of light—3×108 m/s.

(a) Calculate the minimum RTT for the link.

(b) Using the RTT as the delay, calculate the delay × bandwidth product for the link.
(c) What is the significance of the delay × bandwidth product computed in (b)?

(d) A camera on the lunar base takes pictures of the Earth and saves them in digital format to disk. Suppose Mission Control on Earth wishes to download the most current image, which is 25 MB. What is the minimum amount of time that will elapse between when the request for the data goes out and the transfer is finished?

(a) RTT min = 2 x 385 x 106 m / 3×108 m/s = 77/30 s = 2,567 s

(b) Delay × B/w = 1 Gbps × 2,567 s = 2,567 Gbits = 321 MB

(c) Seria o tamanho do buffer de retransmissão para transmissão confiável

(d) Tempo = (tempo para enviar e receber o pedido) + tempo para transmitir a resposta + tempo de propagar o último bit da resposta)

= 0,5 RTT + (25 MB / 1 Gbps) + 0,5 RTT

= 2,567 s + 200/1000 s = 2,767 s

16. Calculate the latency (from first bit sent to last bit received) for the following:

(a) 100-Mbps Ethernet with a single store-and-forward switch in the path and a packet size of 12,000 bits. Assume that each link introduces a propagation delay of 10 μs and that the switch begins retransmitting immediately after it has finished receiving the packet.

(b) Same as (a) but with three switches.

(c) Same as (a), but assume the switch implements “cut-through” switching; it is able to begin retransmitting the packet after the first 200 bits have been received.

(a) Latência = (tempo de transmissão + tempo de propagação) para todos os enlaces, aqui 2.

Tempo total = 2 x (12000 bits / 100 Mbps + 10 μs) = 2 x (120 + 10) μs = 260 μs

(b) 4 enlaces em vez de 2: Latência = 520 μs.

(c) Neste caso a retransmissão se inicia depois de recebidos os primeiros 200 bits. No primeiro switch será depois de (200 bits / 100 Mbps + 10 μs) = (2 + 10) μs = 12 μs.

O tempo total = 3 x 12 μs + (tempo de transmissão + tempo de propagação) do último enlace

= (36 + 130 +10) μs = 17 6 μs.

26. For the following, assume that no data compression is done, although in practice this would almost never be the case. For (a) to (c), calculate the bandwidth necessary for transmitting in real time:

(a) Video at a resolution of 640×480, 3 bytes/pixel, 30 frames/second.

(b) Video at a resolution of 160×120, 1 byte/pixel, 5 frames/second.

(c) CD-ROM music, assuming one CD holds 75 minutes’ worth and takes 650 MB.
(d) Assume a fax transmits an 8×10-inch black-and-white image at a resolution of 72 pixels per inch. How long would this take over a 14.4-kbps modem?

(a) (640×480) × 3 × 8 × 30 bps = 221.184.000 bps ≈ 221 Mbps

(b) (160×120) × 8 × 5 bps = 768.000 bps ≈ 768 kbps

(c) (650 MB) / (75 × 60) s = (650 × 8 × 106)/(4500) bps = 1,56 Mbps

(d) Tamanho da imagem fax = (8 × 72) × (10 × 72) pix. Supondo 1 bit/pixel, o arquivo é do tamanho ((8 × 72) × (10 × 72)) píxeis = 414.720 bits.

Tempo de envio = 414720 / 14400 s = 28,8 s