Group06_Bandwidth Brothers : Go Back N ARQ Pt.1
To improve the efficiency of transmission, multiple frames must be in transition while waiting for acknowledgment. In other words, we need to let more than one frame be outstanding(explained in the third paragraph) to keep the channel busy while the sender is waiting for acknowledgment. We have two protocols for performing the above operation, one of them being Go Back N Automatic Repeat Request(ARQ). In this protocol we can send several frames before receiving acknowledgments; we keep a copy of these frames until the acknowledgments arrive.
Sequence Numbers
Frames from a sending station are numbered sequentially. However, because we need to include the sequence number of each frame in the header, we need to set a limit. If the header of the frame allows m bits for the sequence number, the sequence numbers range from 0 to [(2^m) - 1]. For example, if m is 4, the sequence numbers are 0 through 15 inclusive. However, we can repeat the sequence. In other words we can say that the sequence numbers are modulo(2m).
Sliding Window
In this protocol we use an abstract concept called as Sliding Window, that defines the range of sequence numbers that concerns the sender and receiver. The range which concerns the sender is called the send sliding window; the range that concerns the receiver is called the receive sliding window.The maximum size of the window is [(2^m) - 1]. The window at any time divides the possible sequence numbers into four regions. The first region, from the far left to the left wall of the window, defines the sequence numbers belonging to frames that are already acknowledged. The second region, defines the range of sequence numbers belonging to the frames that are sent and have an unknown status. The sender needs to wait to find out if these frames have been received or were lost. These are known as Outstanding Frames. The third region defines the range of sequence numbers for frames that can be sent. Finally, the fourth region defines sequence numbers that cannot be used until the window slides. We use three variables to define its size and location at any given time. We call these variables S(f)(send window, the first outstanding frame), S(n) (send window, the next frame to be sent), and S(size) (send window, size). The variable S(f) defines the sequence number of the first outstanding frame. The variable S(n) holds the sequence number that will be assigned to the next frame to be sent. Finally, the variable S(size) defines the size of the window. The receive window makes sure that the correct data frames are received and that the correct acknowledgments are sent. The size of the receive window is always 1. The receiver is always looking for the arrival of a specific frame. Any frame arriving out of order is discarded and needs to be resent.
There can be a timer for each frame that is sent. We have used only one timer in our code, reason being the timer for the first outstanding frame always expires first and thus we send all outstanding frames when this timer expires.
Go Back N ARQ V/s Stop and Wait ARQ
We can say that the Stop and Wait ARQ Protocol is actually a Go Back N ARQ in which there are only two sequence numbers and the send window size is 1. In other words, m = 1, [(2^m) - 1] = 1. In Go Back N ARQ, we said that the addition is mod(2m); in Stop and Wait ARQ it is 2, which is the same as 2m when m = 1.
Recent Comments