Sender window = minimum ( Congestion window, Receiver window)
- If RW > CW, then sender window = CW and congestion control policy will be used. It indicates that receiver can accept more data but intermediate routers cannot.
- If RW < CW, then sender window = RW and flow control policy will be used. So no need to set any threshold here.
Case 1 : CW = 100 MSS and RW = 16 MSS
so, sender window = 16 MSS. No congestion here. We can either use stop-n-wait or selective repeat flow control policy.
Using stop and wait (we send 1 MSS in 1 RTT) = 16*1 ms = 16 ms
Using selective repeat (entire window is sent during one RTT) = 1 ms
Case 2 : CW = 16 MSS and RW = 100 MSS
So, sender window = 16 MSS. Use congestion control policy.
Since there is no timeout, no initial threshold is defined.
1st RTT => 1 MSS ....slow start
2nd RTT => 2 MSS
3rd RTT => 4 MSS
4th RTT => 8 MSS
5th RTT => 16 MSS
So, we need 5 RTTs here to send full window which is 5 ms.