Professional Documents
Culture Documents
Go-Back-N ARQ
Go-Back-N
● Improve Stop-and-Wait by not waiting, i.e., Keep channel
busy by continuing to send frames.
● Allow a window of up to Ws outstanding (i.e., unACKed)
frames
● Use m-bit sequence numbering.
● If ACK for oldest frame arrives before window is
exhausted, we can continue transmitting.
● If window is exhausted, pull back and retransmit all
outstanding frames (i.e., “Go back N”)
● The receiver will only accept the frame with its next
expected sequence number, Rnext.
● In this version, the ACK N(R) contains the next expected
sequence number, Rnext, as before.
Go-Back-N ARQ
Go-Back-4: 4 frames are outstanding; so go back 4
fr fr fr fr fr fr fr fr fr fr fr fr fr fr Time
0 1 2 3 4 5 6 3 4 5 6 7 8 9
A
B
A A A out of sequence A A A A A A
C C C frames C C C C C C
K K K K K K K K K
1 2 3 4 5 6 7 8 9
Rnext 0 1 2 3 3 3 3 3 4 5 6 7 8 9
Send Window
... Receive Window
Frames
transmitted
and ACKed Slast Srecent Slast+ Ws - 1
Frames
Buffers received Rnext
oldest un-ACKed
Timer Slast frame
Timer Slast+ 1 Receiver will only accept
... a frame that is error-free and
that has sequence number Rnext
Timer
Srecent most recent
transmission
When such frame arrives Rnext is
...
incremented by one, so the
Slast+ Ws-1 max Seq # receive window slides forward by
allowed one
Sliding Window Operation
Transmitter
Frames
transmitted
Slast
0
and ACKed Srecent Slast+ Ws-1 2 –1
m
1
2
Transmitter waits for error-free
ACK frame with sequence
number Slast Slast
send
When such ACK frame arrives, window
Slast is incremented by one, and i
the send window slides forward i + Ws – 1 i+1
by one
For a given value of m, how large can the window size, Ws, be?
Maximum Allowable Window Size is Ws = 2m-1
M = 22 = 4, Go-Back-4 and try Ws = 4 Transmitter goes back 4
fr fr fr fr fr fr fr
0 1 2
fr
1 3
Time
A 3 0 2
B A
C
A
C
A A
C C
K K K K Receiver has Rnext= 0, but it does not know
1 2 3 0 whether its ACK for frame 0 was received,
Rnext 0 1 2 3 0 so it does not know whether this is the old
frame 0 or a new frame 0
M = 4, Go-Back-3 and try Ws = 3:
Transmitter goes back 3
fr fr fr fr fr fr
0 1
Time
A 1 2 0 2
B A
C
A
C
A
C
K K K Receiver has Rnext= 3 , so it rejects
1 2 3
the old frame 0
Rnext 0 1 2 3
How to Set Timeout and Maximum
Window Size?
Go-Back-N ARQ
Go-Back-4: 4 frames are outstanding; so go back 4
fr fr fr fr fr fr fr fr fr fr fr fr fr fr Time
0 1 2 3 4 5 6 3 4 5 6 7 8 9
A
B
A A A out of sequence A A A A A A
C C C frames C C C C C C
K K K K K K K K K
1 2 3 4 5 6 7 8 9
Rnext 0 1 2 3 3 3 3 3 4 5 6 7 8 9
W s T f 2 T prop 2 T proc T f T a
Go-Back-N Efficiency
(No channel errors)
● Provided that Ws Tf > 2 Tprop + 2 Tproc + Tf + Ta , then the efficiency of
GBN is 100% (ignoring header overhead).
● If the above condition is not true then Ws transmissions will occur and
the window will close until the first ACK returns from the receiver.
When this happens the sender can send another Ws frames. The
efficiency in this case is Ws Tf /(2 Tprop + 2 Tproc + Tf + Ta ).
● The above two cases can be combined into
W sT f
GBN =min { , 1}
2 T pro p2T proc T f T a
Go-Back-N Throughput (Pf = 0)
Required Window Size for
Delay-Bandwidth Product
1 ms 1000 bits 1
10 ms 10,000 bits 2
n0
1−
nf
GBN P f = 1−P f .
1W s −1 P f
Go-Back-N with Channel Errors
Timeout for frame 3
Timeout
Go-Back-4:
fr fr fr fr fr fr fr fr fr fr fr fr fr fr Time
0 1 2 3 4 5 6 3 4 5 6 7 8 9
A
B
A A A out of sequence A A A A A A
C C C frames C C C C C C
K K K K K K K K K
1 2 3 4 5 6 7 8 9
Rnext 0 1 2 3 3 3 3 3 4 5 6 7 8 9
Example: Impact of Bit Error Rate on GBN
nf = 1250 bytes = 10,000 bits, na= no= 25 bytes = 200 bits
Compare S&W with GBN efficiency for random bit errors with p = 0,
10-6, 10-5, 10-4 and R = 1 Mbps & 100 ms
1 Mbps x 100 ms = 100000 bits = 10 frames → Use Ws = 11