Professional Documents
Culture Documents
13-Selective Repeat ARQ-29-Jan-2020Material - I - 29-Jan-2020 - Selective - Repeat - ARQ
13-Selective Repeat ARQ-29-Jan-2020Material - I - 29-Jan-2020 - Selective - Repeat - ARQ
1
Selective Repeat ARQ
• Go-Back-N ARQ inefficient because multiple frames are
resent when errors or losses occur.
• Selective Repeat retransmits only an individual frame
– Timeout causes individual corresponding frame to be resent.
– NAK causes retransmission of oldest un-acked frame.
• Receiver maintains a receive window of sequence numbers
that can be accepted
– Error-free, but out-of-sequence frames with sequence numbers
within the receive window are buffered
– Arrival of frame with Rnext causes window to slide forward by 1 or
more
2
Selective Repeat ARQ
fr fr fr fr fr fr fr fr fr fr fr fr fr fr Time
0 1 2 3 4 5 6 2 7 8 9 10 11 12
A
B
A A N A A A A A A A A A
C C A C C C C C C C C C
K K K K K K K K K K K K
1 2 2 2 2 2 7 8 9 1 1 1
0 1 2
Frames Frames
transmitted S received Rnext Rnext + Wr-1
last Srecent Slast+ Ws-1
and ACKed
Buffers Buffers
Timer Slast Rnext+ 1
Timer Slast+ 1 Rnext+ 2
...
Timer
Srecent ...
Rnext+ Wr- 1 max Seq #
... accepted
Slast+ Ws - 1
4
Send
Transmitter
& Receive Windows
Receiver
0 0
2m-1 1 2m-1 1
2 2
Rnext
Slast
receive j
send
window window
i i
i + Ws – 1 i+1
j + Wr – 1
B ACK1 ACK2
Receive
Window {0,1} {1,2} {2,3}
7
Why Ws + Wr <= 2m works
• Transmitter sends frames 0 to Receiver window starts at {0, …, Wr}
Ws-1; send window empty
• Window slides forward to {Ws,…,Ws+Wr-
• All arrive at receiver 1}
• All ACKs lost
Receiver rejects frame 0 because it is
Transmitter resends frame 0 outside receive window
0 0
2m-1 1 2m-1 1
Ws +Wr-1
Slast 2 2
receive Rnext Ws
send window
window Ws-1
8
Applications of Selective Repeat ARQ
9
Performance-Efficiency of Selective Repeat
n f no
t f /(1 Pf ) no
SR (1 )(1 Pf )
R nf
Unlike SW and GBN, efficiency of SR does not depend
on delay-bandwidth product.
10
Problem
• Suppose frame nf=1250 bytes = 10000 bits,
na=no=25 bytes = 200 bits
• Compare S&W, GBN & SR efficiency for
random bit errors with p=10-6, 10-5, 10-4 and
R= 1 Mbps & 100 ms
11
Example: Impact Bit Error Rate on Selective
Repeat
nf=1250 bytes = 10000 bits, na=no=25 bytes = 200 bits
Compare S&W, GBN & SR efficiency for random bit errors with p=0, 10-6, 10-5, 10-4 and
R= 1 Mbps & 100 ms
Selective Repeat outperforms GBN and S&W, especially at high error rates. The
efficiency decrease of SR at high error rates is inevitable for any ARQ protocol.
12
• Suppose that a Stop-and-Wait ARQ system has
a time-out value that is less than the time
required to receive an acknowledgment.
Sketch the sequence of frame exchanges that
transpire between two stations when station
A sends six frames to station B and no errors
occur during transmission.
• Sliding window protocol is used between the data link layers of machines A and B
with a window size of 7 frames at both sides. The figure below shows the a0 and
b0 states of the sliding windows of machines A and B, respectively, just before
Frame 0 is sent by A. The same figure also shows the sequence numbers of the
frames sent by A and acknowledgements sent by B.
– Indicate the frame numbers that should be contained in the sliding windows
and buffer memories at the sender and receiver for the states a1, b1, a2, b2,
a3, b3, a4, and b4.
• Draw the sender and receiver windows with
three bit sequences for a system using Selective
Repeat ARQ given the following frame exchanges.