Selective Repeat ARQ (Automatic Repeat reQuest) is an advanced sliding window protocol used in data communication. It addresses the inefficiency of Go-Back-N ARQ by allowing the receiver to accept and buffer frames received out of order, and by having the sender retransmit only the frames that are actually lost or corrupted.
Selective Repeat ARQ is a protocol where the sender can transmit multiple frames before receiving an acknowledgment, up to a maximum number of unacknowledged frames, known as the window size. Unlike Go-Back-N ARQ, if an error is detected in a frame, the receiver does not discard subsequent frames. Instead, it buffers correctly received frames and requests retransmission only for the frames that are lost or corrupted.
Window Size: The sender maintains a window of up to N frames that can be transmitted without receiving an acknowledgment.
Sequence Numbers: Each frame is assigned a sequence number, which helps in identifying frames and their corresponding acknowledgments.
Transmission: The sender can transmit frames as long as the number of unacknowledged frames is less than the window size.
Acknowledgment: When the sender receives an acknowledgment for a frame, it marks that frame as acknowledged. If the acknowledged frame is the oldest unacknowledged frame, the sender slides the window forward.
Negative Acknowledgment (NAK): If the sender receives a negative acknowledgment (NAK) for a frame, it retransmits only that specific frame.
Timeout: If the sender does not receive an acknowledgment for a frame within a specified timeout period, it retransmits only that specific frame.
In Selective Repeat ARQ, sequence numbers are used to identify frames and their corresponding acknowledgments. The sequence numbers are typically represented using a fixed number of bits, which limits the range of sequence numbers.
For a window size of N, the minimum number of bits required for sequence numbers is:
Number of bits = ⌈log₂(2N)⌉
This is because the sender and receiver windows can be at different positions in the sequence number space, and we need to ensure that there is no ambiguity in identifying frames.
The window size determines the maximum number of frames that can be transmitted without receiving an acknowledgment. A larger window size can improve channel utilization, especially over long-distance networks or high-bandwidth channels, but it also requires more buffer space at both the sender and the receiver.
The timeout period is the maximum time the sender waits for an acknowledgment before retransmitting a frame. It should be set to at least the round-trip time (RTT), which is the time it takes for a frame to reach the receiver plus the time it takes for an acknowledgment to return to the sender.
The sequence number size determines the range of sequence numbers that can be used. It should be large enough to accommodate twice the window size to prevent ambiguity in identifying frames.
The efficiency of Selective Repeat ARQ depends on several factors, including the window size, the probability of errors, and the propagation delay.
Under ideal conditions (no errors), the efficiency can be calculated as:
Efficiency = N / (1 + 2a)
Where:
N is the window size
a is the ratio of propagation time to transmission time
As N approaches infinity, the efficiency approaches 1, which means that the channel is fully utilized.
In the presence of errors, Selective Repeat ARQ is more efficient than Go-Back-N ARQ because it only retransmits the frames that are actually lost or corrupted, rather than all frames from the error onwards.
Improved Efficiency: Selective Repeat ARQ is more efficient than Go-Back-N ARQ, especially in high-error environments, because it only retransmits the frames that are actually lost or corrupted.
Better Bandwidth Utilization: By allowing the receiver to accept and buffer frames received out of order, Selective Repeat ARQ makes better use of the available bandwidth.
Reduced Retransmission Overhead: The selective retransmission of only the lost or corrupted frames reduces the overhead associated with retransmissions.
Complex Receiver: The receiver in Selective Repeat ARQ is more complex than in Go-Back-N ARQ, as it needs to buffer out-of-order frames and potentially reorder them before delivery to the higher layer.
Larger Buffer Requirements: Both the sender and the receiver need to buffer frames, which requires more memory compared to Go-Back-N ARQ.
Sequence Number Limitations: The sequence number space must be at least twice the window size to prevent ambiguity, which can be a limitation in some implementations.
Selective Repeat ARQ is used in various applications:
Data Link Layer Protocols: Some advanced data link layer protocols use Selective Repeat ARQ for error control.
Transport Layer Protocols: Modern transport layer protocols, such as TCP (Transmission Control Protocol), use variants of Selective Repeat ARQ for reliable data transfer.
Satellite Communications: Selective Repeat ARQ is particularly useful in satellite communications, where the propagation delay is significant and retransmitting all frames from an error onwards (as in Go-Back-N ARQ) would be inefficient.
Wireless Networks: Selective Repeat ARQ is often used in wireless networks, where the error rate can be high and retransmitting only the lost or corrupted frames is more efficient.
Selective Repeat ARQ is an advanced sliding window protocol that improves upon Go-Back-N ARQ by allowing the receiver to accept and buffer frames received out of order, and by having the sender retransmit only the frames that are actually lost or corrupted. This makes it more efficient, especially in high-error environments, but also more complex and requiring more buffer space.
While it has some limitations, particularly in terms of complexity and buffer requirements, Selective Repeat ARQ is widely used in modern data communication systems, especially in environments where the error rate is high or the propagation delay is significant.
Understanding Selective Repeat ARQ is essential for anyone working in the field of data communication, as it provides insights into the trade-offs involved in designing reliable and efficient data transfer protocols.
Test Your Knowledge
Take a quiz to reinforce what you've learned
Exam Preparation
Access short and long answer questions for written exams