Short Notes: Flow and Error Control Techniques | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE) PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


Flow Control: Flow control coordinates that amount of data that can be sent before 
receiving acknowledgement.
• It is one of the most important duties of the data link layer.
• Flow control tells the sender how much data to send.
• It makes the sender wait for some sort of an acknowledgment (ACK) before 
continuing to send more data.
• Flow Control Techniques: Stop-and-wait, and Sliding Window
Error Control: Error control in the data link layer Is based on ARQ (automatic repeat 
request), which is the retransmission of data.
• The term error control refers to methods of error detection and 
retransmission.
• Anytime an error is detected in an exchange, specified frames are 
retransmitted. This process is called ARQ.
To ensure reliable communication, there needs to exist flow control (managing the 
amount of data the sender sends), and error control (that data arrives at the 
destination error free).
• Flow and error control needs to be done at several layers.
• For node-to-node links, flow and error control is carried out in the data-link 
layer.
• For end-point to end-point, flow and error control is carried out in the transport 
layer.
Flow & Error control:
Page 2


Flow Control: Flow control coordinates that amount of data that can be sent before 
receiving acknowledgement.
• It is one of the most important duties of the data link layer.
• Flow control tells the sender how much data to send.
• It makes the sender wait for some sort of an acknowledgment (ACK) before 
continuing to send more data.
• Flow Control Techniques: Stop-and-wait, and Sliding Window
Error Control: Error control in the data link layer Is based on ARQ (automatic repeat 
request), which is the retransmission of data.
• The term error control refers to methods of error detection and 
retransmission.
• Anytime an error is detected in an exchange, specified frames are 
retransmitted. This process is called ARQ.
To ensure reliable communication, there needs to exist flow control (managing the 
amount of data the sender sends), and error control (that data arrives at the 
destination error free).
• Flow and error control needs to be done at several layers.
• For node-to-node links, flow and error control is carried out in the data-link 
layer.
• For end-point to end-point, flow and error control is carried out in the transport 
layer.
Flow & Error control:
• Error Detection and ARQ (error detection with retransmissions) must be 
combined with methods that intelligently limit the number of 'outstanding' 
(unACKed) frames.
• Flow & Error control techniques: Stop-and-Wait ARQ, Go-Back-N ARQ, 
and Selective Repeat ARQ
Flow Control Techniques:
• One important aspect of data link layer is flow control.
• Flow control refers to a set of procedures used to restrict the amount of data 
the sender can send before waiting for acknowledgement.
| Categories of flow control
i r
1
Stop and wait
| Sliding window
Send one frame at a time Send several frame at a time 
Stop and Wait Flow control:
• The sender has to wait for an acknowledgment of every frame that it sends.
• Only when a acknowledgment has been received is the next frame sent. This 
process continues until the sender transmits an End of Transmission (EOT) 
frame.
• In Stop-and-Wait flow control, the receiver indicates its readiness to receive 
data for each frame.
Last bit receivec End of Transmit of 
ACK
Receiver
propagation
delay
Frame ACK
/ \
/ \
Frame ACK
Sender transmission
delay
Start Transmit End Transmit
Last bit of ACK received
• For every frame that is sent, there needs to be an acknowledgment, which 
takes a similar amount of propagation time to get back to the sender.
• Only one frame can be in transmission at a time. This leads to inefficiency if 
propagation delay is much longer than the transmission delay
• Advantages of Stop and Wait:
° It's simple and each frame is checked and acknowledged well.
• Disadvantages of Stop and Wait:
Page 3


Flow Control: Flow control coordinates that amount of data that can be sent before 
receiving acknowledgement.
• It is one of the most important duties of the data link layer.
• Flow control tells the sender how much data to send.
• It makes the sender wait for some sort of an acknowledgment (ACK) before 
continuing to send more data.
• Flow Control Techniques: Stop-and-wait, and Sliding Window
Error Control: Error control in the data link layer Is based on ARQ (automatic repeat 
request), which is the retransmission of data.
• The term error control refers to methods of error detection and 
retransmission.
• Anytime an error is detected in an exchange, specified frames are 
retransmitted. This process is called ARQ.
To ensure reliable communication, there needs to exist flow control (managing the 
amount of data the sender sends), and error control (that data arrives at the 
destination error free).
• Flow and error control needs to be done at several layers.
• For node-to-node links, flow and error control is carried out in the data-link 
layer.
• For end-point to end-point, flow and error control is carried out in the transport 
layer.
Flow & Error control:
• Error Detection and ARQ (error detection with retransmissions) must be 
combined with methods that intelligently limit the number of 'outstanding' 
(unACKed) frames.
• Flow & Error control techniques: Stop-and-Wait ARQ, Go-Back-N ARQ, 
and Selective Repeat ARQ
Flow Control Techniques:
• One important aspect of data link layer is flow control.
• Flow control refers to a set of procedures used to restrict the amount of data 
the sender can send before waiting for acknowledgement.
| Categories of flow control
i r
1
Stop and wait
| Sliding window
Send one frame at a time Send several frame at a time 
Stop and Wait Flow control:
• The sender has to wait for an acknowledgment of every frame that it sends.
• Only when a acknowledgment has been received is the next frame sent. This 
process continues until the sender transmits an End of Transmission (EOT) 
frame.
• In Stop-and-Wait flow control, the receiver indicates its readiness to receive 
data for each frame.
Last bit receivec End of Transmit of 
ACK
Receiver
propagation
delay
Frame ACK
/ \
/ \
Frame ACK
Sender transmission
delay
Start Transmit End Transmit
Last bit of ACK received
• For every frame that is sent, there needs to be an acknowledgment, which 
takes a similar amount of propagation time to get back to the sender.
• Only one frame can be in transmission at a time. This leads to inefficiency if 
propagation delay is much longer than the transmission delay
• Advantages of Stop and Wait:
° It's simple and each frame is checked and acknowledged well.
• Disadvantages of Stop and Wait:
° Only one frame can be in transmission at a time.
° It is inefficient, if the distance between devices is long. Reason is 
propagation delay is much longer than the transmission delay.
° The time spent for waiting acknowledgements between each frame can 
add significant amount to the total transmission time.
Sliding Window Flow Control:
• It works by having the sender and receiver have a "window" of frames.
• Each frame has to be numbered in relation to the sliding window. For a 
window of size n, frames get a number from 0 to n -1. Subsequent frames 
get a number mod n.
• The sender can send as many frames as would fit into a window.
• The receiver, upon receiving enough frames, will respond with an 
acknowledgment of all frames up to a certain point in the window. It is called 
slide.
• This window can hold frames at either end and provides the upper limit on the 
number of frames that can be transmitted before requiring an 
acknowledgement.
• For example, if n = 8, the frames are numbered 0,1, 2, 3, 4, 5, 6, 7, 0,1, 2, 3, 4, 
5, 6, 7, 0,1 ...so on. The size of the window is (n -1) = 7.
• When the receiver sends an ACK, it includes the number of the next frame it 
expects to receive. When the receiver sends an ACK containing the number 5, 
it means all frames upto number 4 have been received.
• If the window size is sufficiently large the sender can continuously transmit 
packets:
° If W >= (2a+1), sender can transmit continuously. (Efficiency =1) 
o If W < (2a+1), sender can transmit W frames every (2a+1) time units. 
(Efficiency = W/(1+2a))
Error Control Techniques:
• Many factors including line noise can alter or wipe out one or more bits of a 
given data unit.
Types of Errors
Single bit 
(only one bit in the 
data unit has changed)
Burst
(2 or more bit in the 
data unit has changed)
Errors classification
Sent
Length of burst 
error (5 bits)
0 0
Received *
I]
Sent
1 changed to 0
h *— ~ ---------- H
0 1 0 0 11 0 0 0 | 1 0 0 10 1 | 1 0 o l
I
' ^
Bits corrupted by 
burst error
0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 110 0
Received 
Error correction
• Reliable systems must have mechanism for detecting and correcting such
errors.
Page 4


Flow Control: Flow control coordinates that amount of data that can be sent before 
receiving acknowledgement.
• It is one of the most important duties of the data link layer.
• Flow control tells the sender how much data to send.
• It makes the sender wait for some sort of an acknowledgment (ACK) before 
continuing to send more data.
• Flow Control Techniques: Stop-and-wait, and Sliding Window
Error Control: Error control in the data link layer Is based on ARQ (automatic repeat 
request), which is the retransmission of data.
• The term error control refers to methods of error detection and 
retransmission.
• Anytime an error is detected in an exchange, specified frames are 
retransmitted. This process is called ARQ.
To ensure reliable communication, there needs to exist flow control (managing the 
amount of data the sender sends), and error control (that data arrives at the 
destination error free).
• Flow and error control needs to be done at several layers.
• For node-to-node links, flow and error control is carried out in the data-link 
layer.
• For end-point to end-point, flow and error control is carried out in the transport 
layer.
Flow & Error control:
• Error Detection and ARQ (error detection with retransmissions) must be 
combined with methods that intelligently limit the number of 'outstanding' 
(unACKed) frames.
• Flow & Error control techniques: Stop-and-Wait ARQ, Go-Back-N ARQ, 
and Selective Repeat ARQ
Flow Control Techniques:
• One important aspect of data link layer is flow control.
• Flow control refers to a set of procedures used to restrict the amount of data 
the sender can send before waiting for acknowledgement.
| Categories of flow control
i r
1
Stop and wait
| Sliding window
Send one frame at a time Send several frame at a time 
Stop and Wait Flow control:
• The sender has to wait for an acknowledgment of every frame that it sends.
• Only when a acknowledgment has been received is the next frame sent. This 
process continues until the sender transmits an End of Transmission (EOT) 
frame.
• In Stop-and-Wait flow control, the receiver indicates its readiness to receive 
data for each frame.
Last bit receivec End of Transmit of 
ACK
Receiver
propagation
delay
Frame ACK
/ \
/ \
Frame ACK
Sender transmission
delay
Start Transmit End Transmit
Last bit of ACK received
• For every frame that is sent, there needs to be an acknowledgment, which 
takes a similar amount of propagation time to get back to the sender.
• Only one frame can be in transmission at a time. This leads to inefficiency if 
propagation delay is much longer than the transmission delay
• Advantages of Stop and Wait:
° It's simple and each frame is checked and acknowledged well.
• Disadvantages of Stop and Wait:
° Only one frame can be in transmission at a time.
° It is inefficient, if the distance between devices is long. Reason is 
propagation delay is much longer than the transmission delay.
° The time spent for waiting acknowledgements between each frame can 
add significant amount to the total transmission time.
Sliding Window Flow Control:
• It works by having the sender and receiver have a "window" of frames.
• Each frame has to be numbered in relation to the sliding window. For a 
window of size n, frames get a number from 0 to n -1. Subsequent frames 
get a number mod n.
• The sender can send as many frames as would fit into a window.
• The receiver, upon receiving enough frames, will respond with an 
acknowledgment of all frames up to a certain point in the window. It is called 
slide.
• This window can hold frames at either end and provides the upper limit on the 
number of frames that can be transmitted before requiring an 
acknowledgement.
• For example, if n = 8, the frames are numbered 0,1, 2, 3, 4, 5, 6, 7, 0,1, 2, 3, 4, 
5, 6, 7, 0,1 ...so on. The size of the window is (n -1) = 7.
• When the receiver sends an ACK, it includes the number of the next frame it 
expects to receive. When the receiver sends an ACK containing the number 5, 
it means all frames upto number 4 have been received.
• If the window size is sufficiently large the sender can continuously transmit 
packets:
° If W >= (2a+1), sender can transmit continuously. (Efficiency =1) 
o If W < (2a+1), sender can transmit W frames every (2a+1) time units. 
(Efficiency = W/(1+2a))
Error Control Techniques:
• Many factors including line noise can alter or wipe out one or more bits of a 
given data unit.
Types of Errors
Single bit 
(only one bit in the 
data unit has changed)
Burst
(2 or more bit in the 
data unit has changed)
Errors classification
Sent
Length of burst 
error (5 bits)
0 0
Received *
I]
Sent
1 changed to 0
h *— ~ ---------- H
0 1 0 0 11 0 0 0 | 1 0 0 10 1 | 1 0 o l
I
' ^
Bits corrupted by 
burst error
0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 110 0
Received 
Error correction
• Reliable systems must have mechanism for detecting and correcting such
errors.
• Error detection and correction are implemented either at the data link layer oif 
the transport layer of the OSI model.
Error Detection
• Error detection uses the concept of redundancy, which means adding extra 
bits for detecting errors at the destination.
V&C
(Vertical
Redundancy
Check)
Detection Methods
LRC CRC Checksum
(Longitudinal (Cyclic
Redundancy Redundancy 
Check) Check)
Receiver Sender
Data and redundancy check
How error detection works with redundancy concept
• Checking function performs the action that the received bit stream passes the 
checking criteria, the data portion of the data unit is accepted else rejected.
Vertical Redundancy Check (VRC)
• In this technique, a redundant bit, called parity bit, is appended to every data 
unit, so that the total number of 1 's in the unit (including the parity bit) 
becomes even.
• If number of 1 's are already even in data, then parity bit will be 0.
Sender
(Inducing data and parity bit)
Detection ot error using vertical redundancy check method
• Some systems may use odd parity checking, where the number of 1 's should 
be odd. The principle is the same, the calculation is different.
Checksum
• There are two algorithms involved in this process, checksum generator at 
sender end and checksum checker at receiver end.
• The sender follows these steps
° The data unit is divided into k sections each of n bits.
° All sections are added together using 1 's complement to get the sum.
° The sum is complemented and becomes the checksum.
° The checksum is sent with the data.
Page 5


Flow Control: Flow control coordinates that amount of data that can be sent before 
receiving acknowledgement.
• It is one of the most important duties of the data link layer.
• Flow control tells the sender how much data to send.
• It makes the sender wait for some sort of an acknowledgment (ACK) before 
continuing to send more data.
• Flow Control Techniques: Stop-and-wait, and Sliding Window
Error Control: Error control in the data link layer Is based on ARQ (automatic repeat 
request), which is the retransmission of data.
• The term error control refers to methods of error detection and 
retransmission.
• Anytime an error is detected in an exchange, specified frames are 
retransmitted. This process is called ARQ.
To ensure reliable communication, there needs to exist flow control (managing the 
amount of data the sender sends), and error control (that data arrives at the 
destination error free).
• Flow and error control needs to be done at several layers.
• For node-to-node links, flow and error control is carried out in the data-link 
layer.
• For end-point to end-point, flow and error control is carried out in the transport 
layer.
Flow & Error control:
• Error Detection and ARQ (error detection with retransmissions) must be 
combined with methods that intelligently limit the number of 'outstanding' 
(unACKed) frames.
• Flow & Error control techniques: Stop-and-Wait ARQ, Go-Back-N ARQ, 
and Selective Repeat ARQ
Flow Control Techniques:
• One important aspect of data link layer is flow control.
• Flow control refers to a set of procedures used to restrict the amount of data 
the sender can send before waiting for acknowledgement.
| Categories of flow control
i r
1
Stop and wait
| Sliding window
Send one frame at a time Send several frame at a time 
Stop and Wait Flow control:
• The sender has to wait for an acknowledgment of every frame that it sends.
• Only when a acknowledgment has been received is the next frame sent. This 
process continues until the sender transmits an End of Transmission (EOT) 
frame.
• In Stop-and-Wait flow control, the receiver indicates its readiness to receive 
data for each frame.
Last bit receivec End of Transmit of 
ACK
Receiver
propagation
delay
Frame ACK
/ \
/ \
Frame ACK
Sender transmission
delay
Start Transmit End Transmit
Last bit of ACK received
• For every frame that is sent, there needs to be an acknowledgment, which 
takes a similar amount of propagation time to get back to the sender.
• Only one frame can be in transmission at a time. This leads to inefficiency if 
propagation delay is much longer than the transmission delay
• Advantages of Stop and Wait:
° It's simple and each frame is checked and acknowledged well.
• Disadvantages of Stop and Wait:
° Only one frame can be in transmission at a time.
° It is inefficient, if the distance between devices is long. Reason is 
propagation delay is much longer than the transmission delay.
° The time spent for waiting acknowledgements between each frame can 
add significant amount to the total transmission time.
Sliding Window Flow Control:
• It works by having the sender and receiver have a "window" of frames.
• Each frame has to be numbered in relation to the sliding window. For a 
window of size n, frames get a number from 0 to n -1. Subsequent frames 
get a number mod n.
• The sender can send as many frames as would fit into a window.
• The receiver, upon receiving enough frames, will respond with an 
acknowledgment of all frames up to a certain point in the window. It is called 
slide.
• This window can hold frames at either end and provides the upper limit on the 
number of frames that can be transmitted before requiring an 
acknowledgement.
• For example, if n = 8, the frames are numbered 0,1, 2, 3, 4, 5, 6, 7, 0,1, 2, 3, 4, 
5, 6, 7, 0,1 ...so on. The size of the window is (n -1) = 7.
• When the receiver sends an ACK, it includes the number of the next frame it 
expects to receive. When the receiver sends an ACK containing the number 5, 
it means all frames upto number 4 have been received.
• If the window size is sufficiently large the sender can continuously transmit 
packets:
° If W >= (2a+1), sender can transmit continuously. (Efficiency =1) 
o If W < (2a+1), sender can transmit W frames every (2a+1) time units. 
(Efficiency = W/(1+2a))
Error Control Techniques:
• Many factors including line noise can alter or wipe out one or more bits of a 
given data unit.
Types of Errors
Single bit 
(only one bit in the 
data unit has changed)
Burst
(2 or more bit in the 
data unit has changed)
Errors classification
Sent
Length of burst 
error (5 bits)
0 0
Received *
I]
Sent
1 changed to 0
h *— ~ ---------- H
0 1 0 0 11 0 0 0 | 1 0 0 10 1 | 1 0 o l
I
' ^
Bits corrupted by 
burst error
0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 110 0
Received 
Error correction
• Reliable systems must have mechanism for detecting and correcting such
errors.
• Error detection and correction are implemented either at the data link layer oif 
the transport layer of the OSI model.
Error Detection
• Error detection uses the concept of redundancy, which means adding extra 
bits for detecting errors at the destination.
V&C
(Vertical
Redundancy
Check)
Detection Methods
LRC CRC Checksum
(Longitudinal (Cyclic
Redundancy Redundancy 
Check) Check)
Receiver Sender
Data and redundancy check
How error detection works with redundancy concept
• Checking function performs the action that the received bit stream passes the 
checking criteria, the data portion of the data unit is accepted else rejected.
Vertical Redundancy Check (VRC)
• In this technique, a redundant bit, called parity bit, is appended to every data 
unit, so that the total number of 1 's in the unit (including the parity bit) 
becomes even.
• If number of 1 's are already even in data, then parity bit will be 0.
Sender
(Inducing data and parity bit)
Detection ot error using vertical redundancy check method
• Some systems may use odd parity checking, where the number of 1 's should 
be odd. The principle is the same, the calculation is different.
Checksum
• There are two algorithms involved in this process, checksum generator at 
sender end and checksum checker at receiver end.
• The sender follows these steps
° The data unit is divided into k sections each of n bits.
° All sections are added together using 1 's complement to get the sum.
° The sum is complemented and becomes the checksum.
° The checksum is sent with the data.
• The receiver follows these steps
° The received unit is divided into k sections each of n bits.
° All sections are added together using 1 's complement to get the sum.
o The sum is complemented.
° If the result is zero, the data are accepted, otherwise they are rejected.
Limitation of checksum:
• It is not possible to detect the vertical error from the data which is received at 
receivers end.
• If noise modify the data in such a way that vertically placed bits can cancel 
the change made to them then calculated checksum will always be same as 
received checksum. Such errors cannot be detected and they are known as 
vertical errors.
Cyclic Redundancy Check (CRC):
• CRC is based on binary division.
• A sequence of redundant bits called CRC or the CRC remainder is appended to 
the end of a data unit, so that the resulting data unit becomes exactly divisible 
by a second, predetermined binary number.
• At its destination, the incoming data unit is divided by the same number. If at 
this step there is no remainder, the data unit is assumed to be intact and 
therefore is accepted.
Selection Criteria for CRC generator:
• Generator shiould be of more than 1 bit.
• when x is part of our generator, than it will detect all the errors. So for a 
generator to detect all type of errors, it should not contain x.
• if generator contains x+1, then all the odd bit errors are detected.
• A good generator always contain x other it will bw multiple of x.
• CRC 32 will always detect all type of errors in the network, it is considered as 
ideal network detector.
Error Correction:
• Error correction in data link layer is implemented simply anytime.
• An error is detected in an exchange, a negative acknowledgement NAK is 
returned and the specified frames are retransmitted. This process is called 
Automatic Repeat Request (ARQ).
• Retransmission of data happens in three Cases: Damaged frame, Lost frame 
and Lost acknowledgement.
Flow and Error Control Techniques (ARQ schemes):
Read More
90 docs

Top Courses for Computer Science Engineering (CSE)

90 docs
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

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

practice quizzes

,

ppt

,

Short Notes: Flow and Error Control Techniques | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE)

,

Important questions

,

shortcuts and tricks

,

Semester Notes

,

Objective type Questions

,

Exam

,

Free

,

Viva Questions

,

Short Notes: Flow and Error Control Techniques | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE)

,

Previous Year Questions with Solutions

,

pdf

,

video lectures

,

Summary

,

past year papers

,

study material

,

MCQs

,

Extra Questions

,

Short Notes: Flow and Error Control Techniques | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE)

,

Sample Paper

,

mock tests for examination

;