Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
A Simplex Stop-and-Wait Protocol for an Error-Free Channel
Stop-and-Wait protocol is a data link layer protocol for transmission of frames over noiseless channels. It provides unidirectional data transmission with flow control facilities but without error control facilities.
This protocol takes into account the fact that the receiver has a finite processing speed. If data frames arrive at the receiver's end at a rate greater than its processing rate, frames will be dropped. To avoid this, the receiver sends an acknowledgement for each frame upon arrival. The sender transmits the next frame only after receiving a positive acknowledgement confirming the receiver is ready for further data processing.
How It Works
-
Sender Site − The data link layer waits for the network layer to provide a data packet. It checks whether it can send the frame, and if the physical layer gives positive notification, it creates frames from the data and sends them. It then waits for acknowledgement before sending the next frame.
-
Receiver Site − The data link layer waits for a frame to arrive. When it arrives, the receiver processes it, delivers it to the network layer, and sends an acknowledgement back to the sender.
Sender Site Algorithm
begin
canSend = True; //Allow the first frame to be sent
while (true) //check repeatedly
do
Wait_For_Event(); //wait for availability of packet
if ( Event(Request_For_Transfer) AND canSend) then
Get_Data_From_Network_Layer();
Make_Frame();
Send_Frame_To_Physical_Layer();
canSend = False;
else if ( Event(Acknowledgement_Arrival)) then
Receive_ACK();
canSend = True;
end if
end while
end
Receiver Site Algorithm
begin
while (true) //check repeatedly
do
Wait_For_Event(); //wait for arrival of frame
if ( Event(Frame_Arrival)) then
Receive_Frame_From_Physical_Layer();
Extract_Data();
Deliver_Data_To_Network_Layer();
Send_ACK();
end if
end while
end
Advantages and Disadvantages
| Advantages | Disadvantages |
|---|---|
| Simple implementation and flow control | Low bandwidth utilization due to waiting |
| Prevents receiver buffer overflow | No error detection or correction |
| Reliable for error-free channels | Inefficient for high-speed networks |
Conclusion
The Simplex Stop-and-Wait protocol provides basic flow control for error-free channels by ensuring the sender waits for acknowledgement before transmitting the next frame. While simple and reliable, it suffers from low bandwidth utilization due to the mandatory wait time between transmissions.
