Open In App

Difference between Stop and Wait, GoBackN and Selective Repeat

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

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 – Stop and Wait, Go Back N, and Selective Repeat. 
 

  1. Stop and Wait ARQ 
    The sender sends the packet and waits for the acknowledgement of the packet. Once the acknowledgement reaches the sender, it transmits the next packet in a row. If the acknowledgement does not reach the sender before the specified time, known as the timeout, the sender sends the same packet again.
     
  2. 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. 
     
  3. 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. 
     

Differences: 

Properties Stop and Wait ARQ Go Back N ARQ Selective Repeat ARQ
Sender window size 1 N N
Receiver Window size 1 1 N
Minimum Sequence number 2 N+1 2N
Efficiency 1/(1+2*a) N/(1+2*a) N/(1+2*a)
Type of Acknowledgement Individual Cumulative Individual
Supported order at the Receiving end In-order delivery only In-order delivery only Out-of-order delivery as well
Number of retransmissions in case of packet drop 1 N 1
Transmission Type  Half duplex Full duplex Full duplex
Implementation difficulty Low  Moderate Complex

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.

Reference –
Book – Computer Networks by Tanenbaum


Last Updated : 27 Jun, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads