Suppose that we run the sliding window algorithm with SWS 5

Suppose that we run the sliding window algorithm with SWS = 5 and RWS = 3, and no out-of-order arrivals. Find the smallest value for MaxSeqNum. No explanation Give an example showing that MaxSeqNum - 1 is not sufficient State a general rule for the minimum MaxSeqNum in terms of SWS and RWS.

Solution


1) The smallest working value for MaxSeqNum is 8

It suffices to show that if DATA[8] is in the receive window, then DATA[0] can no longer arrive at the receiver. We have that DATA[8] in receive window
the earliest possible receive window is DATA[6]..DATA[8]
    ACK[6] has been received
DATA[5] was delivered.

But because SWS=5, all DATA[0]’s sent were sent before DATA[5]
by the no-out-of-order arrival hypothesis, DATA[0] can no longer arrive.

2)

We show that if MaxSeqNum=7, then the receiver can be expecting DATA[7] and an old DATA[0] can still arrive. Because 7 and 0 are indistinguishable mod MaxSeqNum, the receiver cannot tell which actually arrived.

1. Sender sends DATA[0]...DATA[4]. All arrive.
2. Receiver sends ACK[4] in response, but it is slow. The receive window is now DATA[5]..DATA[7].
3. Sender times out and retransmits DATA[0]. The receiver accepts it as DATA[7].

3)

From the above discussion we can derive that, MaxSeqNum can be greater than or equal to the sum of SWS and RWS and cannot be less than the sum.

MaxSeqNum >= SWS + RWS

 Suppose that we run the sliding window algorithm with SWS = 5 and RWS = 3, and no out-of-order arrivals. Find the smallest value for MaxSeqNum. No explanation

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site