Host A is sending data to host B over a f : GATE 2003
GATE 2003 
Host A is sending data to host B over a full duplex link. A and B are using the sliding window protocol for flow control. The send and receive window sizes are 5   packets each. Data packets (sent only from A to B) are all 1000 bits long and the transmission time for such a packet is 50 microsec Acknowledgement packets (sent only from B to A) are very small and require negligible transmission time. The propagation delay over the link is 200 microsec. What is the maximum achievable throughput in this communication?
(A) 7.69 × 106 bps (B) 11.11 × 106 bps
(C) 12.33 × 106 bps (D) 15.00 × 106 bp

Please first try yourself this question and then look at the answer and explanation.

First , please write down the data and convert it into simplest unit possible. it eliminates calculation mistakes and give always uniform answer ,which you can convert later in required quantity.

My personal approach in to convert

 1)  bandwidth from mbps , gbps etc to bps,  

2) Data size ( ack or frame) from bytes to bits ,

3)  time ( PT,Transmission time, RTT etc ) from Microsec , millisec to sec.

Sliding window protocol, Window size  W = 5, frame size  F = 1000 bits , F/C  that is transmission time of frame over link of capacity/bandwidth C = 50 * \(10^{-6}\)sec , ack A = 0 bits ( given negligible) ,  PT = 200*\(10^{-6}\)sec. 

we dont have bandwidth C, but we can find out it by using Transmission time TT= 50 *\(10^{-6}\)sec

F/C= 50* \(10^{-6}\) sec=>  1000 bits/C= 50* \(10^{-6}\)sec => C = 1000 / 50 * \(10^{-6}\) bps = 20 * \(10^6\) bps => C = 20mbps

Efficiency of anything is defined as useful time out of total time.

Useful time will be transmission time TT of the frame which is 50 microsec * Window size = 50 * 5 * \(10^{-6}\)sec

total time will be transmission time + RTT + Ack transmission time, not W *TT + RTT+ A/C. A/C is 0 as A = 0.

In sliding window protocol, the transmission of 2nd and subsequent frames can be overlapped with propagation time of 1st frame and so on. so total time does not include  Window size * transmission time. Rather it  is just transmission of 1st frame and thats it.

So efficiency of the protocol will be => TT/ ( TT+RTT+A/C) => TT / TT + RTT => 5*50 *\(10^{-6}\)sec /( 50*\(10^{-6}\)+ 2*200*\(10^{-6}\)) sec => 250/(50+400) => 250 /450 => 0.5555 => 55.55 %

Throughput = Efficiency of link * bandwidth = 0.5555* 20 * \(10^6\) bps => 11.11.*\(10^6\) bps. 

answer : 11.11 * \(10^6\)bps.

Target Gate @targetgate
3 Nov 2014 02:10 am

why are we ignoring tt of remaining packets??? if number of packets be increased so much that they cannot be transmitted within the transmission time of first packet...then how will we solve such question????

Vivek Vikram Singh @vivek14
5 Nov 2014 02:18 am

Sliding window protocol was introduced to overcome the drawback of Stop and Wait Protocol,which was that Sender is idle after transmission of single frame. Means out of total time of F/C+ 2*PT (ignoring ack), sender was idle for 2*PT time. So the idea was to utilize this time to send more frames in this duration of 2*PT to increase the utilization. Now if you observe this,new frames are sent but they are overlapping with 2*PT time of 1st frame. Let me take this example. Suppose at t=0, sender starts sending frame. At t=50us, the whole 1 frame is sent from senders side. At t=100, 1/4th of the link is traveled by 1st frame(as 200 is total delay between ends) and meanwhile 2nd frame is totally sent from senders side,simultaneously. Can you observe this? Yes? At t=150 (50 TT of 1st frame+ 100 PT of 1st frame) , the 1st frame has traveled half of the link,whereas 3rd frame is simultaneously sent from sender side.It does not take any extra time.Right? At t=200 (50 TT of 1st frame+ 150 PT of 1st frame) , the 1st frame has traveled 1/3rd of the link,whereas 4th frame is simultaneously sent from sender side.It does not take any extra time also. At t=250 (50 TT of 1st frame+ 200 PT of 1st frame) , the 1st frame has traveled full link and reached to the receiver,whereas 5th frame is simultaneously sent from sender side.It does not take any extra time also. As here example says that W=5,so we stop here. But now can you see the overlapping? This overlapping of transmission of frames with PT of other frames make utilization of link go high. I hope you got the point.Please let me know If I am unclear and wrong.

Jagmeet @jagmt
5 Jan 2017 03:48 pm

Nice explanation!
Also here is some animation for GBN and SR.
May be this is helpful too!

Target Gate @targetgate
13 Nov 2014 11:32 am

if in this question window size is 8 then what will be total time for communication??

Vivek Vikram Singh @vivek14
13 Nov 2014 02:32 pm

well, you need to check whether it is possible to send 8 frames ( or any number of frames) within that total time. W*F/C <= F/C + 2*PT 8* 50 * 10 ^ -6 <= 50 + 2* 200 * 10^-6 400*10^-6 <= 450 *10^-6 Yeah, these 8 frames can be sent. Total time for communication will still be 450*10^-6 sec. In this system, maximum window size can be => W <= (F/C + 2*PT )/ (F/C) W<= ( F + 2*PT *C ) /F. Now you can calculate maximum window size supported by this system.

rachapalli vinay kumar @vinayrachapalli
29 Dec 2016 07:55 pm

is RTT=2*PT or RTT=TT+2*PT,

In some sources it is 2*PT,in some other resources TT+2*PT.

Jagmeet @jagmt
5 Jan 2017 05:27 pm

Where you studied RTT = TT+2*PT ?
As per give in Kurose and Ross it is RTT defined as time it takes for a small packet to travel from client to server and then back to the client. The RTT includes packet-propagation delays, packet-queuing delays in intermediate routers and switches, and packet-processing delays. As we consider other delays zero so it is only PT+PT.

Ashish Kumar Goyal @dashish
21 Jan 2017 02:17 pm

@vinayrachapalli  The TT u might have seen is the transmission time of ACK from the receiver.

Go through the RTT definition then u will understand.

Just type "RTT definition" in google and u will get that.

Utkarsh @utkarshsaxena5
7 Jan 2017 02:19 am

Not Understood can anyone explain with all the terms used in detail??

Chetna Wadhwa @chetnawadhwa
12 Jan 2017 08:55 am

The channel is full duplex so shouldn't RTT be PT reather than 2*PT?? 

Ashish Kumar Goyal @dashish
21 Jan 2017 02:11 pm


but full duplex means that u can send and recieve at same time. the bandwidth of channel is shared

here, the packet first need to be received by the receiver then only it can send Ack. Both actions can't happen simultaneously.

so it is always 2*PT

Vivek Vikram Singh @vivek14
12 Jan 2017 01:55 pm

RTT is always 2*PT.

Harshita Sharma @harshitasharma
7 Feb 2017 08:51 am

Sliding Window uses full duplex only.