1. Flow Control :
It is an important function of the Data Link Layer. It refers to a set of procedures that tells the sender how much data it can transmit before waiting for acknowledgement from the receiver.
Purpose of Flow Control :
Any receiving device has a limited speed at which it can process incoming data and also a limited amount of memory to store incoming data. If the source is sending the data at a faster rate than the capacity of the receiver, there is a possibility of the receiver being swamped. The receiver will keep loosing some of the frames simply because they are arriving too quickly and the buffer is also getting filled up.
This will generate waste frames on the network. Therefore, the receiving device must have some mechanism to inform the sender to send fewer frames or stop transmission temporarily. In this way, flow control will control the rate of frame transmission to a value that can be handled by the receiver.
Example – Stop & Wait Protocol
2. Error Control :
The error control function of data link layer detects the errors in transmitted frames and re-transmit all the erroneous frames.
Purpose of Error Control :
The function of the error control function of the data link layer helps in dealing with data frames that are damaged in transit, data frames lost in transit, and the acknowledgement frames that are lost in transmission. The method used for error control is called Automatic Repeat Request which is used for the noisy channel.
Difference between Flow Control and Error Control :
|S.NO.||Flow control||Error control|
|1.||Flow control is meant only for the transmission of data from sender to receiver.||Error control is meant for the transmission of error free data from sender to receiver.|
|2.||For Flow control there are two approaches : Feedback-based Flow Control and Rate-based Flow Control.||To detect error in data, the approaches are : Checksum, Cyclic Redundancy Check and Parity Checking.|
To correct error in data, the approaches are : Hamming code, Binary Convolution codes, Reed-Solomon code, Low-Density Parity Check codes.
|3.||It prevents the loss of data and avoid over running of receive buffers.||It is used to detect and correct the error occurred in the code.|
|4.||Example of Flow Control techniques are : Stop&Wait Protocol and Sliding Window Protocol.||Example of Error Control techniques are : Stop&Wait ARQ and Slidng Window ARQ.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.