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.
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.