|BASIC||The flow control is intended for the correct transmission of the data from the sender to the receiver.||Error control is intended to deliver the data without errors to the receiver.|
|Focus||Flow control based on feedback and flow control based on speed are the approaches to achieve proper flow control.||The parity check, the Cyclic Redundancy Code (CRC) and the checksum are the methods to detect the error in the data. The Hamming code, the binary convolution codes, the Reed-Solomon code, the low density parity check codes are the methods to correct the error in the data.|
|Impact||Avoid exceeding the receiver buffer and avoid data loss.||Detects and corrects the error occurred in the data.|
Flow Control Definition
Flow control is a design problem in the data link layer and the transport layer. A sender sends faster data frames than the receiver can accept. The reason may be that a sender is running on a powerful machine. In this case, even the data is received without any error; The receiver cannot receive the frame at this speed and lose some frames. There are two control methods to avoid frame loss: feedback-based flow control and speed-based flow control.
Feedback based control
In the feedback-based control, whenever the sender sends the data to the receiver, the receiver sends the information to the sender and allows him to send more data or inform the sender about the receiver's performance. The control protocols based on feedback are the sliding window protocol, the stop and wait protocol.
Rate based flow control
In speed-based flow control, when a transmitter transmits the fastest data to the receiver and the receiver cannot receive the data at that speed, then the mechanism incorporated in the protocol limits the speed at which the data is being transmitted. by the sender without any comment from the receiver.
Error Control Definition
Error control is the problem that occurs at the data link layer and also at the transport level. Error control is a mechanism to detect and correct the error occurred in the frames that are delivered from the sender to the receiver. The error occurred in the frame may be a single bit error or a burst error. The single-bit error is the error that occurs only in the one-bit data unit of the frame, where 1 is changed to 0 or 0 is changed to 1. In the burst error it is the case when changing more one bit in the frame; It also refers to the packet level error. In the burst error, the error such as packet loss, frame duplication, loss of acknowledgment packet, etc. may also occur. The methods for detecting the error in the frame are the parity verification, the cyclic redundancy code (CRC) and the checksum.
In the parity check, a single bit is added to the box indicating whether the number of bits '1' contained in the box is even or odd. During transmission, if a single bit is changed, the parity bit also receives a change that reflects the error in the frame. But the method of parity verification is unreliable, since if the even number of bits is changed, the parity bit does not reflect any errors in the frame. However, it is better for a single bit error.
Cyclic Redundancy Code (CRC)
In the Cyclic Redundancy Code, the data is submitted to a binary division, regardless of what is obtained from the rest, is attached with the data and sent to the recipient. The receiver then divides the data obtained with the same divisor with which the sender divided the data. If the rest obtained 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, each fragment containing n bits. All fragments are added using the complement of 1. The result is complemented once more, and now the series of bits obtained is called checksum that is attached with the original data that will be sent and sent to the receiver. When the receiver receives the data, it also divides them into equal fragments and then adds all the fragments using the complement of 1; The result is complemented again. If the result is zero, the data is accepted, otherwise, they are rejected and the sender has to retransmit the data.
The error obtained in the data can be corrected using methods such as the Hamming code, the binary convolution codes, the Reed-Solomon code and the low density parity verification codes.
Key differences between flow control and error control
- The flow control is to monitor the correct transmission of data from the sender to the receiver. On the other hand, Error Control monitors the delivery of data without errors from the sender to the receiver.
- The flow control can be achieved by means of the feedback control based on the feedback and the speed based flow control approach, while, to detect the error, the approaches used are the parity check, the cyclic redundancy code (CRC) and the checksum and to correct the error, the approaches used are Hamming Code, Binary Convolution Codes, Reed-Solomon Code, Low Density Parity Check Codes.
- Flow control prevents the buffer memory of the receivers from being exceeded and also prevents data loss. On the other hand, error control detects and corrects errors in the data.
Both the control mechanism, such as flow control and error control, are the inevitable mechanism for delivering complete and reliable data.