Open In App

Difference Between Stop and Wait, GoBackN and Selective Repeat

Last Updated : 21 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Flow control in networking manages the rate of data transmission between devices to ensure efficient processing and prevent data overflow. When a device receives more data than it can handle, it risks losing information or needing retransmission. Flow control protocols guide the sender on how much data to send, and typically require an acknowledgment from the receiver before more data is sent.

There are three main flow control methods:

  • Stop and Wait ARQ,
  • Go Back N ARQ
  • Selective Repeat ARQ

Reliable data transfers are one of the primary concerns in computer networking. This service department lies in the hands of TCP. Their major flow control protocols are stop and Wait, Go Back N, and Selective Repeat. 

Stop and Wait ARQ

The sender sends the packet and waits for the acknowledgment of the packet. Once the acknowledgment reaches the sender, it transmits the next packet in a row. If the acknowledgment does not reach the sender before the specified time, known as the timeout, the sender sends the same packet again.

Stop-and-Wait-ARQ
Stop and Wait ARQ

Go Back N ARQ

The sender sends N packets which are equal to the window size. Once the entire window is sent, the sender then waits for a cumulative acknowledgement to send more packets. On the receiver end, it receives only in-order packets and discards out-of-order packets. As in case of packet loss, the entire window would be re-transmitted. 

Go Back N ARQ
Go Back N ARQ

Selective Repeat ARQ

The sender sends packets of window size N and the receiver acknowledges all packets whether they were received in order or not. In this case, the receiver maintains a buffer to contain out-of-order packets and sorts them. The sender selectively re-transmits the lost packet and moves the window forward. 

selective-repeat
Selective Repeat ARQ

Difference Between Stop and Wait, GoBackN and Selective Repeat

PropertiesStop and Wait ARQGo Back N ARQSelective Repeat ARQ
Sender window size1NN
Receiver Window size11N
Minimum Sequence number2N+12N
Efficiency1/(1+2*a)N/(1+2*a)N/(1+2*a)
Type of AcknowledgementIndividualCumulativeIndividual
Supported order at the Receiving endIn-order delivery onlyIn-order delivery onlyOut-of-order delivery as well
Number of retransmissions in case of packet drop1N1
Transmission Type Half duplexFull duplexFull duplex
Implementation difficultyLow ModerateComplex

Where, 

  • a = Ratio of Propagation delay and Transmission delay,
  • At N=1, Go Back N is effectively reduced to Stop and Wait,
  • As Go Back N acknowledges the packed cumulatively, it rejects out-of-order packets,
  • As Selective Repeat supports receiving out-of-order packets (it sorts the window after receiving the packets), it uses Independent Acknowledgement to acknowledge the packets.

Conclusion

Flow control is an crucial mechanism in networking that ensures reliable data transmission by managing the rate at which data is sent between devices. The three primary flow control methods—Stop and Wait ARQ, Go Back N ARQ, and Selective Repeat ARQ—each offer distinct approaches to handling data transmission, acknowledgment, and retransmission.

While Stop and Wait ARQ is simple and straightforward, it is less efficient compared to Go Back N ARQ and Selective Repeat ARQ, which provide higher efficiency by allowing multiple packets to be sent and acknowledged within a window size. The choice of protocol depends on the specific requirements of the network, such as the need for simplicity, efficiency, or the ability to handle out-of-order packets. Understanding these protocols is crucial for designing robust and efficient network communication systems.


Next Article

Similar Reads