In: Computer Science
Host A wants to send 15 frames to Host B using Selective repeat protocol. How many numbers of frames are transmitted by Host A if every 8th packet is lost or corrupted?
For selective repeat:-
Lets assume sequence number for 15 frames are:-
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
But every 8th packet will have to be retransmitted because either it gets lost or corrupted. Now,
0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 14
Start count from 1 and count up to 8 for every sequence number increase count by 1. First 8th packet will be sequence number 7 which gets lost, so retransmit it. Again start count from 1 and count up to 8, this time sequence number 14th will be the 8th packet which will get lost, so retransmit it. Total number of retransmission will be,
n = 15 + 2 (retransmissions)
n = 17.
For Go Back 3:-
Lets assume sequence number for 15 frames are:-
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
In Go Back 3 protocol, we transmit packets in group size of 3,
First it will send sequence number 0 1 2, which will get accepted.
when it will recieve 0's ack, it will send 3 and when it will recieve 1's ack it will send 4 like wise it will send 7 packets upto sequence number 6 which will get acks, but when it will send 8th packet of sequence number 7, it gets lost and at this moment of time sender side window will be pointing to the packets of sequence numbers 7, 8, 9. So it will retransmit 7, 8, 9, total transmission up to this momet will be 10+3 = 13, where 10 are first 10 (from seq number 0-9) transmission and 3 are retrasnmission (from seq number 7-9) after lost of packet of sequence number 7, Now from here next 8th packet will be the packet with sequence number 14 which will get lost, for that it will do one more retransmission now total transmissions are,
n = 13 + 5 + 1
n = 19.