Flow and Error Control

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

DATA COMMUNICATION & NETWORKS

FLOW CONTROL &ERROR CONTROL


Roll No: 2001086-011
Submitted By: Kainat
Submitted To: M’am Ayesha
Rashid
Flow and Error Control
Flow Control:
Flow control organizes that measure of information that can be sent prior to getting an
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 acknowledgement (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 alludes to techniques for error location and retransmission.
 Every time 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 hub to-hub connections, flow and error control is done in the data link layer.
 For end-point to end-point, flow and error control is carried out in the transport layer.

• One important aspect of the data link layer is flow control.

• Flow control alludes to a bunch of strategies used to limit the measure of information the
sender can send prior to sitting tight for acknowledgement.
1. 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.

• For each frame that is sent, there should be an acknowledged, which takes a comparable
measure of propagation time to return to the sender.

• Only one frame can be in transmission at a time. This prompts shortcoming if propagation is
any longer than the transmission delay

Advantages of Stop and Wait:

 It' straightforward and each casing is checked and acknowledged well.

Disadvantages of Stop and Wait:

 Only one frame can be in transmission at a time.


 The time spent for holding up acknowledgements between each frame can add huge
add up to the absolute transmission time.
 It is inefficient, if the distance between devices is long. Reason is propagation delay is
much longer than the transmission deal

2. 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,
outlines get a number from 0 to n - 1. Ensuing casings get a number mod n.

• The sender can send as many frames as would fit into a window.

• The receiver, after accepting enough frames, will react with an affirmation of all casings in a
measured way in the window. It is called slide

• This window can hold frames at one or the flip side and gives as far as possible on the
quantity of casings that can be transmitted prior to requiring an affirmation.

• For instance, if n = 8, the casings 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 window is (n - 1) = 7.

• When the receiver sends an ACK, it includes the number of the next frame it expects to
receive. At the point when the receiver sends an ACK containing the number 5, it implies all
casings up to number 4 have been gotten.

• On the off chance that the window size is adequately huge the sender can constantly transmit
packets: o If W >= (2a+1), sender can send ceaselessly. (Effectiveness =1). If W < (2a+1), sender
can transmit W frames every (2a+1) time units. (Efficiency = W/(1+2a)).

Error control Techniques


• Numerous variables including line commotion can modify or clear out at least one pieces of a
given data unit.
• Reliable systems must have mechanism for detecting and correcting such errors.

• Error detection and correction are implemented either at the data link layer or the transport
layer of the OSI model.

Flow control and Error control Techniques (ARQ schemes)

Stop and Wait ARQ:


 Include re-transmission of data in case of lost or damaged framer.
 It is addition to the basic flow control mechanism with re-transmissions.

(i) Sender sends an information outlines to receiver.


(ii) Sender awaits for an ACK before sending the further frame.
(iii) Receiver sends an ACK if frame is correctly received.
(iv) If no ACK arrives within time-out, sender will resend the frame.

Time-out period > Round trip time

 If an error is discovered in a data frame, indicating that it has been corrupted in transit,
a NAK frame is returned. NAK frames, which are numbered, tell the sender to retransmit
the last frame sent.
 Piggybacking: In bidirectional communications, both parties send & acknowledge data,
i.e., both parties implement flow control. Outstanding ACKs are placed in the header of
information frames, piggybacking can save transmission capacity since the overhead
from a data frame and an ACK frame (addresses, CRC, etc) can be joined into just one
frame.

Sliding Window ARQ:


 To cover retransmission of lost or damaged frames, some features are added to the
basic flow control mechanism of sliding window.
 A Sender may send multiple frames as allowed by the window size.
 The sending device keeps copies of all transmitted frames, until they have been
acknowledged.
 In addition to ACK frames, the receiver has the option of returning a NAK frame, if the
data have been received damaged. NAK frame tells the sender to retransmit a damaged
outline.
 Here, both ACK and NAK frames must be numbered for identification.
 ACK frames carry the number of next frame expected.
 NAK frames on the other hand, carry the number of the damaged frame itself.
 If the last ACK was numbered 3, an ACK 6 acknowledges the receipt of frames 3, 4 and 5
as well.
 If data frames 4 and 5 are received spoiled, both NAK 4 and NAK 5 must be get backed.
 Like stop and wait ARQ, the sending device in sliding window ARQ is equipped with a
timer to enable it to handle lost acknowledgements.
 Sliding window ARQ is two categories:
1. Go-back-n ARQ,
2. Selective Reject ARQ.
 There are two ACK processing methods in sliding windows:
o Selective ACK: The ACK N message acknowledges only the frame with
sequence number N.
o Cumulative ACK: The ACK N message acknowledges all frames with sequence
number <= N.

Go-Back-N ARQ
Stop and wait ARQ mechanism does not utilize the resources at their best. When the
acknowledgement is received, the sender sits idle and does nothing. In Go-Back-N ARQ
method, both sender and receiver maintain a window.
 The sending-window size enables the sender to send multiple frames without receiving
the acknowledgement of the previous ones. The receiving-window enables the receiver
to receive multiple frames and acknowledge them. The receiver keeps track of incoming
frame's sequence number.
 When the sender sends all the frames in window, it checks up to what sequence
number it has received positive acknowledgement. If all frames are positively
acknowledged. the sender sends next set of frames. If sender finds that it has received
NACK or has not receive any ACK for a particular frame, it retransmits all the frames
after which it does not receive any positive ACK.
Selective Repeat ARQ:
In Go-back-N ARQ. it is assumed that the receiver does not have any buffer space for its
window size and has to process each frame as it comes. This enforces the sender to retransmit
all the frames which are not acknowledged.

In Selective-Repeat ARQ, the receiver while keeping track of sequence numbers, buffers the
frames in memory and sends NACK for only frame which is missing or damaged.

The sender in this case, sends only packet for which NACK is received.

 The error-correction model (ECM)


If, then, Yt and Xt are cointegrated, by definition uˆt ∼ I (0). Thus, we can express the
relationship between Yt and Xt with an ECM specification as:
Yt = a0 + b1Xt − πuˆt−1 + et

which will now have the advantage of including both long-run and short-run information. In this
model, b1 is the impact multiplier (the short-run effect) that measures the immediate impact a
change in Xt will have on a change in Yt. On the other hand, π is the feedback effect, or the
adjustment effect, and shows how much of the disequilibrium is being corrected – that is the
extent to which any disequilibrium in the previous period affects any adjustment in Yt. Of
course, uˆt−1 = Yt−1 −βˆ 1 −βˆ 2Xt−1, and therefore from this equation β2 is also the long-run
response

Equation now emphasizes the basic approach of the cointegration and error-correction models.
The spurious regression problem arises because we are using non-stationary data, but in
Equation everything is stationary, the change in X and Y is stationary because they are assumed
to be I (1) variables, and the residual from the level’s regression is also stationary, by the
assumption of cointegration. So, Equation fully conforms to our set of assumptions about the
classic linear regression model and OLS should perform well.

Advantages of the ECM


The ECM is important and popular for many reasons:

1. First, it is a convenient model measuring the correction from disequilibrium of the


previous period, which has a very good economic implication.
2. Second, if we have cointegration, ECMs are formulated in terms of first differences,
which typically eliminate trends from the variables involved, and they resolve the
problem of spurious regressions.
3. A third, very important, advantage of ECMs is the ease with which they can fit into the
general to specific approach to econometric modelling, which is in fact a search for the
most parsimonious ECM model that best fits the given data sets.
4. Finally, the fourth and most important feature of the ECM comes from the fact that the
disequilibrium error term is a stationary variable (by definition of cointegration).
Because of this, the ECM has important implications: the fact that the two variables are
cointegrated implies that there is some adjustment process preventing the errors in the
long-run relationship from becoming larger and larger.

You might also like