0% found this document useful (0 votes)
17 views5 pages

UNIt-2 Flow Control

computer network

Uploaded by

shrutiald89
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views5 pages

UNIt-2 Flow Control

computer network

Uploaded by

shrutiald89
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Flow Control

Flow control coordinates the amount of data that can be sent before receiving an acknowledgment
and is one of the most important duties of the data link layer.

In most protocols, flow control is a set of procedures that tells the sender how much data it can
transmit before it must wait for an acknowledgment from the receiver.

The flow of data must not be allowed to over whelm the receiver.

Any receiving device has a limited speed at which it can process incoming data and a limited amount
of memory in which to store incoming data.

The receiving device must be able to inform the sending device before those limits are reached and to
request that the transmitting device send fewer frames or stop temporarily.

Flow control refers to a set of procedures used to restrict the amount of data that the sender can
send before waiting for acknowledgment.

Simplest Protocol

It is a unidirectional protocol in which data frames are traveling in only one direction from the sender
to receiver.

We assume that the receiver can immediately handle any frame it receives with a processing time that
is small enough to be negligible. The data link layer of the receiver immediately removes the header
from the frame and hands the data packet to its network layer, which can also accept the packet
immediately. In other words, the receiver can never be overwhelmed with incoming frames.

Stop and Wait Protocol

The Sender sends one frame, stops until it receives confirmation from the receiver (okay to go ahead),
and then sends the next frame.
We still have unidirectional communication for data frames, but auxiliary ACK frames (simple tokens
of acknowledgment) travel from the other direction.

Stop and wait Automatic Repeat Request (ARQ)

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.

In this sequence number is based on modulo 2 arithmetic .Frame having number in alternate
010101….. In stop and wait ARQ, sequence no. define the frame to be sent and the acknowledgement
no. of ACK frame define the next frame to be expected.

Sender control variable (Sn) storing the sequence number of next frame to be sent .

e.g. if Sn store 0 , we send frame 0

Receiver control variable(Rn) storing the sequence number of next frame to be expected .
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.

Go Back – NARQ (Sliding Window protocol)

The first is called Go-Back-N Automatic Repeat Request (the rationale for the name will become clear
later). In this protocol we can send several frames before receiving acknowledgments; we keep a
copy of these frames until the acknowledgments arrive.

Sequence Numbers

If the header of the frame allows m bits for the sequence number, the sequence numbers range from
0 to 2m - 1. For example, if m is 4, the only sequence numbers are 0 through 15 inclusive. However,
we can repeat the sequence. So the sequence numbers are

0, 1,2,3,4,5,6, 7,8,9, 10, 11, 12, 13, 14, 15,0, 1,2,3,4,5,6,7,8,9,10, 11, ...

Sliding Window

The sliding window is an abstract concept that defines the range of sequence numbers that is the
concern of the sender and receiver.

The maximum size of the window is 2m – 1.

The send window is an abstract concept defining an imaginary box of size 2m − 1 with three variables:
Sf, Sn, and Ssize.

The send window can slide one or more slots when a valid acknowledgment arrives.
In Go-Back-N ARQ, the size of the send window must be less than 2m; the size of the receiver
window is always 1.

Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in which the size of the send window is 1.

Selective Repeat ARQ

Go-Back-N ARQ simplifies the process at the receiver site. The receiver keeps track of only one variable,
and there is no need to buffer out-of-order frames; they are simply discarded. However, this protocol
is very inefficient for a noisy link. There is another mechanism that does not resend N frames when
just one frame is damaged. Only the damaged frame is resent. This mechanism is called Selective
Repeat ARQ. It is more efficient for noisy links

Window Size
In Selective Repeat ARQ, the size of the sender and receiver window must be at most one-half of 2m

In Selective Repeat ARQ, the size of the sender and receiver window must be at most one-half of
2m.

You might also like