Open In App

Difference between Stop and Wait protocol and Sliding Window protocol

Introduction:

Both Stop and Wait protocol and Sliding Window protocol are the techniques to the solution of flow control handling. The main difference between Stop-and-wait protocol and Sliding window protocol is that in Stop-and-Wait Protocol, the sender sends one frame and wait for acknowledgement from the receiver whereas in sliding window protocol, the sender sends more than one frame to the receiver and re-transmits the frame(s) which is/are damaged or suspected. 

Stop-and-Wait Protocol:

Stop-and-Wait is a simple protocol used for transmitting data between two devices over a communication channel. In this protocol, the sender sends a packet of data to the receiver and then waits for the receiver to acknowledge the packet before sending the next packet. The receiver sends an acknowledgement to the sender indicating that the packet has been received and is error-free.

 Features :

Sliding Window Protocol:

The Sliding Window protocol is a more efficient protocol for data transmission than the Stop-and-Wait protocol. It uses a window size to control the number of packets that can be transmitted without acknowledgement. The sender can transmit multiple packets within the window size before waiting for an acknowledgement from the receiver.

Features:

Similarities:

Difference between Stop and Wait protocol and Sliding Window protocol:

S.NO Stop-and-Wait Protocol Sliding Window Protocol
1. In Stop-and-Wait Protocol, sender sends one frame and wait for acknowledgment from receiver side. In sliding window protocol, sender sends more than one frame to the receiver side and re-transmits the frame(s) which is/are damaged or suspected.
2. Efficiency of Stop-and-Wait Protocol is worse. Efficiency of sliding window protocol is better.
3. Sender window size of Stop-and-Wait Protocol is 1. Sender window size of sliding window protocol is N.
4. Receiver window size of Stop-and-Wait Protocol is 1. Receiver window size of sliding window protocol may be 1 or N.
5. In Stop-and-Wait Protocol, sorting is not necessary. In sliding window protocol, sorting may be or may not be necessary.
6.

Efficiency of Stop-and-Wait Protocol is

1/(1+2*a)

Efficiency of sliding window protocol is

N/(1+2*a)
7. Stop-and-Wait Protocol is half duplex. Sliding window protocol is full duplex.
8. Stop-and-Wait Protocol is mostly used in low speed and error free network. Sliding window protocol is mostly used in high speed and error-prone network.
9. In Stop-and-Wait Protocol, the sender cannot send any new frames until it receives an acknowledgment for the previous frame. In sliding window protocol, the sender can continue to send new frames even if some of the earlier frames have not yet been acknowledged.
10. Stop-and-Wait Protocol has a lower throughput as it has a lot of idle time while waiting for the acknowledgment. Sliding window protocol has a higher throughput as it allows for continuous transmission of frames.

Conclusion:
 Stop and Wait protocol and Sliding Window protocol are two different protocols used in data communications to ensure reliable transmission of data over a network. Stop and Wait protocol is a simple protocol that transmits data one packet at a time and waits for an ACK before transmitting the next packet. Sliding Window protocol is a more complex protocol that allows multiple packets to be transmitted simultaneously without waiting for an ACK for each packet. Sliding Window protocol is more efficient and faster compared to Stop and Wait protocol and is preferred for high-speed data transmission over a network.

Article Tags :