COMPUTER NETWORKS AND DATA COMMUNICATIONS BY- SHIVANI MONGA (3033) TOPIC- GO BACK N PROTOCOL
Sliding Windows Sliding window protocol (SWP): A protocol that allows several data units to be in transition before receiving an acknowledgement . Sending window Maintain by the sender A set of sequence number Represents a range of permissible sequence numbers for transmitted but not-yet-acknowledged frames As the protocol operates, the window slides forward over the sequence number space. Receiving window: Maintain by the receiver A set of sequence number Represents a range of frames it is permitted to accept 2
We have three sliding window protocols - A one bit sliding window protocol A protocol using go back n A protocol using selective repeat
Go back N It is used when the transmission time for frames is large or the bandwidth is too large. When either the bandwidth or the round trip delay is large,we need to increase the size of sending window. In networking if a task is often began before the previous task ended. This is known as PIPELINING .
Assume that, in a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 ms to make a round trip. What is the bandwidth-delay product? If the system data frames are 1000 bits in length, what is the utilization percentage of the link? Solution The bandwidth-delay product is Example-1 -
The system can send 20,000 bits during the time it takes for the data to go from the sender to the receiver and then back again. However, the system sends only 1000 bits. We can say that the link utilization is only 1000/20,000 , or 5 percent. For this reason, for a link with a high bandwidth or long delay, the use of Stop-and-Wait ARQ wastes the capacity of the link. Example-1 (continued)
What is the utilization percentage of the link in Example 1 if we have a protocol that can send up to 15 frames before stopping and worrying about the acknowledgments? Solution The bandwidth-delay product is still 20,000 bits. The system can send up to 15 frames or 15,000 bits during a round trip. This means the utilization is 15,000/20,000, or 75 percent. Of course, if there are damaged frames, the utilization percentage is much less because frames have to be resent. Example 2 -
In the Go-Back-N Protocol, the sequence numbers are modulo 2 m , where m is the size of the sequence number field in bits. Note
Figure- Send window for Go-Back-N
The send window is an abstract concept defining an imaginary box of size 2 m − 1 with three variables: S f , S n , and S size . Note The send window can slide one or more slots when a valid acknowledgment arrives.
Figure Receive window for Go-Back-N ARQ
The receive window is an abstract concept defining an imaginary box of size 1 with one single variable R n . The window slides when a correct frame has arrived; sliding occurs one slot at a time. Note
Pipelining and error recovery. Effect of an error when (a) receiver’s window size is 1
Pipelining and error recovery. Effect of an error when (b) receiver’s window size is large.
ADVANTAGES OF GO-BACK N The sender can send many frames at a time Efficiency is more. Waiting time is pretty low. We can alter the size of the sender window
DISADVANTAGES OF GO-BACK Buffer requirement Transmitter needs to store the last N packets Scheme is inefficient when round-trip delay large and data transmission rate is high Retransmission of many error-free packets following an erroneous packet