CS455 Syllabus

### The Sender Window Algorithm using cumulative ACKs

• Recall: Sender window

• Sender window:

 Sender window = the serie of send sequence numbers that the sender can use to identify a outstanding frame

• Fact:

 The sender must retain all outstanding data frames in its send buffer (In case the receiver requests the data frame be re-transmitted)

• How the sender window changes (= "moves")

• Update algorithm for the sender window:

 Let Sender Window = [ A .. B ] Sender receives an ACK frame Let X = recv seq no in received ACK frame if ( X > A ) { /* =================================================== Frames A, A+1, ... , X−1 have been acknowledged !! =================================================== */ for ( each Y = A, A+1, ..., X−1 ) do { /* ------------------------------------ Frame Y is acknowledged !!! ------------------------------------ */ Release buffer for frame Y } Sender Window = [X .. X + (B-A) +1)] // I.e.: set sender window to [X .....] }

(Use black board to show examples in class !!!)

• Example 1:

• Suppose the current sender window is:

 Sender window = [1, 2, 3, 4]

• The sender transmits the next data frame:

The next data frame will use the first available number in the sender window is its send seq. no.!!!

• When the sender receives the ACK frame, the send window will be updated to [2,3,4,5]:

• Example 2:

• Suppose:

 Sender window = [1,2,3,4]

Events:

• The sender transmits frames 1,2,3,4
• But: Frame 1 is lost

• The receiver transmits back ACK frames 1,1,1 !!!

because:

 ACK 1 does not acknowledge the lost frame 1

How the sender process the received ACK frames:

 Sender window = [1 .. 4] ACK 1: 1 > 1 ? No (do not update sender window) ACK 1: 1 > 1 ? No (do not update sender window) ACK 1: 1 > 1 ? No (do not update sender window)

Graphically:

Note:

 The sender window does not slide forward !!!         (because no send buffer has been released !!!).

• Example 3: previous example continues

• The sender times out and retransmits frame 1 and frame 1 was received correctly

 Sender window = [1,2,3,4]

Events:

 The sender retransmits frame 1 Frame 1 is received The receiver transmits ACK frame 5 !!!

How the sender process the received ACK frame (#5):

 Send window = [1 .. 3] ACK 5: 5 > 1 ? Yes for each frame Y = 1, 2, 3, 4 do: Y = 1 ===> Release buffer for frame 1 Y = 2 ===> Release buffer for frame 1 Y = 3 ===> Release buffer for frame 1 Y = 4 ===> Release buffer for frame 1 Sender Window = [5 .. 8] (Because ACK 5 acknowledges frames 1,2,3,4 !!!)

Graphically:

Result:

• The sender will release all 4 buffered frames (1,2,3,4)

 Now the sender window will slide forward by 4 positions

The sender will now buffer the data frames 5,6,7,8