• Networking
  • Programming
  • DBMS
  • Operating System
  • Internet
  • Hardware
  • Software

Tech Differences

Know the Technical Differences

Difference Between Stop-and-Wait Protocol and Sliding Window Protocol

Stop-and-wait protocol vs Sliding window protocol Stop-and-wait protocol and Sliding window protocol are the methods evolved for handling the flow control of the network data transfers. These methods mainly differentiated by the techniques they follow such as stop-and-wait uses the concept of the acknowledging each data unit before sending another data unit. Conversely, sliding window protocol allows the transition of the several data units before sending an acknowledgement.

Among the two protocols, the sliding window protocol is more efficient than the stop-and-wait protocol.

Content: Stop-and-Wait Protocol Vs Sliding Window Protocol

    1. Comparison Chart
    2. Definition
    3. Key Differences
    4. Conclusion

Comparison Chart

Basis for comparisonStop-and-Wait ProtocolSliding Window Protocol
BehaviourRequest and replySimultaneous transmit
Number of transferrable framesOnly oneMultiple
EfficiencyLessMore comparatively
AcknowledgementSent after each arriving packetWindow of acknowledgement is maintained
Type of transmissionHalf duplexFull duplex
Propagation delayLongShort
Link utilisationPoorBetter

Definition of Stop-and-Wait Protocol

In a communication, if the speed of transmitting data at the sender end is very much higher than the speed of reception of data at the receiver end, how the network is going to deal with these kinds of cases? It requires the working speed of sender and receiver should be unvarying. The stop-and-wait protocol has emerged as a solution to this problem. In this protocol, the sender sends a frame then waits for the acknowledgement. When the receiver sends an acknowledgement to the sender, it proceeds further and sends another frame. stop-and-wait protocolThe transmission mode of the protocol is half duplex, as the sender transmits data to the receiver at a time and receiver sends the acknowledgement when data is received.

The example of the stop-and-wait protocol is the RPC (Remote Procedure Call) because it works in the similar pattern where the subroutine calls are implemented from the program in one device to the library routines on another device. As most programs are single-threaded, which make the sender wait for the reply before proceeding and sending other requests.

Definition of Sliding Window Protocol

Like stop-and-wait protocol, sliding window protocol is also a method to implement the flow control mechanism. It has eliminated the drawback of the stop-and-wait protocol where the restricted amount of data can be transmitted in one direction at a time. The performance of the sliding window protocol has improved by sending multiple frames bidirectionally at the same time (i.e., n>1, while stop-and-wait limits n to 1). In this scheme, the sender sends sequentially numbered frames to the recipient in order to keep track of the frames, if the header size is n bit the sequence can range from 0 to (2n-1).

The window here signifies a buffer utilised to store the data till the receiver does not read it, after reading the content the buffer is emptied. It uses two types of windows, sending window and receiving window which can range up to (2n-1). The sending window maintains the sequence number relating to the transmitted frames, and it is controlled at the sender’s end. sliding window sender's sideSimilarly, the receiver’s end also has a receiving window to keep track of the frames allowed to accept.sliding window receiver's side

The TCP protocol works as the sliding window protocol and uses a buffer placed in the kernel of the operating system.

Key Differences Between Stop-and-Wait Protocol and Sliding Window Protocol

  1. The stop-and-wait protocol follows a request and reply model. As against, in sliding window protocol, the frames are spontaneously transmitted for the specific window size.
  2. Only one frame is transmitted at a time in the stop-and-wait protocol while sliding window transmits more than one frame at a time.
  3. The efficiency of the sliding window protocol is more than the stop-and-wait protocol because it produces short propagation delay.
  4. Stop-and-wait protocol generates an acknowledgement at the receiver end after receiving each frame whereas the acknowledgement in the sliding window is produced after receiving a particular set of frames.
  5. The mode of transmission in the stop-and-wait protocol is the half duplex. On the contrary, it is full duplex in case of the sliding window.
  6. Sliding window protocol effectively utilises the link. In contrast, link utilisation in the stop-and-wait protocol is inferior.

Conclusion

Both of the protocols, stop-and-wait and sliding window protocol provides the mechanism for flow control. However, the performance of the sliding window protocol is better than stop-and-wait protocol because it makes effective utilisation of the bandwidth, while the stop-and-wait protocol wastes the network resources.

Related Differences:

  1. Difference Between Simplex, Half duplex and Full Duplex Transmission Modes
  2. Difference Between Stack and Queue
  3. Difference Between Flow Control and Error Control
  4. Difference Between Go-Back-N and Selective Repeat Protocol
  5. Difference Between sleep() and wait() Method in Java

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top 10 Differences

  • Difference Between OLTP and OLAP
  • Difference Between while and do-while Loop
  • Difference Between Guided and Unguided Media
  • Difference Between Preemptive and Non-Preemptive Scheduling in OS
  • Difference Between LAN, MAN and WAN
  • Difference Between if-else and switch
  • Difference Between dispose() and finalize() in C#
  • Difference Between for and while loop
  • Difference Between View and Materialized View
  • Difference Between Server-side Scripting and Client-side Scripting

Recent Addition

  • Difference Between Java and Python
  • Difference Between PHP and HTML
  • Difference Between GPS and GNSS 
  • Difference Between Virtualization and Containerization
  • Difference Between Storage and Memory

Categories

  • Artificial Intelligence
  • DBMS
  • Hardware
  • Internet
  • Networking
  • Operating System
  • Programming
  • Software

Copyright © 2025 · Tech Differences · Contact Us · About Us · Privacy