Difference between Stop and Wait, GoBackN and Selective Repeat

Stop and Wait, GoBackN, and Selective Repeat protocols are crucial for those studying or working with network communications. These protocols are fundamental in controlling the flow of data across a network and ensuring reliable data transfer, each with its specific mechanisms and use cases.

What is Stop and Wait?

Stop and Wait is a fundamental flow control protocol used in data transmission. In this protocol, after sending a frame, the sender stops and waits for an acknowledgment from the receiver before sending the next frame. This method is simple but can lead to inefficiencies, especially over networks with high latency where the wait times can significantly slow down the data transfer rate.

Example of Stop and Wait:

  • A device sends a packet over a satellite link and waits for an acknowledgment before sending the next packet, leading to potential delays due to the time taken for the signal to travel back and forth.

What is GoBackN?

GoBackN, also known as Go-Back-N ARQ (Automatic Repeat reQuest), is a more sophisticated form of the sliding window protocol that allows multiple frames to be in transit at once. If an error is detected in a frame, all frames sent after the erroneous frame are retransmitted. GoBackN can utilize more bandwidth and maintain higher throughput than Stop and Wait.

Example of GoBackN:

  • In a file transfer, if packet 3 out of 10 is lost, packets 3 through 10 are retransmitted, even if packets 4 to 10 were originally received without error.

What is Selective Repeat?

Selective Repeat, another variant of the sliding window protocol, improves efficiency by only retransmitting the specific frames that were acknowledged as being received in error or not received at all. This protocol is more complex but provides better utilization of available bandwidth compared to GoBackN.

Example of Selective Repeat:

  • During a video stream, if frame 15 and frame 20 are lost, only these frames are retransmitted, while the receiver keeps all other correctly received frames.

Difference Between Stop and Wait, GoBackN, and Selective Repeat: 

BasisStop and WaitGoBackNSelective Repeat
EfficiencyLow, due to idle time waiting for acknowledgments.Higher than Stop and Wait, but lower than Selective Repeat due to potential redundant retransmissions.Highest, as only erroneous or lost frames are retransmitted.
ComplexityLow, simple to implement.Moderate, due to the need to manage a window of frames.High, requires complex management of individual frame acknowledgments and retransmissions.
Bandwidth UtilizationPoor, as the channel remains idle during the wait period.Good, allows multiple frames to be in transit simultaneously.Optimal, minimizes retransmission by selectively targeting lost or corrupted frames.
SuitabilitySuitable for simple, low-speed networks where message sizes are small and error rates are low.Suitable for more reliable and faster networks where the higher error rate can be managed.Best suited for high-speed networks with high error rates where efficiency is critical.
ExamplesSending control signals in an automated industrial process where commands are infrequent and reliability is paramount.Bulk data transfer over a moderately reliable network link, such as a wireless LAN.Streaming high-quality video over a high-speed internet connection where packet loss occurs sporadically.
tools

Computer Networks

Related Articles