2.993: Principle of Internet Computing
HW2 Solutions
1. (Peterson & Davie, 3.12)
= 0.1 ms.
2. (Peterson & Davie, 3.13)
The sender can only send up to SWS packets before the frist packet is acknowledged. Thus, the receiver only needs to buffer a maximum of SWS packets.
3. (Peterson & Davie, 3.14)
The delay bandwidth product is 1Mbps x 2.5 sec = 2.5 Mbits. The delay in this case is RTT. Since each frame is 1KB (8192 bits), the maximum number of outstanding frames = 2.5M/8192 = 305
maximum SeqNum > (2*SWS - 1)= (2*305 - 1)= 609. (2^9=512, 2^10=1024) Thus, we need at least 10 bits.
4. (Peterson & Davie, 3.15)
Before we proceed, let's first clarify some confusion. One of the roles of sliding window scheme is flow control. The question is NOT whether it is a good idea to use sliding window for flow control, but rather HOW to use it effectively for flow control. One option is to delay ACK. You're aksed why this option is not good.
In terms of latency, we have so far addressed propagation delay, transmission time and queueing delay. Another type of latency is processing delay. Up till now, we have assumed that once a buffer receives a full packet, it empties out immediately (i.e., send the packet to the next higher layer for processing). But it is possible (due to processing delay) that the packet is still stored in the buffer, and not ready to receive new packets. Another scenario is a receiver (serving as a router) relaying packets to another destination with a smaller link capacity. (We saw this case in HW1.1). So, a solution is to delay ACK.
The figure sliding window/flow control illustrates the reasoning why it is not a good method:
(T. Minn)