In the stop and wait protocol sender sends a data packet and waits for its acknowledgment and then transfers the next packet so here also the same transfer method will only be followed but the only thing which we need to take care of here in this question is that :
- the communication is bidirectional here
- in every data packet, the actual amount of data that will be transferred is 1500B – 40B = 1460B
So now we will find the number of packets required to carry 90000B is 90000B / 1460B = 61.64 packets which means 61 packets will carry 1460B of data and 62nd packet will carry 940B of data (excluding header).
The time to transmit one packet of 1500B is
(1500*8 )/ (100* 10^6) = 120 microseconds
Propagation time 5000 microseconds (given)
The transmission time of acknowledgment = 3.2 microseconds
Now 62nd packet acknowledgment time will be
(980*8) / (100* 10^6) = 7.84 microseconds
Now,
Total transmission time is [61( 120 + 2*5000+ 3.2) + (7.84 + 2*5000 + 3.2) ] = 627526.24 microsecond = 627.526 milliseconds = 628 ms approx.
Hope This Helps !!!