- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
A Simplex Stop-and-Wait Protocol for a Noisy Channel
Simplex Stop – and – Wait protocol for noisy channel is data link layer protocol for data communications with error control and flow control mechanisms. It is popularly known as Stop – and –Wait Automatic Repeat Request (Stop – and –Wait ARQ) protocol. It adds error control facilities to Stop – and – Wait protocol.
This protocol takes into account the facts that the receiver has a finite processing speed and that frames may get corrupted while transmission. If data frames arrive at the receiver’s end at a rate which is greater than its rate of processing, frames can be dropped out. Also, frames may get corrupted or entirely lost when they are transmitted via network channels. So, the receiver sends an acknowledgment for each valid frame that it receives. The sender sends the next frame only when it has received a positive acknowledgment from the receiver that it is available for further data processing. Otherwise, it waits for a certain amount of time and then resends the frame.
Sender Site − At the sender site, a field is added to the frame to hold a sequence number. If data is available, the data link layer makes a frame with the certain sequence number and sends it. The sender then waits for arrival of acknowledgment for a certain amount of time. If it receives a positive acknowledgment for the frame with that sequence number within the stipulated time, it sends the frame with next sequence number. Otherwise, it resends the same frame.
Receiver Site − The receiver also keeps a sequence number of the frames expected for arrival. When a frame arrives, the receiver processes it and checks whether it is valid or not. If it is valid and its sequence number matches the sequence number of the expected frame, it extracts the data and delivers it to the network layer. It then sends an acknowledgement for that frame back to the sender along with its sequence number.
Sender Site Algorithm of Simplex Stop – and – Wait Protocol for Noisy Channel
begin SeqNo = 0; // Initialise sequence number of outbound frame 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(); frame = Make_Frame(SeqNo); Store_Copy_Frame(frame.SeqNo); Send_Frame_To_Physical_Layer(frame.SeqNo); Start_Timer(frame.SeqNo); SeqNo = SeqNo + 1; canSend = False; else if ( Event(Acknowledgement_Arrival)) then Receive_ACK(); if ( ACK_No = SeqNo ) then Stop_Timer (frame.SeqNo); canSend = True; end if else if ( Event( Timer > Max_time)) then Resend_Frame_To_Physical_Layer(frame.SeqNo-1); Start_Timer(frame.SeqNo-1); end if end while end
Receiver Site Algorithm of Simplex Stop – and – Wait Protocol for Noisy Channel
begin RSeqNo = 0; // Initialise sequence number of expected frame while (true) //check repeatedly do Wait_For_Event(); //wait for arrival of frame if ( Event(Frame_Arrival) then Receive_Frame_From_Physical_Layer(); if ( Corrupted ( frame.SeqNo ) doNothing(); else if ( frame.SeqNo = RSeqNo ) then Extract_Data(); Deliver_Data_To_Network_Layer(); RSeqNo = RSeqNo + 1; end if Send_ACK(ACKframe[RSeqNo]); end if end while end
The following flow diagram depicts communication via simplex stop – and – wait ARQ protocol for noisy channel −
- A Simplex Stop-and-Wait Protocol for an Error-Free Channel
- Difference between Stop and Wait protocol and Sliding Window protocol
- A Utopian Simplex Protocol
- Explain difference between Stop and Wait protocol and Sliding Window protocol
- What is the Stop and Wait Protocol in Computer Network?
- Specify a stop wait timeout (date and time) in SAP HANA
- Difference between Stop and Wait, GoBackN and Selective Repeat protocols
- What are noiseless and noisy channels?
- Assumptions for Dynamic Channel Allocation
- Protocol and Protocol Hierarchies
- Difference between Fixed Channel Allocations and Dynamic Channel Allocations.
- When can we call wait() and wait(long) methods of a Thread in Java?
- Best practice to wait for a change with Selenium Webdriver?
- Wait for user input to start a sketch in Arduino
- How to wait for a goroutine to finish in Golang?