Professional Documents
Culture Documents
Pert 8 Flow An Der or Control
Pert 8 Flow An Der or Control
1
Flow Control and Error Control
• Flow Control is a set of procedure to restrict the
amount of data that the sender can send before
waiting for acknowledgment.
• Error Correction is both error detection and error
correction. (Simply : Anytime an error is detected
in an exchange, specified frames are
retransmitted. This process called Automatic
Repeat Request (ARQ).
2
Flow and Error Control Mechanisms
• Stop-and-Wait ARQ
• Go-Back-N-ARQ
• Selective-Repeat ARQ
3
Stop-and-Wait ARQ
• This is the simplest flow and error control mechanism. It has
the following mechanism :
– The sending device keep the copy of the last frame transmitted
until it receives an acknowledgment for that frame.
– For identification purpose, both Data Frame and
Acknowledgment (ACK) frame are numbered alternately 0 and
1. This numbering allow for identification of data frame in case of
duplicate transmission.
A data 0 frame ACK 1
A data 1 frame ACK 0
- A damaged and lost frame is treated in the same manner by the
receiver. (Its simply discards).
- The sender has control variable S, The receiver has control
variable R.
- The sender start a timer when it send a frame.
- The receiver send only positive acknowledgment for frame
received safe and sound.
4
There are four situation in a frame transmission : Normal situation,
the frame is lost, the acknowledgment is lost, or the
acknowledgment is delayed.
Normal situation
5
Lost or Damaged Frame
6
Lost ACK Frame
The receiver
discards the 2nd
copy of Frame 1
7
the acknowledgment is delayed
9
Go-Back N ARQ
• Go-Back-N ARQ improves the efficiency of Stop and
Wait ARQ in term of using transmission medium.
• It lets more than one frame be outstanding; It can send
up to W frames before worrying about acknowledgment.
• Frame from a sending station are numbered sequentially
with a range from 0 to 2m-1.
• The window slides to includes new unsent frames when
the correct acknowledgments are received (Sliding
Window).
10
Example : Sender Sliding Window
Receiver Sliding
Window
13
Go-Back-N ARQ Normal Operation
14
Go-Back-N ARQ; Damaged or Lost Frame
15
Damaged or Lost Acknowledgment …..?
Delayed Acknowledgment …?
16
Sender Window Size
18
Selective Repeat ARQ, Sender and Receiver windows
RF = Receive First
RL = Receive Last
19
Selective Repeat ARQ; Lost Frame
Selective Repeat
ARQ also defines a
negative
acknowledgment
(NAK) that reports
the sequence
number of a
damaged frame
before the timer
expires
20
Selective Repeat ARQ; Lost and
Delayed ACKs and
NAKs……….???
21
Selective Repeat ARQ, Sender and Window Size
22