***Welcome to ashrafedu.blogspot.com * * * This website is maintained by ASHRAF***

Tuesday, November 3, 2020

Stop & Wait ARQ (Automatic Repeat Request)

Stop & Wait ARQ is a sliding window protocol for flow control and it overcomes the limitations of Stop & Wait.

Stop & Wait ARQ assumes that the communication channel is noisy (Stop & Wait assumed that the communication channel is not noisy). Stop & Wait ARQ also assumes that errors may occur in the data while transmission.

Stop & Wait ARQ is a 1-bit sliding window protocol where the size of the sender window as well as the receiver window is 1. Thus, in Stop & Wait ARQ technique, the minimum number of sequence numbers required is equal to the sum of sender window size & receiver window size.

minimum number of sequence numbers required = sender window size + receiver window size.

Thus, the minimum number of sequence numbers required in Stop & Wait ARQ is 2, which are 0 and 1.

Stop & Wait ARQ overcomes the problem of a lost data packet. For solving this problem, time out timer is used, after transmitting the data packet to the receiver through the communication channel; the sender starts the time out timer. Now if the data packet's ACK is received by the sender before the timer expires, then the sender stops the timer and transmits the next data packet.

And if the time out timer expires and the ACK is not received by the sender then, the sender retransmits the data packet. This prevents the occurrence of deadlock in the network.


The problem of delayed/lost ACK (which used to happen in Stop & Wait protocol) is solved by putting sequence numbers on data packets.

If the ACK given by the receiver is lost, then the sender resends the same data packet after its timer expires. This prevents the occurrence of deadlock. The sequence number on the data packets helps the receiver to identify the duplicate data packet; the receiver discards the duplicate data packet & resends the same ACK.


Whenever a data packet is damaged/corrupted, the receiver then sends negative acknowledgement (NAK) to the sender and then it resends the same data packet.



The Stop & Wait ARQ is very less efficient because the sender window size is 1, which allows the sender to keep only one frame without ACK. So, the sender sends a data packet and waits for the ACK, and it gets the feedback it sends another data packet.

The following comparison table states the differences between the two protocols-

Stop and Wait Protocol

Stop and Wait ARQ

It assumes that the communication channel is perfect and noise free.

It assumes that the communication channel is imperfect and noisy.

Data packet sent by the sender can never get corrupt.

Data packet sent by the sender may get corrupt.

There is no concept of negative acknowledgements.

A negative acknowledgement is sent by the receiver if the data packet is found to be corrupt.

There is no concept of time out timer.

Sender starts the time out timer after sending the data packet.

There is no concept of sequence numbers.

Data packets and acknowledgements are numbered using sequence numbers.







No comments:

Post a Comment