SlideShare a Scribd company logo
FLOW AND ERROR CONTROL
FLOW AND ERROR CONTROL
FLOW AND ERROR CONTROL
FLOW AND ERROR CONTROL
The most important responsibilities of the data link
The most important responsibilities of the data link
layer are
layer are flow control
flow control and
and error control
error control. Collectively,
. Collectively,
these functions are known as
these functions are known as data link control
data link control.
.
Flow Control
Error Control
Topics discussed in this section:
Topics discussed in this section:
Flow control refers to a set of procedures
used to restrict the amount of data
that the sender can send before
waiting for acknowledgment.
Note
Error control in the data link layer is
based on automatic repeat request,
which is the retransmission of data.
Note
PROTOCOLS
PROTOCOLS
Now let us see how the data link layer can combine
Now let us see how the data link layer can combine
framing, flow control, and error control to achieve the
framing, flow control, and error control to achieve the
delivery of data from one node to another. The
delivery of data from one node to another. The
protocols are normally implemented in software by
protocols are normally implemented in software by
using one of the common programming languages. To
using one of the common programming languages. To
make our discussions language-free, we have written
make our discussions language-free, we have written
in pseudocode a version of each protocol that
in pseudocode a version of each protocol that
concentrates mostly on the procedure instead of
concentrates mostly on the procedure instead of
delving into the details of language rules.
delving into the details of language rules.
Taxonomy of Flow and error control protocols
NOISELESS CHANNELS
NOISELESS CHANNELS
Let us first assume we have an ideal channel in which
Let us first assume we have an ideal channel in which
no frames are lost, duplicated, or corrupted. We
no frames are lost, duplicated, or corrupted. We
introduce two protocols for this type of channel.
introduce two protocols for this type of channel.
Simplest Protocol
Stop-and-Wait Protocol
Topics discussed in this section:
Topics discussed in this section:
It is very simple. The sender sends a sequence of frames
without even thinking about the receiver. To send three
frames, three events occur at the sender site and three
events at the receiver site. Note that the data frames are
shown by tilted boxes; the height of the box defines the
transmission time difference between
the first bit and the last bit in the frame.
Simplest Protocol
Figure 1 Flow diagram for Simplest Protocol
Algorithm Sender-site algorithm for the simplest protocol
Algorithm Receiver-site algorithm for the simplest protocol
It is still very simple. The sender sends one frame and
waits for feedback from the receiver. When the ACK
arrives, the sender sends the next frame.
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
Stop and Wait Protocol
Figure 2 Flow diagram for Example 11.2
Note that in figure 2,sending two frames in
the protocol involves the sender in four events
and the receiver in two events.
Algorithm Sender-site algorithm for Stop-and-Wait Protocol
Algorithm Receiver-site algorithm for Stop-and-Wait Protocol
NOISY CHANNELS
NOISY CHANNELS
Although the Stop-and-Wait Protocol gives us an idea
Although the Stop-and-Wait Protocol gives us an idea
of how to add flow control to its predecessor, noiseless
of how to add flow control to its predecessor, noiseless
channels are nonexistent. We discuss three protocols
channels are nonexistent. We discuss three protocols
in this section that use error control.
in this section that use error control.
Stop-and-Wait Automatic Repeat Request
Go-Back-N Automatic Repeat Request
Selective Repeat Automatic Repeat Request
Topics discussed in this section:
Topics discussed in this section:
Error correction in Stop-and-Wait ARQ
is done by keeping a copy of the sent
frame and retransmitting of the frame
when the timer expires.
Note
In Stop-and-Wait ARQ, we use sequence
numbers to number the frames.
The sequence numbers are based on
modulo-2 arithmetic.
Note
In Stop-and-Wait ARQ, the
acknowledgment number always
announces in modulo-2 arithmetic the
sequence number of the next frame
expected.
Note
Stop-and-Wait ARQ
1. It provides both error control and flow control
2. Error control in stop and wait ARQ is done by keeping a copy
of frame until it receives a acknowledgement
3. Sender start a timer when it send a frame. If ACK is not
received within the allocated time period , the sender assume
that the frame was lost or damage and resent it.
4. Receiver send an ACK to sender if it receives a frame
correctly.
5. ACK number always define the number of the next expected
frame.
Stop and wait ARQ = Stop and wait + Time out + Sequence Number (Data)
+ sequence number (ACK))
1.
Stop-and-Wait ARQ
For identification, both data frames and
acknowledgements (ACK) frames are numbered
alternatively 0 and 1.
Sender has a control variable (S) that holds the
number of the recently sent frame. (0 or 1)
Receiver has a control variable ® that holds the
number of the next frame expected (0 or 1).
Figure3 shows an example of Stop-and-Wait ARQ.
Frame 0 is sent and acknowledged. Frame 1 is lost and
resent after the time-out. The resent frame 1 is
acknowledged and the timer stops. Frame 0 is sent and
acknowledged, but the acknowledgment is lost. The
sender has no idea if the frame or the acknowledgment
is lost, so after the time-out, it resends frame 0, which is
acknowledged.
Stop-and-Wait ARQ
Figure 3 Flow diagram for Example 11.3
Disadvantage of Stop-and-Wait
• In stop-and-wait, at any point in time, there is only one frame that is sent and
waiting to be acknowledged.
• This is not a good use of transmission medium.
• To improve efficiency, multiple frames should be in transition while waiting for
ACK.
• Two protocol use the above concept,
– Go-Back-N ARQ
– Selective Repeat ARQ

More Related Content

PPT
stop and wait
PPT
DataLinkControl.ppt
PPT
09 Data Link LayerFlow Control.ppt
PPT
3a data link layer
PPT
Chapter 11 Data Link Control 307 11.1 FRAMING 307 Fixed-Size Framing 308 Vari...
PPTX
Unit 2 data link control
PPTX
Data Link Layer_Data Communications&Computer Neworks.pptx
PPTX
Unit IV_Flow.pptx
stop and wait
DataLinkControl.ppt
09 Data Link LayerFlow Control.ppt
3a data link layer
Chapter 11 Data Link Control 307 11.1 FRAMING 307 Fixed-Size Framing 308 Vari...
Unit 2 data link control
Data Link Layer_Data Communications&Computer Neworks.pptx
Unit IV_Flow.pptx

Similar to stop and wait _ (20)

PPT
Chapter 11
PPT
computer networks data communication and networking
PDF
ch11.pdf1111111111111111111111111111111111111111111111
PPT
computer_communication_Datalinklayer.ppt
PPT
DATALINK CONTROL and it's functional programming
PPT
Data link CONTROL and it's functional programming
PPT
DATA LINK CONTROL and it's applications.
PPT
1 DATALINK CONTROL and it's applications
PPT
1 DATALINK CONTROL and it's applications
PPT
Flow Control (1).ppt
PPTX
Chapter 11: Data Link Control
PPT
PPT
11 Data Link_Control
PPT
PPTX
Lecture 36-43_DATA_COMMUNICATION_PPT.pptx
PPT
Data Link Control Protocols
PPT
5 DLL-LLC- Book
PPT
CN_unit2.ppt Data Link Layer characteristics, categories
PPT
DataLinkLayer.ppt ,bigtd6tykfh5er7iuhkmiytfr7
PPTX
Datalink control(framing,protocols)
Chapter 11
computer networks data communication and networking
ch11.pdf1111111111111111111111111111111111111111111111
computer_communication_Datalinklayer.ppt
DATALINK CONTROL and it's functional programming
Data link CONTROL and it's functional programming
DATA LINK CONTROL and it's applications.
1 DATALINK CONTROL and it's applications
1 DATALINK CONTROL and it's applications
Flow Control (1).ppt
Chapter 11: Data Link Control
11 Data Link_Control
Lecture 36-43_DATA_COMMUNICATION_PPT.pptx
Data Link Control Protocols
5 DLL-LLC- Book
CN_unit2.ppt Data Link Layer characteristics, categories
DataLinkLayer.ppt ,bigtd6tykfh5er7iuhkmiytfr7
Datalink control(framing,protocols)
Ad

More from SwatiHans10 (20)

PPT
ip addressing _
PPT
PPT
subnetting _
PPT
PipelineHazards _
PPT
Pipelining _
PPTX
Mobile Customer Experience Management.pptx
PPTX
Social Web multimedia analytics goals _
PPTX
Hardwires and Microprogrammed Control ,
PPTX
Restoring Algorithm _
PPTX
Non -Restoring Algorithm _
PPTX
loops _
PPT
functions _
PDF
Instruction execution cycle _
PPT
RTL,Instruction set _
PPT
Data representation _
PPTX
CAO PPT-Lect 1 _
PPTX
CIRCULAR LINKED LIST _
PPT
Transmission control protocol _
PPTX
Numpy _
PPTX
Lecture 1 .
ip addressing _
subnetting _
PipelineHazards _
Pipelining _
Mobile Customer Experience Management.pptx
Social Web multimedia analytics goals _
Hardwires and Microprogrammed Control ,
Restoring Algorithm _
Non -Restoring Algorithm _
loops _
functions _
Instruction execution cycle _
RTL,Instruction set _
Data representation _
CAO PPT-Lect 1 _
CIRCULAR LINKED LIST _
Transmission control protocol _
Numpy _
Lecture 1 .
Ad

Recently uploaded (20)

PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPT
Total quality management ppt for engineering students
PDF
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PPT
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PPTX
Current and future trends in Computer Vision.pptx
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PDF
737-MAX_SRG.pdf student reference guides
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Total quality management ppt for engineering students
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
III.4.1.2_The_Space_Environment.p pdffdf
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Nature of X-rays, X- Ray Equipment, Fluoroscopy
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
UNIT 4 Total Quality Management .pptx
Categorization of Factors Affecting Classification Algorithms Selection
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Current and future trends in Computer Vision.pptx
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
737-MAX_SRG.pdf student reference guides
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf

stop and wait _

  • 1. FLOW AND ERROR CONTROL FLOW AND ERROR CONTROL
  • 2. FLOW AND ERROR CONTROL FLOW AND ERROR CONTROL The most important responsibilities of the data link The most important responsibilities of the data link layer are layer are flow control flow control and and error control error control. Collectively, . Collectively, these functions are known as these functions are known as data link control data link control. . Flow Control Error Control Topics discussed in this section: Topics discussed in this section:
  • 3. Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Note
  • 4. Error control in the data link layer is based on automatic repeat request, which is the retransmission of data. Note
  • 5. PROTOCOLS PROTOCOLS Now let us see how the data link layer can combine Now let us see how the data link layer can combine framing, flow control, and error control to achieve the framing, flow control, and error control to achieve the delivery of data from one node to another. The delivery of data from one node to another. The protocols are normally implemented in software by protocols are normally implemented in software by using one of the common programming languages. To using one of the common programming languages. To make our discussions language-free, we have written make our discussions language-free, we have written in pseudocode a version of each protocol that in pseudocode a version of each protocol that concentrates mostly on the procedure instead of concentrates mostly on the procedure instead of delving into the details of language rules. delving into the details of language rules.
  • 6. Taxonomy of Flow and error control protocols
  • 7. NOISELESS CHANNELS NOISELESS CHANNELS Let us first assume we have an ideal channel in which Let us first assume we have an ideal channel in which no frames are lost, duplicated, or corrupted. We no frames are lost, duplicated, or corrupted. We introduce two protocols for this type of channel. introduce two protocols for this type of channel. Simplest Protocol Stop-and-Wait Protocol Topics discussed in this section: Topics discussed in this section:
  • 8. It is very simple. The sender sends a sequence of frames without even thinking about the receiver. To send three frames, three events occur at the sender site and three events at the receiver site. Note that the data frames are shown by tilted boxes; the height of the box defines the transmission time difference between the first bit and the last bit in the frame. Simplest Protocol
  • 9. Figure 1 Flow diagram for Simplest Protocol
  • 10. Algorithm Sender-site algorithm for the simplest protocol
  • 11. Algorithm Receiver-site algorithm for the simplest protocol
  • 12. It is still very simple. The sender sends one frame and waits for feedback from the receiver. When the ACK arrives, the sender sends the next frame. 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 Stop and Wait Protocol
  • 13. Figure 2 Flow diagram for Example 11.2 Note that in figure 2,sending two frames in the protocol involves the sender in four events and the receiver in two events.
  • 14. Algorithm Sender-site algorithm for Stop-and-Wait Protocol
  • 15. Algorithm Receiver-site algorithm for Stop-and-Wait Protocol
  • 16. NOISY CHANNELS NOISY CHANNELS Although the Stop-and-Wait Protocol gives us an idea Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless of how to add flow control to its predecessor, noiseless channels are nonexistent. We discuss three protocols channels are nonexistent. We discuss three protocols in this section that use error control. in this section that use error control. Stop-and-Wait Automatic Repeat Request Go-Back-N Automatic Repeat Request Selective Repeat Automatic Repeat Request Topics discussed in this section: Topics discussed in this section:
  • 17. Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame and retransmitting of the frame when the timer expires. Note
  • 18. In Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic. Note
  • 19. In Stop-and-Wait ARQ, the acknowledgment number always announces in modulo-2 arithmetic the sequence number of the next frame expected. Note
  • 20. Stop-and-Wait ARQ 1. It provides both error control and flow control 2. Error control in stop and wait ARQ is done by keeping a copy of frame until it receives a acknowledgement 3. Sender start a timer when it send a frame. If ACK is not received within the allocated time period , the sender assume that the frame was lost or damage and resent it. 4. Receiver send an ACK to sender if it receives a frame correctly. 5. ACK number always define the number of the next expected frame. Stop and wait ARQ = Stop and wait + Time out + Sequence Number (Data) + sequence number (ACK)) 1.
  • 21. Stop-and-Wait ARQ For identification, both data frames and acknowledgements (ACK) frames are numbered alternatively 0 and 1. Sender has a control variable (S) that holds the number of the recently sent frame. (0 or 1) Receiver has a control variable ® that holds the number of the next frame expected (0 or 1).
  • 22. Figure3 shows an example of Stop-and-Wait ARQ. Frame 0 is sent and acknowledged. Frame 1 is lost and resent after the time-out. The resent frame 1 is acknowledged and the timer stops. Frame 0 is sent and acknowledged, but the acknowledgment is lost. The sender has no idea if the frame or the acknowledgment is lost, so after the time-out, it resends frame 0, which is acknowledged. Stop-and-Wait ARQ
  • 23. Figure 3 Flow diagram for Example 11.3
  • 24. Disadvantage of Stop-and-Wait • In stop-and-wait, at any point in time, there is only one frame that is sent and waiting to be acknowledged. • This is not a good use of transmission medium. • To improve efficiency, multiple frames should be in transition while waiting for ACK. • Two protocol use the above concept, – Go-Back-N ARQ – Selective Repeat ARQ