Flow control and error control are the control mechanism at data link and transport level. Each time it sends data to the receiver, these two mechanisms help to correctly deliver reliable data to the receiver. The main difference between flow control and error checking is control of the flow observes the correct flow of data from the sender to the receiver, on the other hand, the error checking notes that the data sent to the receiver is error-free and reliable. We study the difference between flow control and error control with a comparison table.
|Basic||Flow control intended for the correct transmission of data from the sender to the recipient.||Error checking designed to provide error-free data to the receiver.|
|Approach||Feedback-based flow control and speed-based flow control are the approaches to get the correct flow control.||Parity checking, cyclic redundancy code (CRC) and checksum are the approaches to detect data error. Hamming code, binary convolution codes, Reed-Solomon code, low density parity control codes are the approaches to correct data error.|
|shock||avoid overload of the receiver buffer and prevent data loss.||Detects and corrects the data error.|
Definition of flow control
Flow control is a design issue at the data link and transport layer level. A sender sends data frames faster than the receiver can accept. The reason may be that a sender is running on a powerful machine. In this case, the data is also received without errors; the receiver cannot receive the frame at this speed and loses some frames. There are two control methods to prevent frame loss, feedback-based flow control and speed-based flow control.
Control based on feedback
In feedback-based control, each time the sender sends data to the receiver, the receiver then sends the information to the sender and allows the sender to send more data or inform the sender how the receiver is doing. Feedback-based control protocols are the sliding window protocol, the stop-and-wait protocol.
Flow-based speed control
In frequency-based flow control, when a sender transmits data faster to the receiver and the receiver is unable to receive data at that speed, then the mechanism built into the protocol will limit the speed at which data is transmitted by the sender without no feedback from the receiver.
Definition of error checking
Error checking the problem that also occurs at the level of data connection and transport level. Error Control a mechanism to detect and correct the error occurring in the frames delivered by the sender to the recipient. The error that occurs in the frame can be a single bit error or burst error. The single-bit error occurs only in the one-bit data unit of the frame, where 1 changed to 0 or 0 changed to 1. The burst error is the case in which more than one bit is changed in the frame; also refers to the package level error. In the event of a burst error, errors such as packet loss, frame duplication, loss of the acknowledgment packet, etc. can also occur. The methods for detecting the error in the frame are the parity check, the cyclic redundancy code (CRC) and the checksum.
In parity checking, a single bit is added to the frame indicating whether the number of "1" bits contained in the odd or even frame. During transmission, if a single bit is changed, the parity bit also receives a change that reflects the error in the frame. But the parity checking method is not reliable as if the even number of bits had changed, so the parity bit does not reflect any error in the frame. However, better for a single-bit error.
Cyclic Redundancy Code (CRC)
In Cyclic Redundancy Code the data is subjected to a binary division regardless of the rest obtained, attached to the data and sent to the recipient. The receiver then divides the data obtained with the same divisor with which the sender has divided the data. If the rest is zero, the data is accepted. Otherwise the data is rejected and the sender must retransmit the data again.
In the checksum method, the data to be sent is divided into equal fragments for each fragment containing n bits. All the fragments are added using the complement of 1. The result completed once again, and now the obtained series of bits is called checksum which is attached with the original data to be sent and sent to the recipient. When the receiver receives the data, it also divides the data into equal fragments, then adds all the fragments using the complement to 1; the result completed again. If the result is zero, the data is accepted, otherwise it is rejected and the sender must retransmit the data.
The error obtained in the data can be corrected using methods such as Hamming code, binary convolution codes, Reed-Solomon code, low density parity control codes.
Key differences between flow control and error control
- Flow control consists of monitoring the correct transmission of data from the sender to the receiver. On the other hand, Error Checking checks the delivery of data without errors from the sender to the recipient.
- Flow control can be achieved by Feedback flow based control and speed based flow control approach while, to detect the error, the approaches used are Parity checking, Cyclic Redundancy Code (CRC) and checksum and to correct the error used by Hamming code, bind convolution codes, Reed-Solomon code, low density parity control codes.
- Flow control prevents the receiver's buffer from overloading and also prevents data loss. On the other hand, error checking detects and corrects the data error.
Both control mechanisms, namely flow control and error control, are the inevitable mechanism for providing complete and reliable data.