Stop and Wait protocol is a data link layer protocol for transmission of data over noiseless channels. It is a flow control protocol used in noiseless channels.
Features:
- Uni Directional data transmission with flow control. This means that data is either sent or received at a time. Both sending and receiving won’t happen at the same time.
- No error control facilities.
- After transmitting one frame, the sender waits for an acknowledgement before transmitting the next frame.
Working:
Sender Side:
The sender sends only 1 data packet at a time. The sender would wait for acknowledgement of the packet sent. It would send the next packet only after receiving acknowledgement for the previous package.
Receiver Side:
The receiver receives and consumes the data packet. After consuming packet, it sends acknowledgement back to the sender.
Disadvantages
Stop and Wait is a primitive protocol which has a lot of limitations. Let’s see what some of it’s major problems are:
1) Problems due to lost data
In this protocol the time the sender waits for the acknowledgement is not limited. Therefore, in case if a packet gets lost in transmission, the sender waits for acknowledgement for infinite amount of time while the receiver waits for the packet for an infinte amount of time.
2) Problems due to lost acknowledgement
Similarly if the acknowledgement gets lost, sender waits for acknowledgement for an infinite amount of time.
Stop and Wait Protocol is a basic and primitive. It is not widely used in modern days. But it is important to understand as it forms the theoretical basis for other protocols. Stop and Wait ARQ is an important protocol that uses this.