Numerical Method

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 9

Explain with diagram that Sliding

window size 𝟐𝒎−𝟏


INTRODUCTION
The sliding window protocol is a flow control mechanism used in the data link layer of the OSI reference model to
ensure efficient and reliable communication between two devices over a communication link. Its primary purpose is
to manage the flow of data between the sender and receiver, preventing congestion and ensuring that data is
transmitted accurately and in the correct order.
Here are the key concepts of the sliding window protocol :
1. Window Size :
The "window" refers to a range of sequence numbers assigned to the frames that can be sent or received. The
window size represents the maximum number of frames that can be transmitted before an acknowledgment is
required.
2. Acknowledgments :
The receiver sends acknowledgments (ACKs) to the sender to confirm the successful receipt of frames. The
acknowledgment includes the sequence number of the next frame the receiver expects to receive.
3. Sender's View
The sender maintains a "send window" that represents the range of sequence numbers for which it has sent
frames. The sender can transmit frames with sequence numbers within the current window.
4. Receiver's View
The receiver maintains a "receive window" that represents the range of acceptable sequence numbers it can
receive. The receiver discards out–of–order frames and uses the acknowledgment to inform the sender about the
next expected frame.
FEATURES
5. Sliding Mechanism:
As acknowledgments are received, the sender's window slides to allow the transmission of new frames. Successful
acknowledgments indicate that the frames within the acknowledged range were received successfully.
6. Selective Repeat and Go–Back–N :
There are two main types of sliding window protocols: Selective Repeat and Go–Back–N. Selective Repeat allows the
sender to retransmit only the frames that were not successfully received, while Go–Back–N requires retransmission of
all frames from the damaged or lost one onward.
7. Timeouts and Retransmission :
A timeout mechanism is used to detect lost or damaged frames.If the sender doesn't receive an acknowledgment within
a specified time, it assumes the frame was lost and retransmits it.
8. Flow Control :
The sliding window protocol helps prevent congestion by dynamically adjusting the window size based on the network
conditions.
Overall, the sliding window protocol enhances the efficiency and reliability of data transmission by allowing for
continuous data flow while ensuring that frames are received in the correct order and without errors.
Sliding Window Size 𝟐𝒎−𝟏 for Go-Back-N ARQ:
In Go-Back-N ARQ, when the sender transmits 𝟐𝒎−𝟏frames and waits for acknowledgments, it means that the sender
can send up 𝟐𝒎−𝟏frames before receiving any acknowledgments. If an acknowledgment is not received within a certain
timeout period, the sender assumes that some frames are lost and retransmits all frames starting from the last
acknowledged frame.
2. Sequence Numbers : 3. Acknowledgments: The 4. Sender's Actions:The sender
1. Window Size :The
Each frame is assigned a receiver sends cumulative continues to send frames within
sender maintains a
sequence number by the acknowledgments, the current window. Upon
send window that
sender. The sequence indicating the highest receiving an acknowledgment,
represents the range
numbers are used to identify correctly received and in– the sender slides the window
of sequence numbers
and order the frames. order frame. If a frame forward, allowing for the
for which it has sent
with a sequence number transmission of new frames.
frames. The size of the
less than the expected
window determines
one is received, it is 5. Retransmission on Timeout
the number of frames
discarded, and the :If the sender's timer expires
that can be
acknowledgment for the without receiving an
outstanding (sent but
last correctly received acknowledgment, it assumes
not yet acknowledged)
frame is sent. that one or more frames
at any given time.
were lost or damaged. The
sender then retransmits all
frames in the current
window.
Here's a simple diagram to represent the Go-Back-N ARQ with a window size of 2𝑚−1∶

In the sender's window, frames are numbered from 0 to 2𝑚−1. The


sender can transmit up to frame 2𝑚−1but must wait for
acknowledgments before sending additional frames.

Disadvantages :
The main disadvantage of Go–Back–N is its inefficiency in handling frequent
errors. If errors occur, the sender may need to retransmit a large number of
frames, even if only one frame is lost or damaged. The receiver's buffer must be
large enough to store out–of–sequence frames until the missing frames arrive.
Sliding Window Size 𝟐𝒎−𝟏for Selective Repeat ARQ:
In Selective Repeat ARQ, the sender can have multiple frames in transit but doesn't necessarily have to resend all frames if an acknowledgment is missing. It allows for the
retransmission of only the frames that have been lost or damaged.
3. Acknowledgments :The
1. Window Size : receiver sends individual
2. Sequence Numbers 4. Sender's 5. Retransmission on
The sender and receiver acknowledgments for
:Frames are assigned Actions :The sender Timeout :If the sender's timer
each maintain a each correctly received
sequence numbers by continues to send expires without receiving an
window that represents and in–order frame. If a
the sender to identify frames within the acknowledgment, it assumes
the range of sequence frame with a sequence
and order them. The current window. that one or more frames were
numbers for which number less than the
sequence numbers Upon receiving an lost or damaged. The sender
frames have been sent expected one is received,
are used to keep track acknowledgment, the then retransmits only the
or are expected to be it is buffered, and a
of sent and received sender slides the frames that have not been
received. The size of cumulative
frames. window forward, acknowledged.
the window determines acknowledgment for the
allowing for the
the number of frames last correctly received
6. Selective transmission of new
that can be outstanding frame is sent.
Retransmission :Selective frames.
at any given time.
Repeat is more efficient than 8. Advantages:Selective Repeat
Go–Back–N in handling errors. has advantages over Go–Back–N
Only the lost or damaged 7. Efficiency :Selective
Repeat is particularly in terms of bandwidth utilization
frames are retransmitted, not and efficiency, especially when
the entire window. The efficient when
dealing with high– dealing with frequent errors.
receiver's buffer stores out–
of–sequence frames until the error environments,
missing frames arrive. as it minimizes the
amount of redundant
retransmission.
Here's a simple diagram to represent the Selective Repeat ARQ
with a window size of 2𝑚−1∶

In the sender's window, frames are also numbered from 0 to


2𝑚−2. The sender can transmit up to frame 2𝑚−1, and if an
acknowledgment is not received for a specific frame, only that
frame needs to be retransmitted.
SUMMARY

In summary, both Go-Back-N ARQ and Selective Repeat ARQ use a sliding window
size of 𝟐𝒎−𝟏allowing multiple frames to be in transit simultaneously. However,
they differ in how they handle retransmissions in the case of lost or damaged
frames. Go-Back-N retransmits all unacknowledged frames in the window, while
Selective Repeat retransmits only the specific frames with missing
acknowledgments.
Conclusion:

Both Go-Back-N ARQ and Selective Repeat ARQ provide reliability in data
transmission over unreliable channels, but they differ in how they handle
retransmissions when errors occur. Go-Back-N retransmits all frames from a
certain point, while Selective Repeat only retransmits the specific frames
that are missing or damaged.

You might also like