written 6.2 years ago by |
An illustration of a sliding window in (a) initial, (b) intermediate, and (c) final positions.
• Sliding window can increase throughput dramatically.
• To understand why, compare the sequence of transmissions with a stop-and-go scheme and a sliding window scheme. Figure contains a comparison for a 4-packet transmission.
Comparison of transmission using (a) stop-and-go, and (b) sliding window.
• In Figure a, a sender transmits four packets, but waits for an acknowledgement before sending each successive packet.
• If the delay required to send a single packet on one trip through the network is N, the total time required to send four packets is 8N.
• In Figure b, a sender transmits all packets in the window before it waits. The figure shows a small delay between successive packet transmissions because transmission is never instantaneous — a short time (usually a few microseconds) is required for the hardware to complete transmission of a packet and begin to transmit the next packet.
• Thus, the total time required to send four packets is 2N +ε, where ε denotes the small delay.
• To understand the significance of sliding window, imagine an extended communication that involves many packets.
• In such cases, the total time required for transmission is so large that ε can be ignored.
• For such networks, a sliding window protocol can increase performance substantially. The potential improvement is:
$$Tw = Tg \times W$$
• where Tw is the throughput that can be achieved with a sliding window protocol, Tg is the throughput that can be achieved with a stop-and-go protocol, and W is the window size.
• The equation explains why the sliding window protocol illustrated in Figure b has approximately four times the throughput of the stop-and-go protocol in Figure a.
• Of course, throughput cannot be increased arbitrarily merely by increasing the window size. The bandwidth of the underlying network imposes an upper bound — bits cannot be sent faster than the hardware can carry them.
• Thus, the equation can be rewritten:
$$Tw = \min (B, Tg \times W)$$
• Where B is the underlying hardware bandwidth.
written 8.4 years ago by |
- In this flow control method, the receiver allocates buffer space for n frames in advance and allows transmission of multiple frames. This method allows the sender to transmit n frames without an ACK. A k-bit sequence number is assigned to each frame.
- The range of sequence number uses modul0-2 arithmetic. To keep track of the frames that have been acknowledged, each ACK has a sequence number.
- The receiver acknowledges a frame by sending an ACK that includes the Sequence number of the next expected frame.
- The sender sends the next n frames starting with the last received sequence number that has been transmitted by the receiver (ACK). Hence, a single ACK can acknowledge multiple frames as shown in the Fig.
- The receiver receives frames 1, 2 and 3. Once frame 3 arrives ACK4 is sent to the sender. This ACK4 acknowledge the receipt of frame 1, 2 and 3 and informs the sender that the next expected frame is frame 4. Therefore, the sender can send multiple back-to-back frames, making efficient use of the channel.
Operation of a Sliding Window
Sending Window
In this mechanism we maintain two types of windows (buffer) sending window and receiving windows as shown in Figure below. At any instant, the sender is permitted to send frames with sequence numbers in a certain range (3-bit sending window) as shown in Figure 3.1
Receiving Window
The receiver maintains a receiving window depending on the sequence numbers of frames that are accepted as shown in Figure 3.2.
Functioning of Sliding Window
Flow control is achieved as the receiver can control the size of the sending window by limiting the size of the sending window. Similarly, data flow from the sender to the receiver can be limited, and that too can controls the size of receiving window as explained with the help of an example in Figure below.