- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Stop and Wait, GoBackN and Selective Repeat protocols
All these three protocols provide a mechanism for flow control. Read through this article to get a basic overview of Stop and Wait, Go-Back-N, and Selective Repeat protocols.
Stop and Wait Protocol
It is the most fundamental flow control strategy. The transmitter sends one frame at a time to the receiver using this method. The transmitter will come to a halt and wait for the receiver to respond. The interval between sending a message and receiving an acknowledgment is known as the sender's waiting time, and the sender is idle during this time. After receiving an acknowledgment (ACK), the sender will send the next data packet to the receiver, and so on, as long as the sender has data to send.
The Go-Back-N ARQ protocol is a variant of the automatic repeat request (ARQ) protocol. The sender sends several frames determined by a window size even if the receiver does not respond with an acknowledgment (ACK) packet. A transmit window size of N, and a receive window size of 1 is a particular case of the basic sliding window protocol. It can send N frames to the peer before requesting an acknowledgment.
It works on the notion of protocol pipelining, which allows numerous frames to be delivered before the first frame is acknowledged. The shelves in Go-Back-N ARQ are numbered consecutively because Go-Back-N ARQ provides multiple brackets at once, necessitating a numbering strategy to identify one frame from another. These numbers are referred to as sequential numbers.
The maximum number of frames that can be sent at once is entirely dependent on the sender's window size. All structures in the current window will be retransmitted if a frame's acknowledgment is not received within the agreed-upon time frame.
Go-Back-N consumes more bandwidth because it would retransmit an entire window even if a single packet is lost. If the rate of error is high, then Go-Back-N will consume a lot of bandwidth.
Go-Back-N uses cumulative acknowledgements which can reduce the traffic; however, there's always a risk of losing the cumulative acknowledgement. If it happens so, then the acknowledgements of all the corresponding packets are lost.
Selective Repeat Protocol
Selective Repeat ARQ is a variant of the automated repeat request (ARQ) protocol used in reliable communications to handle sequence numbers and retransmissions. Particular repetition allows the transmitter to deliver a set number of frames without waiting for individual ACK from the recipient, as in Go-Back-N ARQ.
It employs two equal-sized windows: a sending window for storing frames to be sent and a receiving window for storing frames received by the receiver. The size is half of the frame's maximum sequence number.
Even if it does not acknowledge any frame in the interim, the Selective Repeat protocol allows it to send several frames based on the availability of structures in the sending window. The size of the transmitting window determines the maximum number of frames that can be sent.
Selective Repeat is a better option if you have to be consider bandwidth requirement, as it would resend only the defective or missing packets and not the entire windows.
Difference between Stop and Wait, Go-Back-N, and Selective Repeat
The following table highlights the major differences between Stop and Wait, Go-Back-N, and Selective Repeat protocols −
|Key||Stop and Wait protocol||Go-Back-N protocol||Selective Repeat protocol|
|Sender window size||The Sender window size in the Stop and Wait protocol is 1.||The Sender window size in the Go-Back-N protocol is N.||The Sender window size in the Selective Repeat technique is N.|
|Receiver Window size||The Receiver window size in the Stop and Wait protocol is 1.||The Receiver window size in the Go-Back-N protocol is 1.||The Receiver window size in the Selective Repeat technique is N.|
|Minimum Sequence Number||The minimum sequence number in the Stop and Wait procedure is 2.||The Minimum Sequence Number in the Go-Back-N protocol is N+1, where N is the number of packets sent.||The Minimum Sequence Number in the Selective Repeat protocol is 2N, where N is the number ofpackets transmitted.|
|Efficiency||In Stop and Wait protocol, Efficiency formular is 1/(1+2*a) where a is ratio of propagation delay vs transmission delay.||In Go-Back-N protocol, Efficiency formular is N/(1+2*a) where a is ratio of propagation delay vs transmission delay and N is number of packets sent.||In Selective Repeat protocol, Efficiency formular is N/(1+2*a) where a is ratio of propagation delay vs transmission delay and N is number of packets sent.|
|Acknowledgement Type||In Stop and Wait protocol, Acknowledgement type is individual.||In Go-Back-N protocol, Acknowledgement type is cumulative.||In Selective Repeat protocol, Acknowledgement type is individual.|
|Supported Order||At the receiver end of the Stop and Wait protocol, no specific order is required.||Only in-order delivery is accepted at the receiver end of the Go-Back-N protocol.||In Selective Repeat protocol, out-of-order deliveries can also be accepted at receiver end.|
|Retransmissions||In Stop and Wait protocol, in case of packet drop, number of retransmission is 1.||In Go-Back-N protocol, in case of packet drop, number of retransmission is N.||In Selective Repeat protocol, in case of packet drop, number of retransmission is 1.|
Go-Back-N and Selective Repeat are types of Sliding Window protocols that allow the transmission of multiple frame spontaneously without having to wait for acknowledgements from the receiver. The Stop-and-Wait protocol is different in the sense that it allows the sender to transmit only one frame at a time and then wait for an acknowledgement from the receiver before transmitting a second frame.
Kickstart Your Career
Get certified by completing the courseGet Started