Hi shabach!!
a. The bandwidth is 1.5 Mbps, and data packets can be sent continuously.
Packet size = 1 KB = 1 * 1,024 * 8 bits = 8,192 bits
1.5 Mbps = 1.5 * 1,000 * 1,000 = 1,500,000 bits/s
RTT = 100 ms = 0.1 s
Transmit time per packet = Size of packet/Bandwith =
= 8,192 bits/1,500,000 bits/s =
= 0.00546 s =
= 5.46 ms
# of packets to be sent = Size of file / Size of packet 0
= 1,000 KB / 1 KB =
= 1,000
Transmit time for all packets = Transmit time per packet*# of packets =
= 5.46 ms * 1000 =
= 5.46 s
Total time = Initial 2 RTT + Transmit time for all packets + Propagation
= 2 * RTT + Transmit time for all packets + RTT/2 =
= 2 * 0.1 s + 5.46 s + 0.1 s/2=
= 0.2 s + 5.46 s + 0.05 s =
= 5.71 s
Important note:
Some sources do not use the propagation in the formula and others use
a double time for Propagation (including both directions).
----------------------------------------------
b. The bandwidth is 1.5 Mbps, but after we finish sending each data
packet we must wait one RTT before sending the next.
We are sending 1000 packets, so we must wait for 999 RTTs, so we must
add to the value found in a) the time for 999 RTTs:
Total Time = 5.71 s + 999*RTT =
= 5.71 s + 999 * 0.1 s =
= 5.71 s + 99.9 s =
= 105.61 s
----------------------------------------------------------
c. The bandwidth is ?infinite,? meaning that we take transmit time to
be zero, and up to 20 packets can be sent per RTT.
We need to send 1000 packets, then we will need 1000 / 20 = 50 RTTs to
transmit all the data, but note that for the last 20 packet only need
(RTT/2), so the total RTTs required are 49.5.
Total time = Initial 2 RTT + Required RTTs =
= 2*RTT + 49.5 * RTT =
= 51.5 * RTT =
= 51.5 * 0.1 s =
= 5.15 s
----------------------------------------------------------
d. The bandwidth is infinite, and during the first RTT we can send one
packet (2^1-1), during the second RTT we can send two packets (2^2-1),
during the third we can send four (2^3-1), and so on.
Right after the handshaking of 200 ms (2 RTTs) we send one packet. One
RTT after we send two packets, the next RTT we send four packets, etc.
At n > RTTs past the initial handshaking we have sent:
1 + 2 + 4 + ... + 2^n = 2^(n+1)-1 packets.
At n = 9 we have sent all 1000 packets. The last batch arrives 0.5 later.
Then:
Total time = Initial 2 RTT + 9 * RTT + 0.5 * RTT =
= 2 * RTT + 9.5 * RTT =
= 11.5 * RTT =
= 11.5 * 0.1 s =
= 1.15 s
----------------------------------------------------------
I hope that this helps you. Feel free to request fora clarification if you need it.
Regards.
livioflores-ga |