

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.As against, in sliding window protocol, the frames are spontaneously transmitted for the specific window size. The stop-and-wait protocol follows a request and reply model.Key Differences Between Stop-and-Wait Protocol and Sliding Window Protocol The TCP protocol works as the sliding window protocol and uses a buffer placed in the kernel of the operating system.

Similarly, the receiver’s end also has a receiving window to keep track of the frames allowed to accept. The sending window maintains the sequence number relating to the transmitted frames, and it is controlled at the sender’s end. It uses two types of windows, sending window and receiving window which can range up to (2 n-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. 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 (2 n-1). 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). 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. Like stop-and-wait protocol, sliding window protocol is also a method to implement the flow control mechanism. As most programs are single-threaded, which make the sender wait for the reply before proceeding and sending other requests. 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. The 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. When the receiver sends an acknowledgement to the sender, it proceeds further and sends another frame. In this protocol, the sender sends a frame then waits for the acknowledgement. The stop-and-wait protocol has emerged as a solution to this problem. 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.
