- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Stop and Wait protocol and Sliding Window protocol
Stop and Wait protocol is a protocol for flow control mechanism. In this protocol, the sender sends one frame at a time and waits for acknowledgment from the receiver. Once acknowledged, the sender sends another frame to the receiver.
Stop and Wait protocol is also a protocol for flow control mechanism. In this protocol, the sender sends multiple frames at a time and retransmits the frames which are found to be corrupted or damaged.
Read through this article to find out more about these two protocols and how they are different from each other.
What is Stop and Wait Protocol?
It is the most fundamental flow control strategy. The sender will send one frame at a time to the receiver in this manner. The transmitter will come to a halt and wait for the receiver to respond. The interval between sending a message and receiving an acknowledgment is known as the sender's waiting time, and the sender is idle during this time. After receiving an acknowledgment (ACK), the sender will send the next data packet to the receiver, and so on, as long as the sender has data to send.
Following are the benefits of using the Stop and Wait Protocol −
It's a breeze to put into action.
The precision of this technique is its key benefit. Only once the first frame has been acknowledged is the second frame delivered. As a result, there is no risk of losing any frames.
Following are the drawbacks of the Stop and Wait Protocol −
At any given time, only one packet can be despatched.
The propagation delay will be greater than the transmission delay if the distance between the sender and the receiver is excellent. As a result, efficiency would plummet.
After each communication, the sender must wait for an acknowledgment, adding time to the total transmission duration. This slows down the transmission process.
What is Sliding Window Protocol?
When employing the Data Link Layer (OSI model) or Transmission Control Protocol, the sliding window regulates sent data packets between two network computers where reliable and sequential delivery of data packets is required (TCP).
Each data packet (for most data connection layers) and byte (in TCP) in the sliding window approach includes a unique sequential sequence number, which the receiving computer uses to place data in the correct order. The sliding window technique aims to eliminate duplicate data and request missing data by using sequence numbers.
The sliding window technique restricts the amount of data packets that can be sent before waiting for a response from the receiving machine. The window size is the number of data packets. Window sizes are limited by the rate at which the receiving computer can process data packets and the buffer capacity of its memory.
Difference between Stop and Wait Protocol and Sliding Window Protocol
The following table highlights the major differences between the Stop and Wait Protocol and the Sliding Window Protocol −
|Key||Stop and Wait protocol||Sliding Window protocol|
|Mechanism||In the Stop and Wait protocol, the sender sends a single frame and waits for acknowledgment from the receiver.||In the Sliding Window protocol, the sender sends multiple frames at a time and retransmits the damaged frames.|
|Efficiency||Stop and Wait protocol is less efficient.||Sliding Window protocol is more efficient than Stop and Wait protocol.|
|Window Size||Sender's window size in Stop and Wait protocol is 1.||Sender's window size in Sliding Window protocol varies from "1 to n".|
|Sorting||The frames do not need to be sorted.||Sorting of frames helps improve the efficiency of the protocol.|
|Efficiency||Stop and Wait protocol efficiency is formulated as 1/(1+2a) where "a" is ratio of propagation delay vs transmission delay.||Sliding Window protocol efficiency is formulated as N/(1+2a) where N is no. of window frames and a is ratio of propagation delay vs transmission delay.|
|Duplex||Stop and Wait protocol is half duplex in nature||Sliding Window protocol is full duplex in nature.|
Both these protocols provide a mechanism for flow control, however the Sliding Window Protocol is more efficient than the Stop and Wait Protocol. There is less propagation delay in Sliding Window because the sender can transmit multiple frames spontaneously, as opposed to Stop and Wait protocol, where the sender can transmit only one frame at a time and then wait for the acknowledgement before transmitting a second frame.
- Related Articles
- Sliding Window Protocol
- Sliding Window Protocol (Selective Repeat)
- A One-Bit Sliding Window Protocol
- What is three-bit sliding window protocol?
- A Simplex Stop-and-Wait Protocol for a Noisy Channel
- What is the Stop and Wait Protocol in Computer Network?
- A Simplex Stop-and-Wait Protocol for an Error-Free Channel
- What is a Sliding Window Protocol in Computer Network?
- Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
- Protocol and Protocol Hierarchies
- Difference between Stop and Wait, GoBackN and Selective Repeat protocols
- Difference Between Go-Back-N and Selective Repeat Protocol
- What is difference between GET and POST method in HTTP protocol?
- What are the differences between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP)?
- What is protocol graph? Compare the network interface and protocol