0

I am preparing for my exams and was solving problems regarding Sliding Window Protocol and I came across these questions..

A 1000km long cable operates a 1MBPS. Propagation delay is 10 microsec/km. If frame size is 1kB, then how many bits are required for sequence number?

A) 3 B) 4 C) 5 D) 6

I got the ans as C option as follows,

propagation time is 10 microsec/km
so, for 1000 km it is 10*1000 microsec, ie 10 milisec
then RTT will be 20 milisec 

in 10^3 milisec 8*10^6 bits
so, in 20 milisec X bits;

X = 20*(8*10^6)/10^3 = 160*10^3 bits

now, 1 frame is of size 1kB ie 8000 bits
so total number of frames will be 20. this will be a window size.

hence, to represent 20 frames uniquely we need 5 bits.

the ans was correct as per the answer key.. and then I came across this one..

Frames of 1000 bits are sent over a 10^6 bps duplex link between two hosts. The propagation time is 25ms. Frames are to be transmitted into this link to maximally pack them in transit (within the link).

What is the minimum number of bits (l) that will be required to represent the sequence numbers distinctly? Assume that no time gap needs to be given between transmission of two frames.

(A) l=2 (B) l=3 (C) l=4 (D) l=5

as per the earlier one I solved this one like follows,

propagation time is 25 ms
then RTT will be 50 ms 

in 10^3 ms 10^6 bits
so, in 50 ms X bits;

X = 50*(10^6)/10^3 = 50*10^3 bits

now, 1 frame is of size 1kb ie 1000 bits
so total number of frames will be 50. this will be a window size.

hence, to represent 50 frames uniquely we need 6 bits.

and 6 is not even in the option. Answer key is using same solution but taking propagation time not RTT for calculation. and their answer is 5 bits. I am totally confused, which one is correct?

Rupesh
  • 3,415
  • 2
  • 26
  • 30

3 Answers3

0

I don't see what RTT has to do with it. The frames are only being sent in one direction.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • I was thinking like; say in propagation time it will send all the frames, but after that it will wait for an ack before sending next frame.. that's why I have taken RTT for calculation.. – Rupesh Feb 06 '14 at 05:43
0

Round-Trip-Time means that you have to take into account the ACK (acknowledgement message) you must receive that tells you the frames you are sending are being received by on the other side of the link. This 'time' window is the period where you get to send the remaining frames that the window allows you to send before you anticipate an ACK.

Ideally you want to be able to transmit continuously, i.e not having to stop at the window frame limit to wait for an ACK (which is essentially turns into a stop-and-wait situation if you have to stop and wait for the ack. The solution to this question is: the minimum number of frames that will be transmitted from the moment the first frame is transmitted to the moment you get an ack. (also known as the size for a large window)

Your calculations look to be correct in both cases and it would be safe to assume the answer choices for the second question are wrong .

-1

Here its duplex channel so YOUR RTT= Tp hence they have considered Tp Now you will get X = 25*10³ So total bits of window will be 5..

Vishal
  • 1
  • 1
    propagation delay = roundtrip time for a duplex channel? Seriously? The return trip happens in zero time? – Masked Man Feb 21 '14 at 13:01