Difference Between Stop and Wait, GoBackN and Selective Repeat
Last Updated :
21 Aug, 2024
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 ARQGo 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 ARQSelective 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 ARQDifference Between Stop and Wait, GoBackN and Selective Repeat
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.
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.
Similar Reads
Difference Between Go-Back-N and Selective Repeat Protocol
Both the Go-Back-N Protocol and Selective Repeat Protocol are the types of sliding window protocols. The main difference between these two protocols is that after finding the suspect or damage in sent frames go-back-n protocol re-transmits all the frames whereas the selective repeat protocol re-tran
4 min read
Difference between Stop and Wait protocol and Sliding Window protocol
Both the Stop and Wait protocol and the Sliding Window protocol are the techniques of flow control handling. The main difference between the Stop-and-wait protocol and the Sliding window protocol is that in the Stop-and-Wait Protocol, the sender sends one frame and waits for acknowledgment from the
5 min read
Differences between wait() and join() methods in Java
The wait() and join() methods are used to pause the current thread. The wait() is used in with notify() and notifyAll() methods, but join() is used in Java to wait until one thread finishes its execution. wait() is mainly used for shared resources, a thread notifies other waiting thread when a resou
2 min read
Difference Between StoreâandâForward Switching and CutâThrough Switching
Switching is a technique to transmit data between networks using switches that connect multiple LANs. Switches forward data packets based on MAC addresses, efficiently using bandwidth and reducing collisions. The three main types are:Circuit Switching: Dedicated path for the entire connection, used
5 min read
Difference between Early and Delayed Token Release
Prerequisite - Token Ring 1. Early Token Release : Sender does not wait for the data packet to complete revolution before releasing the token. Token is released as soon as the data is transmitted. Multiple packets present in the ring. Less reliable than Delayed Token Release. 2. Delayed Token Releas
2 min read
Difference between Recursion and Iteration
A program is called recursive when an entity calls itself. A program is called iterative when there is a loop (or repetition).Example: Program to find the factorial of a number C++ // C++ program to find factorial of given number #include<bits/stdc++.h> using namespace std; // ----- Recursion
6 min read
Difference Between Non-Persistent and p-Persistent CSMA
Carrier Sense Multiple Access (CSMA) is a network protocol that determines on how data should be transmitted in a shared medium communication channel so that there will be no collisions. It provides for the possibility for several equipment or devices to send out data while at the same time not clas
6 min read
Stop and Wait protocol, its problems and solutions
It is the simplest flow control method in which the sender will send the packet and then wait for the acknowledgement by the receiver that it has received the packet then it will send the next packet. Stop and wait protocol is very easy to implement. Total time taken to send is, Ttotal = Tt(data) +
2 min read
Efficiency of Stop and Wait Protocol
Stop and Wait is a flow control protocol. In which the sender sends one packet and waits for the receiver to acknowledge and then it will send the next packet. In case if the acknowledgement is not received, the sender will retransmit the packet. This is the simplest one and easy to implement. but t
3 min read
Sliding Window Protocol | Set 3 (Selective Repeat)
Prerequisite : Sliding Window Protocol - Set 1 (Sender Side), Set 2 (Receiver Side) Why Selective Repeat Protocol? The go-back-n protocol works well if errors are less, but if the line is poor it wastes a lot of bandwidth on retransmitted frames. An alternative strategy, the selective repeat protoco
3 min read