Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE) PDF Download

Data Link Layer is responsible for reliable point-to-point data transfer over a physical medium. To implement this data link layer provides three functions :

  • Line Discipline
    Line discipline is the functionality used to establish coordination between link systems. It decides which device sends data and when.
  • Flow Control
    Flow control is an essential function that coordinates the amount of data the sender can send before waiting for acknowledgment from the receiver.
  • Error Control
    Error control is functionality used to detect erroneous transmissions in data frames and retransmit them. 


Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

Flow control is a set of procedures that restrict the amount of data a sender should send before it waits for some acknowledgment from the receiver.

  • Flow Control is an essential function of the data link layer.
  • It determines the amount of data that a sender can send.
  • It makes the sender wait until an acknowledgment is received from the receiver’s end.
  • Methods of Flow Control are Stop-and-wait , and Sliding window.


Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

Purpose of Flow Control

  • The device on the receiving end has a limited amount of memory (to store incoming data) and limited speed (to process incoming data). The receiver might get overwhelmed if the rate at which the sender sends data is faster or the amount of data sent is more than its capacity.
  • Buffers are blocks in the memory that store data until it is processed. If the buffer is overloaded and there is more incoming data, then the receiver will start losing frames.
  • The flow control mechanism was devised to avoid this loss and wastage of frames. Following this mechanism, the receiver, as per its capacity, sends an acknowledgment to send fewer frames or temporarily halt the transmission until it can receive again.
  • Thus, flow control is the method of controlling the rate of transmission of data to a value that the receiver can handle.

Methods to Control the Flow of Data

Stop-and-wait Protocol

Stop-and-wait protocol works under the assumption that the communication channel is noiseless and transmissions are error-free.

Working:

  • The sender sends data to the receiver.
  • The sender stops and waits for the acknowledgment.
  • The receiver receives the data and processes it.
  • The receiver sends an acknowledgment for the above data to the sender.
  • The sender sends data to the receiver after receiving the acknowledgment of previously sent data.
  • The process is unidirectional and continues until the sender sends the End of Transmission (EoT) frame.

Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

Sliding Window Protocol

The sliding window protocol is the flow control protocol for noisy channels that allows the sender to send multiple frames even before acknowledgments are received. It is called a Sliding window because the sender slides its window upon receiving the acknowledgments for the sent frames.

Working:

  • The sender and receiver have a “window” of frames. A window is a space that consists of multiple bytes. The size of the window on the receiver side is always 1.
  • Each frame is sequentially numbered from 0 to n - 1, where n is the window size at the sender side.
  • The sender sends as many frames as would fit in a window.
  • After receiving the desired number of frames, the receiver sends an acknowledgment. The acknowledgment (ACK) includes the number of the next expected frame.

Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

  1. The sender sends the frames 0 and 1 from the first window (because the window size is 2).

  2. The receiver after receiving the sent frames, sends an acknowledgment for frame 2 (as frame 2 is the next expected frame).

  3. The sender then sends frames 2 and 3. Since frame 2 is lost on the way, the receiver sends back a “NAK” signal (a non-acknowledgment) to inform the sender that frame 2 has been lost. So, the sender retransmits frame 2.

Error Control is a combination of both error detection and error correction. It ensures that the data received at the receiver end is the same as the one sent by the sender.

Error detection is the process by which the receiver informs the sender about any erroneous frame (damaged or lost) sent during transmission.

Error correction refers to the retransmission of those frames by the sender.
Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

Purpose of Error Control

Error control is a vital function of the data link layer that detects errors in transmitted frames and retransmits all the erroneous frames. Error discovery and amendment deal with data frames damaged or lost in transit and the acknowledgment frames lost during transmission. The method used in noisy channels to control these errors is ARQ or Automatic Repeat Request.

Categories of Error Control

Stop-and-wait ARQ

  • In the case of stop-and-wait ARQ after the frame is sent, the sender maintains a timeout counter.
  • If acknowledgment of the frame comes in time, the sender transmits the next frame in the queue.
  • Else, the sender retransmits the frame and starts the timeout counter.
  • In case the receiver receives a negative acknowledgment, the sender retransmits the frame.


Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

Sliding Window ARQ

To deal with the retransmission of lost or damaged frames, a few changes are made to the sliding window mechanism used in flow control.

Go-Back-N ARQ :

In Go-Back-N ARQ, if the sent frames are suspected or damaged, all the frames are re-transmitted from the lost packet to the last packet transmitted.Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

Selective Repeat ARQ:

Selective repeat ARQ/ Selective Reject ARQ is a type of Sliding Window ARQ in which only the suspected or damaged frames are re-transmitted.Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

Difference Between Flow Control & Error Control

                             Flow Control                             Error Control
  • Flow control refers to the transmission of data from sender to receiver.

 

  • Error control refers to the transmission of error free and reliable data frames from sender to receiver.

Approaches For Flow Control:

  • Feedback Based flow control
  • Rate Based Flow control
Approaches for error detection are 
  • check sum 
  • cyclic redundancy check 
  • parity checking.  
Approaches for error correction are 
  • Hamming code
  •  Binary Convolution codes
  • Reed-Solomon code,
  • Low-Density Parity-Check codes. 
  • Flow Control Focuses to the proper flow of data and prevention of data losses.
  •  Error Control Focusses on detection and correction of error.
Examples of Flow control technique are
1.Stop and Wait protocol
2.Sliding Window Protocol
Example of Error Control
1.Stop and wait for ARQ
2.Slidingf window  ARQ
The document Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Computer Networks.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
21 videos|107 docs|66 tests

Up next

FAQs on Flow & Error Control Technique - Computer Networks - Computer Science Engineering (CSE)

1. What is flow control in networking?
Ans. Flow control in networking is a technique used to manage the flow of data between two devices to ensure that the sender does not overwhelm the receiver with too much data, leading to potential data loss or congestion.
2. What are the different types of flow control techniques?
Ans. The different types of flow control techniques include stop-and-wait, sliding window, and selective repeat. Stop-and-wait involves sending one data packet at a time and waiting for an acknowledgment before sending the next packet. Sliding window allows for multiple packets to be sent without waiting for acknowledgment. Selective repeat retransmits only the packets that have been lost or damaged.
3. How does error control help in data transmission?
Ans. Error control techniques help ensure the accuracy and integrity of data transmitted over a network by detecting and correcting errors that may occur during transmission. This helps in preventing data loss, corruption, or duplication.
4. What is the difference between flow control and error control?
Ans. Flow control regulates the flow of data between devices to prevent congestion, while error control focuses on detecting and correcting errors in the data transmission process. Flow control manages the speed of data transfer, while error control ensures data integrity.
5. Why is flow and error control important in networking?
Ans. Flow and error control are crucial in networking to ensure efficient and reliable data transmission. Flow control prevents data overload and congestion, while error control detects and corrects errors to maintain data integrity and accuracy. These techniques help optimize network performance and prevent data loss.
21 videos|107 docs|66 tests
Download as PDF

Up next

Explore Courses for Computer Science Engineering (CSE) exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

,

practice quizzes

,

shortcuts and tricks

,

Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

,

past year papers

,

Objective type Questions

,

Previous Year Questions with Solutions

,

pdf

,

Semester Notes

,

Sample Paper

,

ppt

,

mock tests for examination

,

Free

,

MCQs

,

study material

,

Summary

,

Extra Questions

,

Flow & Error Control Technique | Computer Networks - Computer Science Engineering (CSE)

,

Important questions

,

Viva Questions

,

video lectures

,

Exam

;