Open In App

Stop and Wait ARQ

Stop and Wait ARQ is a Sliding Window Protocol method used for the reliable delivery of data frames. The stop-and-wait ARQ is used for noisy channels or links to handle flow and error control between sender and receiver. The Stop and Wait ARQ protocol sends a data frame and then waits for an acknowledgment (ACK) from the receiver.

What is Stop and Wait ARQ?

The Stop and Wait ARQ protocol sends a data frame and then waits for an acknowledgment (ACK) from the receiver. The ACK indicates that the receiver successfully received the data frame. After receiving the ACK from the receiver, the sender delivers the next data frame. So there is a stop before the next data frame is transferred, hence it is known as the Stop and Wait ARQ protocol.



Characteristics of Stop and Wait ARQ

Useful Terms in Stop and Wait Protocol

Propagation Delay = (Distance between routers) / (Velocity of propagation)

Simple Stop and Wait

At Sender

At Receiver



Problems Associated with Stop and Wait

1. Lost Data 

Assume the sender transmits the data packet and it is lost. The receiver has been waiting for the data for a long time. Because the data is not received by the receiver, it does not transmit an acknowledgment. The sender does not receive an acknowledgment, it will not send the next packet. This problem is caused by a loss of data.  

2. Lost Acknowledgement

Assume the sender sends the data, which is also received by the receiver. The receiver sends an acknowledgment after receiving the packet. In this situation, the acknowledgment is lost in the network. The sender does not send the next data packet because it does not receive acknowledgement, under the stop and wait protocol, the next packet cannot be transmitted until the preceding packet’s acknowledgment is received.  

3. Delayed Acknowledgement/Data

Assume the sender sends the data, which is also received by the receiver. The receiver then transmits the acknowledgment, which is received after the sender’s timeout period. After a timeout on the sender side, a long-delayed acknowledgement might be wrongly considered as acknowledgement of some other recent packet. 
 

Stop and Wait for ARQ (Automatic Repeat Request)

The above 3 problems are resolved by Stop and Wait for ARQ (Automatic Repeat Request) that does both error control and flow control. 

1. Time Out

Timeout refers to the duration for which the sender waits for an acknowledgment (ACK) from the receiver after transmitting a data packet. If the sender does not receive an ACK within this timeout period, it assumes that the frame was lost or corrupted and retransmits the frame.

2. Sequence Number (Data) 

In Stop-and-Wait ARQ, the sender assigns sequence numbers to each data frame it sends. This allows the receiver to identify and acknowledge each frame individually, ensuring reliable delivery of data packets. After sending a frame, the sender waits for an acknowledgment before sending the next frame. 

3. Sequence Number(Acknowledgement)

Similarly, sequence numbers are also used in acknowledgments (ACKs) sent by the receiver to acknowledge received data frames. When the receiver successfully receives a data frame, it sends an ACK back to the sender, indicating the sequence number of the next expected frame. The sender uses this ACK to determine whether the transmission was successful and whether it can proceed to send the next frame. 

Working of Stop and Wait for ARQ

Characteristics of Stop and Wait ARQ

Constraints in Stop and Wait ARQ

Stop and Wait ARQ has very less efficiency , it can be improved by increasing the window size. Also , for better efficiency , Go back N and Selective Repeat Protocols are used. The Stop and Wait ARQ solves the main three problems but may cause big performance issues as the sender always waits for acknowledgement even if it has the next packet ready to send. Consider a situation where you have a high bandwidth connection and propagation delay is also high (you are connected to some server in some other country through a high-speed connection). To solve this problem, we can send more than one packet at a time with a larger sequence number. We will be discussing these protocols in the next articles. So Stop and Wait ARQ may work fine where propagation delay is very less for example LAN connections but performs badly for distant connections like satellite connections. 

Advantages of Stop and Wait ARQ

Disadvantages of Stop and Wait ARQ

Question For Practice

Question: Suppose two hosts are connected by a point-to-point link and they are configured to use Stop and Wait protocol for reliable data transfer. Identify in which one of the following scenarios, the utilization of the link is the lowest. [GATE CS/IT 2023]

(A) Longer link length and lower transmission rate

(B) Longer link length and higher transmission rate

(C) Shorter link length and lower transmission rate

(D) Shorter link length and higher transmission rate

Solution: Correct option is (B)

Explaination- Given that, point-to-point link with stop-and-wait protocol for transferring data. To reach the data to N from M  we will look out that M should transmit the data speedily and it should reach N fastly. In that case, only the utilization of links is best. Therefore lower transmission from M . Longer link length between M and N obviously leads to lower utilization of the link compare to other options. 

Frequently Asked Question on Stop and Wait ARQ – FAQs

When is Stop-and-Wait ARQ used?

This ensures that the data is received in the correct order and prevents data corruption. Stop and Wait ARQ can be used for flow control, with the receiver controlling the rate at which the sender delivers data.

What is the efficiency of the Stop-and-Wait ARQ?

Stop and Wait ARQ has low efficiency because it needs the sender to wait for an acknowledgement from the receiver before sending the next data packet. This causes a low data transfer rate .

Stop-and-Wait ARQ operates at which Layer?

Stop and Wait ARQ operates at Data Link Layer of the OSI Model.


Article Tags :