Flow Control
Flow Control
Signature Signature
Dr. Seli Mohapatra Dr. Rojalina Priyadarshini
1|Page
Abstract :
2|Page
INDEX
INTRODUCTION 4
STOP-AND-WAIT ARQ 5
GO-BACK-N ARQ 6
COMPARISION 8
PROGRAM 9
CONCLUSION 13
REFERENCE 14
3|Page
INTRODUCTION:
Latency Measurement: Latency is the time delay between the initiation of a data transfer
and its completion. Performance analysis aims to understand how flow control
mechanisms affect latency. Lower latency is often a desirable outcome, especially in
applications where real-time communication is critical.
Error Rates and Reliability: Flow control mechanisms should ensure reliable data
transmission, minimizing errors and retransmissions. Performance analysis assesses
error rates and the overall reliability of data transfer under different scenarios.
Congestion Management: The analysis examines how well flow control mechanisms
handle and alleviate network congestion. This involves studying the mechanisms' ability
to adapt to changing network conditions, adjust transmission rates, and prevent
congestion-related issues.
4|Page
Stop-and-Wait ARQ :
Stop-and-Wait Automatic Repeat reQuest (ARQ) is a simple and widely used flow control
mechanism in data communication, particularly in point-to-point communication and
protocols such as the HDLC (High-Level Data Link Control). The primary purpose of Stop-
and-Wait ARQ is to ensure reliable and sequential data transfer between a sender and a
receiver over a communication channel that may introduce errors or delays.
Here's an overview of how Stop-and-Wait ARQ works:
Basic Operation:
The sender transmits a frame to the receiver.
The sender then waits for an acknowledgment (ACK) from the receiver.
ACK Reception:
If the receiver successfully receives the frame without errors, it sends an ACK back to the
sender, indicating that the frame was received correctly.
If errors are detected, the receiver discards the frame and sends a Negative
ACKnowledgment (NAK) or simply does not send an ACK.
Timeout Handling:
If the sender does not receive an ACK within a specified timeout period, it assumes that
the frame was lost or damaged during transmission.
In such cases, the sender retransmits the same frame.
Sequential Transmission:
The sender ensures that only one frame is in transit
at any given time, waiting for the acknowledgment
before sending the next frame.
This ensures sequential and error-free delivery of
frames.
Advantages:
Simplicity: Stop-and-Wait ARQ is straightforward
and easy to implement.
Sequential Delivery: Ensures that frames are delivered in the correct order.Error Recovery:
Capable of recovering from lost or damaged frames through retransmission.
5|Page
Go-Back-N ARQ :
Go-Back-N Automatic Repeat reQuest (ARQ) is a flow control mechanism used in data
communication to ensure reliable and sequential delivery of frames between a sender
and a receiver. It is a sliding window protocol and an extension of the Stop-and-Wait ARQ
mechanism, designed to enhance efficiency by allowing multiple frames to be in transit
simultaneously.
Here's an overview of how Go-Back-N ARQ works:
Sliding Window Operation:
Unlike Stop-and-Wait, Go-Back-N allows the sender to transmit multiple frames before
receiving acknowledgments.
The sender maintains a "send window" that represents the maximum number of frames
allowed in transit without acknowledgment.
Frame Transmission:
The sender can transmit frames within the send window without waiting for individual
acknowledgments.
Each frame is assigned a sequence number, and the receiver acknowledges the receipt
of frames up to a certain sequence number.
Receiver Acknowledgment:
The receiver acknowledges the correct reception of frames by sending a cumulative
acknowledgment.
Negative Acknowledgment (NAK):
If the receiver detects an error in a frame, it sends a
negative acknowledgment (NAK), requesting the
retransmission of the frames starting from the one in
error.
Sender Actions:
Upon receiving an acknowledgment, the sender shifts
the window forward and can transmit new frames.
In the case of a NAK or a timeout, the sender
retransmits all frames starting from the one indicated
by the NAK.
6|Page
Selective Repeat ARQ :
Selective Repeat Automatic Repeat reQuest (ARQ) is a flow control mechanism
used in data communication to ensure reliable and efficient transmission of
frames between a sender and a receiver. It is an advanced sliding window
protocol, building on the concepts of Go-Back-N ARQ, but with a more
sophisticated approach that allows selective retransmission of only the frames
that are corrupted or lost.
Here's an overview of how Selective Repeat ARQ works:
Sliding Window Operation:
Similar to Go-Back-N, Selective Repeat allows the sender to transmit multiple
frames before receiving acknowledgments.
Both the sender and receiver maintain a window of frames, but unlike Go-Back-
N, Selective Repeat allows the sender to continue sending frames even if some
are awaiting acknowledgment.
Individual Acknowledgments:
The receiver sends individual acknowledgments for each correctly received
frame, specifying the sequence number of the received frame.
If a frame is received out of order or if errors are detected, the receiver discards
the frame without acknowledgment.
Negative Acknowledgment (NAK):
In case of a lost or corrupted frame, the receiver sends a NAK for the specific
frame, requesting its retransmission.
Sender Actions:
Upon receiving acknowledgments, the sender shifts the
window forward and can transmit new frames.
Upon receiving a NAK, the sender retransmits only the
frame indicated by the NAK, rather than retransmitting all
frames from a specific point, as in Go-Back-N.
7|Page
Differences :
8|Page
Program :
9|Page
10 | P a g e
Output :
11 | P a g e
Observation table :
12 | P a g e
Conclusion :
13 | P a g e
Reference :
https://youtu.be/QD3oCelHJ20
https://chat.openai.com/c/9157ec14-9853-44e3-85b9-
f399e5ac00d4
14 | P a g e
THANK YOU !
15 | P a g e