![]() |
Clearly, the correct thing to do is:
Because both outcomes as possible
![]() |
![]() |
Next we will see that:
The error situations given above cannot arise when:
It is impossible that the sender's window slides ahead of the receiver's window:
![]() |
From the operation of the sliding window protocol, the receiver's window is always ahead of the sender's window:
![]() |
(because when the frame X is received, the receiver sends Ack X and immediately slide its window. But the sender window will only slide when the corresponding ACK is received - this will always be later !).
In the mean time, the sender's window did not move at all - because all Ack messages were lost. |
Example:
![]() |
![]() |
![]() |
So, to ensure that there is no confusion about whether a frame is a retransmission or a new frame, we must make sure that in this worst case, the sender and receiver windows do not have any sequence number in common (i.e., do not overlap).
If the sender and receiver windows do not ever have any sequence number in common, then the receiver can use this simple way to decide on a received frame:
And there will never be the case where the same sequence number is used for a new frame and a retransmission
![]() |
![]() |
![]() |
Is it practical to use SWS > RWS ?