ARQ stands for Automatic Repeat Request also known as Automatic Repeat Query. ARQ is an error-control strategy used in a two-way communication system. It is a group of error-control protocols to achieve reliable data transmission over an unreliable source or service. These protocols reside in Transport Layer and Data Link Layer of the OSI(Open System Interconnection) model . These protocols are responsible for automatic retransmission of packets that are found to be corrupted or lost during the transmission process.
Working Principle of ARQ
The main function of these protocols is, the sender receives an acknowledgment from the receiver end implying that the frame or packet is received correctly before a timeout occurs, timeout is a specific time period within which the acknowledgment has to be sent by the receiver to the sender. If a timeout occurs: the sender does not receive the acknowledgment before the specified time, it is implied that the frame or packet has been corrupt or lost during the transmission. Accordingly, the sender retransmits the packet and these protocols ensure that this process is repeated until the correct packet is transmitted.
ARQ protocols have a wide range of applications as they provide reliable transmissions over unreliable upper sources. These protocols are mainly functional on shortwave radio to ensure reliable delivery of signals.
For the same function of ARQ, there are various applications:
- Transmission Control Protocol (TCP)
- Specific Service Orientation Protocol: Error-correction of message signals in ATM networks.
- High-Level Data Link protocol.
- IBM Binary synchronous Communications Protocol.
- Xmodem : modem file transfer protocol.
There are several types of ways in which these protocols function in the data link layer :
- Stop And Wait ARQ:
Stop and wait ARQ is also referred to as the alternating protocol is a method used in two-way communication systems to send information between two connected devices (sender and a receiver). It is referred to as stop and wait ARQ because the function of this protocol is to send one frame at a time . After sending a frame or packet, the sender doesn’t send any further packets until it receives an acknowledgment from the receiver. Moreover, the sender keeps a copy of the sent packet. After receiving the desired frame, the receiver sends an acknowledgment. If the acknowledgment does not reach the sender before the specified time, known as the timeout, the sender sends the same packet again. The timeout is reset after each frame transmission. The above scenario depicts a Stop and wait situation, so this control mechanism is termed as Stop and wait ARQ.
- Go Back-N ARQ:
Go-Back-N ARQ is a type of the ARQ protocol, in which the sending process continues to send several frames or packets even without receiving an acknowledgment packet from the receiver. The receiver process keeps track of the sequence number of the next packet it expects to receive and sends that sequence number with every acknowledgment to the sender. The receiver will remove any packet that does not have the desired sequence number it expects and will resend an acknowledgment for the last correct frame. There are only two possibilities that a frame won’t match the sequence number: it is either a duplicated frame of an existing frame or an out-of-order frame that needs to be sent later, the receiver recognizes this scenario and sends an acknowledgment signal accordingly. Once the sender has sent all of the frames in its window, it will identify that all of the frames since the first lost frame, and will go back to the sequence number of the last acknowledgment signal that it received from the receiver pr and continue the process over again. The only drawback of this type of system is that it results in sending packets multiple times: if any frame was lost or found to be corrupted, then that frame and all following frames in the send window will be re-transmitted.
This protocol is more efficient than Stop and wait ARQ as there is no waiting time.
- Selective Repeat ARQ/Selective Reject ARQ:
Selective Repeat ARQ/Selective Reject ARQ protocol mechanism is similar to the Go-Back-N protocol mechanism but in Selective Repeat ARQ the sending process continues even after a frame is found to be corrupt or lost. This is achieved: the receiver process keeps track of the sequence number of the earliest frame it has not received and sends the respective sequence number with the acknowledgment signal. If a frame is not received at the receiver end, the sender continues to send the succeeding frames until it has emptied its window. once this error-correction process has been done, the process continues where it left off. Unlike, Go back-N protocol this does not send a packet multiple times.
Advantages of ARQ
- The Error-detection and correction mechanisms are quite simple compared to the other techniques.
- A much simpler decoding equipment can be put to use compared to the other techniques.
Disadvantages of ARQ
- A medium or a channel with a high error rate might cause too much transmission of the frames or packets of information.
- The high error rate in the channel might also lead to loss of information, therefore reducing the efficiency or the productivity of the system.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- What is APIPA (Automatic Private IP Addressing)?
- How to send a GET request from PHP?
- How to read any request header in PHP
- Simple POST request using the fetch API
- What is Cross Site Request Forgery (CSRF)
- HTTP headers | Access-Control-Request-Method
- R - Repeat loop
- Loops in R (for, while, repeat)
- CSS | background-repeat Property
- How to fetch the details using ng-repeat in AngularJS?
- CSS | border-image-repeat Property
- Difference Between Go-Back-N and Selective Repeat Protocol
- How to filter ng-repeat values according to ng-model using AngularJS ?
- How to iterate over the keys and values with ng-repeat in AngularJS ?
- Sliding Window Protocol | Set 3 (Selective Repeat)
- Difference between Stop and Wait, GoBackN and Selective Repeat
- How to display length of filtered ng-repeat data in AngularJS ?
- How to Add Dynamic Options for Multiple Selects Inside ng-repeat Directive ?
- How to hide or show one record from an ng-repeat within a table based on ng-click?
- How to iterate over filtered (ng-repeat filter) collection of objects in AngularJS ?
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.