Reliable data transfers is one of the primary concerns in computer networking. This service department lies in the hands of TCP. There major flow control protocols – Stop and Wait, Go Back N, and Selective Repeat.
- Stop and Wait –
The sender sends the packet and waits for the ACK (acknowledgement) of the packet. Once the ACK reaches the sender, it transmits the next packet in row. If the ACK is not received, it re-transmits the previous packet again.
- Go Back N –
The sender sends N packets which is equal to the window size. Once the entire window is sent, the sender then waits for a cumulative ACK 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.
- Selective Repeat –
The sender sends packet of window size N and the receiver acknowledges all packet 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.
|Properties||Stop and Wait||Go Back N||Selective Repeat|
|Sender window size||1||N||N|
|Receiver Window size||1||1||N|
|Minimum Sequence number||2||N+1||2N|
|Type of Acknowledgement||Individual||Cumulative||Individual|
|Supported order at Receiving end||–||In-order delivery only||Out-of-order delivery as well|
|Number of retransmissions in case of packet drop||1||N||1|
- a = Ratio of Propagation delay and Transmission delay,
- At N=1, Go Back N is effectively reduced to Stop and Wait,/li>
- 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.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Stop and Wait protocol and Sliding Window protocol
- Difference Between Go-Back-N and Selective Repeat Protocol
- Stop and Wait protocol, its problems and solutions
- Stop and Wait ARQ
- Efficiency of Stop and Wait Protocol
- Sliding Window Protocol | Set 3 (Selective Repeat)
- Differences between wait() and join() methods in Java
- Selective forwarding Attack in wireless Sensor Network
- Non blocking wait in selenium using Python
- How to wait for a promise to finish before returning the variable of a function?
- Stop Wi-Fi from stealing
- CSS | border-image-repeat Property
- How to iterate over filtered (ng-repeat filter) collection of objects in AngularJS ?
- What is ARQ (Automatic Repeat Request)?
- Difference and similarities between HashSet, LinkedHashSet and TreeSet in Java
- Difference between VoIP and and POTS
- What’s difference between The Internet and The Web ?
- Difference between HTML and HTTP
- Difference between http:// and https://
- Difference between Circuit Switching and Packet Switching
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.