The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+38 votes

Let the size of congestion window of a TCP connection be $32$ KB when a timeout occurs. The round trip time of the connection is $100$ msec and the maximum segment size used is $2$ KB. The time taken (in msec) by the TCP connection to get back to $32$ KB congestion window is _________.

asked in Computer Networks by Veteran (112k points)
edited by | 8.7k views
What should be the answer?

1100ms or 1200ms ?
if you see the official answer key you can see it gives marks between the range

1100 to 1300 .

8 Answers

+95 votes
Best answer

Answer:  Given that at the time of Time Out, Congestion Window Size
           is $32KB$ and RTT = $100ms$,

          When Time Out occurs, for the next round of Slow Start, 

          Threshold = $\dfrac{\text{size of congestion window}}{2}$ ,

          Threshold = $16KB$

Suppose  we have a slow start $\Rightarrow2KB \mid 4KB \mid 8KB \mid 16KB$
(As the threshold is reached,  Additive increase starts)

$\mid 18KB \mid 20KB \mid 22KB \mid 24KB \mid 26KB \mid 28KB \mid 30KB \mid 32KB$

Here | (vertical line)  is representing RTT so the total number of vertical lines is
 $11\times 100ms=1100 msec$ and so this is the answer.

answered by Active (1.1k points)
edited by

Do we always add by MSS in the linear increase phase?
here we have added by 2.
while we have added 1 in:

even though the mss is 2 there also. i didnt understand this thing.

There is a difference in the two...

here MSS size is 2KB i.e. every time 1MSS sent means 2 KB data is sent so either you write in terms of MSS by adding 1 or in terms of data adding 2KB

the question in the link has started with window size (which is 2MSS). The AIMD algorithm is applied when the segment being sent is lost or data size reaches threshold. We generally start from slow start phase i.e.

1st transmission 2MSS

2nd 4MSS

3rd 8MSS

now since it reached threshold

4th 9MSS   (as per AIMD increasing by 1)

5th  10MSS (segment lost)

new threshold 10/2 i.e. 5MSS and transmission starts with 2MSS

6th 2MSS

7th 4MSS

8th 5MSS

9th 6MSS

10th 7MSS
we have to increment the window size or maximum segment size?
whats the difference/relation?


sorry, i am still having confusion
we start the slow start phase with the window size given.....but after the threshold we always increase by 1MSS
NIcely answered buddy !
MSS will be constant through out the data transfer between two hosts, when sender and receiver comes to an agreement of maximum segment size, it will be fixed, in ipv4 536 octets will be by default and in ipv6 1200 octets,


we will be changing the window size accordingly, note that sender and receiver buffers are of constant size,but window sizes will be changing.
Perfect Explanation! (y)
Total segments are 12. Answer should be 1200msec right????

1 MSS = 2KB

wc = 32 KB = 16 MSS

Th = 8 MSS

Timeout occurs when WC = 16MSS.  The time taken (in msec) by the TCP connection to get back to 32 KB (OR 16 MSS)  congestion window is _________. 

16MSS| 1MSS| 2MSS | 4MSS| 8MSS | 9MSS| 10MSS| 11MSS| 12MSS| 13MSS| 14MSS|15MSS| 16 MSS

Therefore, The time taken (in msec) by the TCP connection to get back to 32 KB (OR 16 MSS)  congestion window is 12 * RTT = 12 * 100 ms = 1200 ms.

Isn't my solution correct? Please guide me if I am wrong.

nice approach
i have a doubt here ... When timeout occur then size of congestion window changes to half of previous congestion window not threshold value changes to half of Congestion window (Threshold is already half of congestion).

Correct me if i m wrong.

when timeout occure new threshhold is calculated which is half of present window and Slow start phase is start . so we have given question in which till 32kb data is send and timeout occure. 

if it ask Let the size of congestion window of a TCP connection be 32 KB when a Three duplicate Ack are recived.

here we have to used congetion avoidence by doing half of threashhold not Slow start.

2KB should be after 1RTT.

then why the ans counted first RTT in between 2KB and 4KB?

shouldnot total RTT be 12?

Without 1RTT how could we get 2KB at first?
here why isnt the answer 1200 because we are going till 32 KB so there are in total 12 transmission so according to it answer to it should be 1200

 Card Wizard pavan singh Why RTT is used here? Why not propagation delay Tp = RTT / 2 is used..


Why RTT is defined as vertical lines

If AIMD is not used then is it like that after threshold we increase the window size by 1 MSS?

I am having confusion as to why we are not increasing the window size by 1 after threshold..Please help.
Because maximum segment size mentioned here is 2.

Thank you sir..

But in the following question-

MSS =2 but after threshold we are increasing window size by 1. Why is this happening?


Both are same here the difference is we are given the size of MSS as 2KB there we are directly using  MSS.
+14 votes
After timeout, new threshold = 32KB/2 = 16 KB, which is 8MSS (as size of MSS = 2KB).

So the transfer proceeds as

1 - 1MSS (2KB)

2 - 2MSS (4KB)

3 - 4MSS (8KB)

4 - 8MSS (16KB) <--- threshold

5 - 9MSS (18KB)

6 - 10MSS (20KB)

7 - 11MSS (22KB)

8 - 12MSS (24KB)

9 - 13MSS (26KB)

10 - 14MSS (28KB)

11 - 15MSS (30KB)

12 - 16MSS (32KB)

Hence total time = RTT  * 11 = 1200ms
answered by Active (3.5k points)
edited by

Isnt the condition for slow start cwnd <= ssthresh so at t=5 woulsnt the cwnd be 32 KB or 10 MMS. Linear growth will be starting only from t=6 , isnt it??

Hence total time = RTT  * 11 = 1200ms ??

vamsi2376  The Question is "The time taken (in msec) by the TCP connection to get back to 32 KB congestion window is _________ " It means after how many RTTs we can transmit with a capacity 32 KB i.e. all RTTs before reaching 32 KB Capacity (excluding the RTT needed to transmit 32 KB) which is 11 RTTs  

=> 11* 100=1100 ms.


This answer is also correct.

In congestion avoidance, we increase window size either by 1 or 2..

While taking window size  as 2  answer 1100 comes and 1200 comes by taking window size 1 .

 Correct answer is within range 1100-1300 in official key by KGP.

+8 votes
Current size of congestion window in terms of number of segments
                            = (Size in Bytes)/(Maximum Segment Size)
                            = 32KB / 2KB 
                            = 16 MSS
When timeout occurs, in TCP's Slow Start algorithm, threshold is 
reduced to half which is 16KB or 8MSS. Also, slow start phase begins 
where congestion window is increased twice. 
So from 1MSS to 8 MSS window size will grow exponentially. 
Congestion window becomes 2MSS after one RTT and becomes 4MSS after
2 RTTs and 8MSS after 3 RTTs.  At 8MSS, threshold is reached and
congestion avoidance phase begins.  In congestion avoidance phase,
window is increased linearly. So to cover from 8MSS to 16MSS, it needs
8 RTTs

Together, 11RTTs are needed (3 in slow start phase and 8 in congestion
avoidance phase).
answered by Active (4.7k points)
ur explanation is perfect according to [email protected]
+1 vote
Congetion Windows size=32KB



2 | x1 | 4 |x2| 8 |x3| 16|x4| 18 |x5| 20 |x6| 22 |x7| 24 |x8| 26 |x9| 28 |x10| 30|x11| 32

Where xi=100ms

So total time =100*xi(11 times)=1100ms
answered by Loyal (9.2k points)
0 votes
WSsize =32KB

threshhold value = 32/2=16 KB

as MSS = 2KB


2, 4 , 8, 16(THRESH HOLD VALUE),17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32


answered by Active (4.2k points)
0 votes
1 MSS = 2KB so 16 MSS= 32KB

Note: The initial size of cwnd is 1MSS so

cwnd : 1 2 4 8(ssthresh) 9 10 11 12 13 14 15 16

RTT    : 0 1 2 3                  4    5   6  7   8  9   10   11

So at the 11th RTT we got to cwnd of size 16.

11*100 = 1100ms
answered by (31 points)
0 votes

I think this will be helpfull Thank You!

answered by Junior (599 points)
–2 votes
Ans  1100
answered by (433 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

44,249 questions
49,743 answers
65,842 users