1,412 views
Stations $A$ and $B$ are connected through a line of bandwidth $64$ $\text{kbps}$. Station $A$ uses $16$ $\text{byte}$ packets to transmit messages to $B$ using a sliding window protocol. The round trip propagation delay between $A$ and $B$ is $50$ $\text{milliseconds}$. Determine the window size $A$ should use to maximize the line utilization. Assume that the ack frame is of negligible size and processing delay may be ignored. Justify your answer.

Tt = 2ms, RTT=50 ms
Window size = how many packets can be sent until the ack of first packet is received. once the very first packet is sent, after 50 ms, sender will get the ack, and in 50 ms, 25 more packets can be sent,

hence window size should be 25.
@manu,

window size = no. of packets that can be send before receving the first acknowledgment.If maximum window size is $n$, the sender needs $n$ buffers to hold the unacknowledged frames.

thus here window size will be $52/2$=$26$ packets.
@Reena Ma'am do we also have to consider the 1st packet we sent in 2ms? Or the packets we can add in 50ms? which will be 50/2 = 25 packets?

Bandwidth between Stations A and B $=64\text{ kbps}=64000\text{ bps}$

Size of data packet $=16\text{ Byte}=128\text{ bits}$

So, Transmission time $(T_t)=\dfrac{\text{Size of data packet}}{\text{Bandwidth}}$

$=\dfrac{128}{64000}=.002\text{ sec}$

Round trip Propagation delay $(2\times T_p)= 50\text{ milisec}=0.05\text{ sec}$

For maximum Utilization in sliding window protocol window size of sender,

$=1+2\times \dfrac{T_p}{T_t}$

$=1+\dfrac{0.05}{0.002}=26$

Hence, window size of sender should be 26.

Yes the frames must be kept sending untill ACK comes. Now here I am confused about which definition of RTT to take.
My doubt use to be when to use only one way propagation delay or when to have 2*propagation delay so I realized that we have to read question carefully to figure it out. It depends on question and also if the connection is full duplex or piggybacking is used!!
Yeah, but most of the question based on these type always have asked RTT as total cycle time which includes all time from frame sent to it's ack received.

Answer would be "25" for better understanding see this GATE question

https://gateoverflow.in/1820/gate2006-44

### 1 comment

Sir , If any Numerical type question comes in gate then Should we have to always ignore  T, If Tt <<<<< Tp ...ie If Transmission Time is very less as compared to Propagation time Tp and always we have to solve these questions using Bandwidth-Delay product ie capacity of the link  ?  Sir Please help !

Transmission time of frame $=\frac{ 16 * 8}{ 64* 10^3} = 2ms$

Given $RTT=50 ms$

So number of frames transmitted in one $RTT = 50/2 = 25$ frames

To maximise the line utilisation $25$ frames must be sent ie, the window size of A should be is $25$.

I have a doubt here.
In sliding windows protocol maximum windows size is

1 + 2*a

where a = Tp/Tt.

Then sender windows size will be = 26.
bro don't mug up the formulae. This 1+ 2a works in very straightfrwd case when there is no processing at dest and no transmission at dest and dest is directly connected.

Look for satellite link questions in sliding window in GO PDF. It will create lots of concept.

This 1 + 2a comes from above mentioned formula when RTT is 2 * Tp. Just divide N and D by Tt you will get it.

As soon as the first bit is uploaded in the link, it starts propogating, The acknowledgement for the frame is sent only once the last bit of the frame is received. So, the Round trip time is independent of the first frame we’re sending,

Now, after the last bit of first frame is uploaded in the link, we stil have 50 msec left, We can still send 50/2 packets in the link, but the last frame sent will act as the first frame of the next window. Hence, effectively a total of 25 frames can be in one window including the first one.

For better clarification, consider the same parameters as above, but condier RTT = 4ms,

Now the diagram will look something like this