0% found this document useful (0 votes)
28 views

Flow Control

Uploaded by

Aagam Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Flow Control

Uploaded by

Aagam Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Flow Control

&
Error Control
Data Link Layer
 The data link layer transforms the physical layer, a raw transmission facility, to a

link responsible for node-to-node (hop-to-hop) communication. Specific


responsibilities of the data link layer include framing, addressing, flow control,
error control, and media access control.

 Data link layer has two sub-layers:

• Data Link Control: It deals with protocols, flow-control, and error


control

• Media Access Control: It deals with actual control of media


Data Link Layer
Data Link Controls
Line Discipline

Line Discipline is a functionality of the Data link layer that provides the
coordination among the link systems. It determines which device can send, and
when it can send the data.

Line Discipline can be achieved in two ways:

•ENQ/ACK

•Poll/select
•ENQ/ACK
ENQ/ACK stands for
Enquiry/Acknowledgement
is used when there is no
wrong receiver available on
the link and having a
dedicated path between the
two devices so that the
device capable of receiving
the transmission is the
intended one
Poll/Select
The Poll/Select method
of line discipline works
with those topologies
where one device is
designated as a primary
station, and other
devices are secondary
stations.
Select
The select mode is used when the primary device has something to send.
When the primary device wants to send some data, then it alerts the secondary device
for the upcoming transmission by transmitting a Select (SEL) frame, one field of the
frame includes the address of the intended secondary device.
When the secondary device receives the SEL frame, it sends an acknowledgement that
indicates the secondary ready status.
If the secondary device is ready to accept the data, then the primary device sends two or
more data frames to the intended secondary device. Once the data has been transmitted,
the secondary sends an acknowledgement specifies that the data has been received.
Poll
• The Poll mode is used when the primary device wants to receive some data
from the secondary device.

When a primary device wants to receive the data, then it asks each device
whether it has anything to send.

Firstly, the primary asks (poll) the first secondary device, if it responds with the
NACK (Negative Acknowledgement) means that it has nothing to send. Now, it
approaches the second secondary device, it responds with the ACK means that
it has the data to send. The secondary device can send more than one frame one
after another or sometimes it may be required to send ACK before sending each
one, depending on the type of the protocol being used
Flow Control
•It is a set of procedures that tells the sender how much data it
can transmit before the data overwhelms the receiver.

•The receiving device has limited speed and limited memory to


store the data. Therefore, the receiving device must be able to
inform the sending device to stop the transmission temporarily
before the limits are reached.

•It requires a buffer, a block of memory for storing the


information until they are processed.
11.11
11.12
11-4 NOISELESS CHANNELS
Let us first assume we have an ideal channel in which
no frames are lost, duplicated, or corrupted. We
introduce two protocols for this type of channel.
Topics discussed in this section:
Simplest Protocol
Stop-and-Wait Protocol
Figure 11.6 The design of the simplest protocol with no flow or error control
11.13
Algorithm 11.1 Sender-site algorithm for the simplest protocol
11.14
Algorithm 11.2 Receiver-site algorithm for the simplest protocol
11.15
11.16
Figure shows an example of communication using this
protocol. 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.
Figure 11.7 Flow diagram for Example 11.1
11.17
Figure 11.8 Design of Stop-and-Wait Protocol
11.18
Algorithm 11.3 Sender-site algorithm for Stop-and-Wait Protocol
11.19
Algorithm 11.4 Receiver-site algorithm for Stop-and-Wait Protocol
11.20
11.21
Figure shows an example of communication using this
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. Note that sending
two frames in the protocol involves the sender in four
events and the receiver in two events.
Figure 11.9 Flow diagram for Example 11.2
11.22
11.23 NOISY CHANNELS
Although the Stop-and-Wait Protocol gives us an idea of
how to add flow control to its predecessor, noiseless
channels are nonexistent. We discuss three protocols in
this section that use error control.
Topics discussed in this section:
Stop-and-Wait Automatic Repeat Request
Go-Back-N Automatic Repeat Request
Selective Repeat Automatic Repeat Request
11.24
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.
11.25

In Stop-and-Wait ARQ, we use sequence


numbers to number the frames.
The sequence numbers are based on
modulo-2 arithmetic.
11.26

Note

In Stop-and-Wait ARQ, the acknowledgment


number always announces in modulo-2
arithmetic the sequence number of the next
frame expected.
Design of the Stop-and-Wait ARQ Protocol
11.27
Algorithm 11.5 Sender-site algorithm for Stop-and-Wait ARQ
11.28

(continued)
(continued)
Algorithm 11.5 Sender-site algorithm for Stop-and-Wait ARQ
11.29
Algorithm 11.6 Receiver-site algorithm for Stop-and-Wait ARQ Protocol
11.30

You might also like