What is meant by simplex stop and wait protocol?
In order to create noise free data communication, the simplex stop and wait protocol proves to be an ideal mechanism.
This protocol follows yeh flow control mechanism which also includes the sliding window approach.
Stop and wait protocol also consists of Auto Repeat Request protocol that efficiently manages and facilitates the mechanism of error control.
Flow control mechanism considers the fact that the recipient of the data only has a finite amount of processing speed that may affect the transmission of data.
That is why the stop and wait protocol states a one way communication. This means that the senders will only be able to send one package of data at a single time and that too only after they receive confirmation from the receiver’s end.
Finding this process difficult to understand? Check out the entire blog and you’ll have to look no further to learn more about this protocol.
What do you mean by Stop and Wait protocol?
The stop and wait protocol is associated with flow control mechanisms. Which is why, it is important to learn about flow control mechanisms first!
This mechanism makes sure that the data is received in the same exact manner as it was sent by the sender.
This mechanism is further categorised into two different categories namely the Stop and Wait protocol and the Sliding Window.
This section discusses the stop and wait protocol. The stop and wait process basically means that once the sender transfers the data, they will have to wait for a confirmation from the receiver. This process basically controls the flow of data.
Here the flow control is a part of the services from the data link layer, a good example for this can be observed in the advantages of linked lists. It is the data link layer that manages the transmission of data from the noiseless channels.
The whole protocol is based on the system of unidirectional data transmission. This essentially means that at a single time, the data can be transmitted only once, i.e while the sender is sending the message, the receiver would not be able to reply back at the same time via this channel.
You can think of this process as email services. Once an email is sent to the recipient, only then the receiver will be able to reply back to the email or thread.
Keep in mind that the flow control mechanism is not responsible for controlling the error. This means that the error control mechanism is not a part of the stop and wait protocol.
The basic idea behind this mechanism is that once the sender shares a piece of information, they have to wait for a confirmation from the receiver before sending more information.
This means that there are certain rules and conditions that are required to be fulfilled by the system to implement the stop and wait protocol, check them out in the next portion of this blog.
What are the conditions for the Stop and Wait protocol?
In order to get an understanding of the conditions for the stop and wait process, learn about the sender’s side first and later about the receiver’s.
The sender’s side
- The sender will start with sharing only a single packet of data at a time
- The next data packet will only be sent once the sender has received some form of confirmation from the receiver about the previously sent data packet
This essentially means that the process of transmitting data by the sender is extremely simple. They will follow the rule of one data packet at a single time and wait for the acknowledgement from the receiver.
Now, let us have a look at the receiver’s end.
The receiver’s side
- The receiver has to receive and consume the transferred data packet
- After consuming the data packet, the receiver will then have to send the confirmation to the sender that the packet has been received
This means that the process at even the receiver’s end is also extremely simple. All they have to do is receive and consume the data packet. They will finally send the confirmation to the sender that the data packet has been received securely.
This process is basically referred to as the flow control mechanism. So, those were the conditions and essentially the entire working mechanism of the stop and wait protocol.
Now, since this protocol is not free from any errors as it has been previously discussed, check out some of the disadvantages of the stop and wait process.
What are some disadvantages of the Stop and Wait protocol?
There are a few disadvantages of the stop and wait protocol that occurs in the system while the data is being transferred. Check them out as follows:
- Problems of data loss
If the data sent by the sender somehow gets lost in the process, the receiver will be left waiting for the package forever while on the other hand, the sender will be waiting for the confirmation forever.
This problem gives birth to two additional problems such as:
- The sender waiting for an infinite amount of time for the confirmation
- The receiver also waiting for an infinite amount of time for the package
- Problems of not receiving any confirmation
Now receiving any sort of confirmation does not mean that the confirmation was not sent by the receiver altogether.
This only means that the confirmation sometimes gets lost in the process which means that the sender gets caught in an infinite loop of waiting for the confirmation.
Also, until the confirmation is received, the sender will not be able to send another package which means that in this case only a single problem occurs in the program:
- The sender has to wait for an infinite amount of time to receive the confirmation from the receiver
Wrapping Up
The stop and wait protocol is also used in certain areas of programming that you might not be aware of till now. You can look up advantages of linked lists to learn more about the stop and wait protocol and its usage in programming.
This protocol basically defines the flow of data from one device to the other.
It also describes how the sender and the receivers interact over the transfer and reception of messages using the flow control protocol.