What is ARQ (Automatic Repeat Request)?

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.

Applications

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:

  1. Transmission Control Protocol (TCP)
  2. Specific Service Orientation Protocol: Error-correction of message signals in ATM networks.
  3. High-Level Data Link protocol.
  4. IBM Binary synchronous Communications Protocol.
  5. Xmodem : modem file transfer protocol.

Types

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.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.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.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.