Difference Between Go-Back-N and Selective Repeat ProtocolGo-Back-N ProtocolIt is an example of the Automatic Repeat Request (ARQ) protocol. In this protocol, the sender node continuously transmits a defined number of data frames in the network. The window size determines the number of nodes. The sender can transmit these frames without receiving an acknowledgment from the receiver node. This is a special case of sliding window protocol where the sender window size is N, and the receiver window size is 1. The receiver node keeps track of the sequence number of the next frame to be received by the receiver node. The receiver discards any data frame with a different sequence number. This means that it deletes any duplicate frame already acknowledged by the receiver or any frame out of order that is expected to receive later by the node. It only accepts in-order delivery of nodes. It then transmits an acknowledgment for the last data frame that was transmitted in the correct order. Once the sender node transmits all the data frames in the window, it searches for all the frames since the first data frame was lost during transmission. The sender node then goes to the sequence number of the last frame acknowledged by the receiver, and it then fills the window beginning with this frame and continues the transmission process. Selective Repeat ProtocolThis protocol is also known as Selective Repeat Automatic Repeat Request. This protocol is implemented in the data link layer of the node in the network. This protocol uses a sliding window method that ensures reliable delivery of data frames from the sender node to the receiver node. The good data frames are received and buffered by the receiver node. This protocol is more efficient as it only retransmits the corrupted data frames during transmission in the network. In order to implement Selective Repeat Protocol requires, two windows of the same size. The sending window stores the data frames to be transmitted by the sender node. At the same time, the receiving window is responsible for storing the data frames received by the receiving node. The window size is kept at half of the maximum sequence number of the data frame. For example, if the sequence number ranges from 0-15, the window size for both the sender and receiver node will be 8. Working Principle for Go-Back-N and Selective Repeat ProtocolGo-Back-N ProtocolGo-Back-N ARQ provides for sending multiple frames before receiving the acknowledgment for the first frame. The frames are sequentially numbered and have a finite number of frames. The maximum number of frames that can be sent depends upon the size of the sending window. If the acknowledgment of a frame is not received within an agreed-upon time, all frames starting from that frame are retransmitted. The size of the sending window determines the sequence number of the outbound frames. If the sequence number of the frames is an n-bit field, then the range of sequence numbers that can be assigned is 0 to 2n?1. Consequently, the size of the sending window is 2n?1. Thus to accommodate a sending window size of 2n?1, an n-bit sequence number is chosen. Selective Repeat ProtocolIt enables the sender node to transmit multiple data frames in the network. The data frames transmitted depend upon the availability of data frames in the sending window. The next frame can be transmitted in the network without waiting for the acknowledgment of the previous data frame. The size of the sender window determines the number of frames that can be transmitted simultaneously. The receiver node stores the sequence number of the first incorrect or corrupted frame or the node not received by the receiver node. The receiver node then fills the receiving window with upcoming frames received by the node once the current window is filled. Then the receiver nodes transmit the sequence number of the corrupt or missing frame with the acknowledgment frame. The sender node continuously transmits the available frame in the sender window. Once all the data frames stored in the sender window are transmitted to the receiver node, it re-sends the data frames whose sequence numbers are provided by the acknowledgment. Once the re-transmission is completed, it continues transmitting to the other network nodes. Difference Between Go-Back-N and Selective RepeatThe two sliding window protocol also differs in their function and working. The difference between Go-Back-N and Selective Repeat protocols are as follows:
ConclusionThe selective Repeat protocol is the more efficient as it does not waste network resources on the data frames that the sender correctly transmits to the receiver node. The Go Back N protocol is more used because it is less complex to implement in the network. Moreover, it is comparatively less expensive as it requires less storage. If the window size is equal for both Go-Back-N and selective repeat protocol, then the efficiency of both these protocols is almost equal. The resources' usage and availability determine that either protocol will be implemented. Selective Repeat Protocol has the advantages of both Stop and Wait and Go Back N protocol. |