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

Station $A$ needs to send a message consisting of $9$ packets to Station $B$ using a sliding window (window size $3$) and go-back-n error control strategy. All packets are ready and immediately available for transmission. If every 5th packet that $A$ transmits gets lost (but no acks from $B$ ever get lost), then what is the number of packets that $A$ will transmit for sending the message to $B$? 

  1. $12$
  2. $14$
  3. $16$
  4. $18$
asked in Computer Networks by Active (3.7k points)
edited by | 6k views
There is a  formula

where p -probability of failure

N-total number of packets(including the extra packets) to be sent for one data packet .

Can this be applied here ?

p=1/5 = 0.2

N=1/1-0.2 = 1/0.8

for 9 packets , 9/0.8 = 11.25 ~ 12
thanks! now understood clearly
This applies to stop and wait only..

Some more variation in the given question 

Q - The question asked above is same, only the  window size is 4 instead of 3. So now how many transmissions will be there?

Ans - 21

1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8  
        9 10 11 12 13
          14 15 16 17
            18 19 20

Notice -->  Increasing window size may perform poor if the given link is faulty. 

Thank You  @Nashreen Sultana, @VS and @reena_kandari ji.


This might help ...

4 Answers

+14 votes
Best answer

Total 16 packet Transmission

answered by (189 points)
edited by
+38 votes

Since all packets are ready initially itself, we can assume a timeout is detected after all possible packets are sent. So, the sending happens as shown in figure (I draw the figure assuming 10 packets. For 9 packets answer will be 16).

answered by Veteran (355k points)
@VS for nashreen answer ,it is 20
Why are you not considering the window size as 3.

0 1 2 safely reached . And we switched to next window of size 3.

Now 3,4,5 are transmitted due to frame size 3 , now since frame 4 is lost , you need to retransmit frame 4 and 5 first then only you can switch to next window and transmit 6 ......

I don't know why you are switching to next window , even if the current window packet 4 has not reached safely?

How can you transmit 6.  ???????????

I am having doubt please clarify.
When 4th packet gets lost then the ACKs received for 5th and 6th packet are discarded. Are those ACKs, actually NAKs or ACKs with seq. no as 4( asking for 4th packet)?? Also, does the timeout occurs for the fourth packet's ACK?

@VS @Nashreen Sultana @reena_kandari for your question 

The question asked above is same, only the window size is 4 instead of 3. So now how many transmissions will be there?

Yes , For window size 4 answer will be 21 not 23,26,20
@Rajesh Pradhan Yes , Your statement is right . @Arjun Sir, There need small correction in Diagram however answer is right .

as per ur diagram from the beginning for the 5th and 6th numbered packet Receiver wont give Acknowledgement. Bcoz it will discard any out of order packet @time it is expecting for 4th numbered packet only.
Above statement is required for correction in Diagram . 

@RISHABH SHRIVAS, please Use small fonts rather than these large ones!! make the things more readable.

Sorry for that . Done :)
bad explanation...somehow ppl just find d answer widout clear explanation
@Sunita Please explain it better :)

@Rishabh Thanks, I'll add.
@Arjun Sir, Please give the solution considering SR protocol
+10 votes

16 is the answer

Q doesn't say that only after 3rd packet B will send theacknowledgement for 1st packet from A
So we can say

"All packets are ready and immediately available for transmission"

packet1 from A - Tranmit1
       acknowledgement (ack) for packet1(pckt) from B
packet2 from A - Transmit2
       ack for pckt2 from B
packet3 from A - Transmit3
       ack for pckt3 from B
packet4 from A - Transmit4
       ack for pckt4 from B
packet5 from A - Transmit 5          (packet5 lost, so no ack from B for pckt5)
packet6 from A - Transmit 1          (go back n, so no ack for pckt6 also)
packet7 from A - Transmit 2          (go back n, so no ack for pckt7 also)
                             Timeout for packet5
packet5 from A - Transmit 3
       ack for pckt5 from B
packet6 from A - Transmit 4
       ack for pckt6 from B
packet7 from A - Transmit 5         (packet7 lost, so no ack for pckt7)
packet8 from A - Transmit 1         (go back n, so no ack for pckt8 also)
packet9 from A - Transmit 2         (go back n, so no ack for pckt9 also)
                             Timeout for packet7
packet7 from A - Transmit 3
       ack for pckt7 from B
packet8 from A - Transmit 4
       ack for pckt8 from B
packet9 from A - Transmit 5         (packet9 lost, so no ack for pckt9)
                             Timeout for packet9
packet9 from A - Transmit 1
       ack for pckt9 from B

B now receives all 9 packets.
In total 16 transmits from station A

answered by Junior (731 points)
why are we having timeout for 5th packet only after 7th packet ?
What is the criteria for time out here?
Yes! Please explan time out criteria ?
window size = 3

so as per Q   5th packet is lost  implies till 4th packet transmission is fine and ACK is also received but 5th one is lost so current window status is 5th 6th 7th packet as window size is 3.  5th one lost so no ACK. so sender keeps waiting till timeout for ACK. After timeout retransmission takes place.   

GBN receiver window size one till 5th is received nothing goes forward
Means if window size is 'n' then wait for ack up to n packets and after that time out .
+6 votes

Hence 16 option C

answered by Loyal (6.6k 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

38,053 questions
45,543 answers
48,880 users