We know that In slow-start phase, for each ACK, the sender increases the current transmit window exponentially.
We are given that maximum transmit window size for a TCP Conn = 12000 B.
Now as per question due to congestion, the TCP Conn would come to slow-start phase which is:
TCP THRESHOLD WINDOW SIZE NEW = TCP CURRENT WINDOW SIZE / 2
=> 12000/2 = 6000 Bytes.
The current window size has been incremented to 4000 B which is < TCP THRESHOLD WINDOW SIZE ( 6000 B )
Now we are given a scenario after these actions have been performed.
We send two packets and then we receive ACK of them one by one.
As per question before any ACK came out of these two packets TCP CURRENT WINDOW SIZE = 4000 B.
RECEIVING 1st ACK = 2 * TCP CURRENT WINDOW SIZE
= 2 * 4000 B
= 8000 B but it should be <= TCP THRESHOLD WINDOW SIZE acc to congestion algorithm therefore
TCP CURRENT WINDOW SIZE = 6000 Byte
Now the TCP CURRENT WINDOW SIZE = TCP THRESHOLD WINDOW SIZE, therefore, TCP CURRENT WINDOW SIZE now will increase linearly as the algorithm is in congestion avoidance phase therefore on
RECEIVING 2nd ACK:
TCP CURRENT WINDOW SIZE = TCP CURRENT WINDOW SIZE + 1 MSS
= 6000B + 2000B
= 8000 Bytes