Professional Documents
Culture Documents
Homework 3 Solutions
Homework 3 Solutions
Thus, we can calculate the total delay of a network using the following formula:
=============================================================
Important Formulas:
==================================================
Binary Prefix
The computer industry uses terms such as kilobyte, megabyte, and gigabyte, and
corresponding symbols KB, MB, and GB, in two different ways. For example, in
citations of main memory or RAM capacity, gigabyte customarily means 1073741824
bytes. This is a power of 2, specifically 230, therefore this usage is referred to as a
binary unit or binary prefix.
In most other contexts, the industry uses kilo, mega, giga, etc., in a manner consistent
with their meaning in the International System of Units (SI): as powers of 1000. For
example, a 500 gigabyte hard drive holds 500000000000 bytes, and a 100 megabit per
second Ethernet connection transfers data at 100000000 bit/s.
Decimal Binary
Q1) How long does it take to transmit a x KB over a y-Mbps link? Give your
answer as a ratio of x and y.
Q2) Calculate the total time required to transfer a 1.5-MB file in the following cases,
assuming a RTT of 80 ms, a packet size of 1 KB and an initial 2×RTT of
“handshaking” before data is sent.
(a) The bandwidth is 10 Mbps, and data packets can be sent continuously.
total time = initial handshaking + network delay
initial handshaking = 2*RTT = 2*80 ms = 160 ms.
Delay = propagation delay + transmission delay (assuming processing & queuing
delays are not significant).
= 40 ms + (1.5-MB / 10 Mbps)
= 40 ms + (1.5*1,048,576 B / 10*1,000,000 bps)
= 40 ms + (1.5*1,048,576*8 b / 10*1,000,000 bps)
= 40 ms + (12,582,912 bits / 10,000,000 bps)
= 40 ms + 1.26 s
= 40 ms + 1260 ms
= 1300 ms
» total time = initial handshaking + network delay
= 160 ms + 1300 ms
= 1460 ms
= 1.46 s
(b) The bandwidth is 100 Mbps, but after we finish sending each data packet we must
wait one RTT before sending the next.
First, count number of packets needed to send the file:
1.5-MB / 1 KB = 12,582,912 bits / 1024(8) bits
= 12,582,912 bits / 8192 bits
= 1536
Thus, we need (1536-1) RTTs to be added to the total delay time.
Second, we need to calculate the network delay in this case:
Delay = propagation delay + transmission delay
= 40 ms + (1.5-MB / 100 Mbps)
= 40 ms + (1.5*1,048,576 B / 100*1,000,000 bps)
= 40 ms + (1.5*1,048,576*8 b / 100*1,000,000 bps)
= 40 ms + (12,582,912 bits / 100,000,000 bps)
= 40 ms + 0.126 s
= 40 ms + 126 ms
= 166 ms
» total time = initial handshaking + network delay + 1535 (80 ms)
= 160 ms + 166 ms + 122800 ms
= 123,126 ms
= 123.26 s
Q3) Calculate the total time required to transfer a 1000-KB file in the following cases,
assuming an RTT of 100 ms, a packet size of 1 KB 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.
» total time = initial handshaking + network delay
= 200 ms + 5500 ms
= 5700 ms
= 5.7 s
(b) The bandwidth is 1.5 Mbps, but after we finish sending each data packet we must
wait one RTT before sending the next.
» total time = handshake + network delay + (number of packets-1) * RTT
= 200 ms + 5700 ms + (1000 - 1)*100 ms
= 105,800 ms
= 105.8 s
Q4) For each of the following operations on a remote file server, discuss whether they
are more likely to be delay sensitive or bandwidth sensitive.
(a) Open a file.
Most likely delay sensitive, since the amount of data
exchanged during the operation is small.
(b) Read the contents of a file.
Most likely bandwidth, though that depends on the size of the file
and the actual characteristics of the data channel. It turns out in
practice that most files are relatively small (a few K or less), so
on an Ethernet (for example), it may well be that delay is the
significant factor.