Sliding Window Protocol
Sliding Window Protocol
Sliding Window Protocol
protocol
What is sliding window protocol?
• Sliding window protocols are mainely used in flow
control.
• Sliding window protocols are data link layer protocols
for reliable and sequential delivery of data frames.
• It provides the upper limit on the number of frames that can be transmitted before
requiring an acknowledgment.
• Frames may be acknowledged by receiver at any point even when window is not
full on receiver side.
• Frames may be transmitted by source even when window is not yet full on sender
side.
• The windows have a specific size in which the frames are numbered modulo- n,
which means they are numbered from 0 to n-l. For e.g. if n = 8, the frames are
numbered 0, 1,2,3,4,5,6, 7, 0, 1,2,3,4,5,6, 7, 0, 1, ….
• The size of window is n-1. For e.g. In this case it is 7. Therefore, a maximum of n-l
frames may be sent before an acknowledgment.
Sliding Window on Sender Side
• At the beginning of a transmission, the sender’s
window contains n-l frames.
• As the frames are sent by source, the left boundary of
the window moves inward, shrinking the size of
window.
• This means if window size is w, if 4 frames are sent by
source after the last acknowledgment, then the number
of frames left in window is w-4.
• When the receiver sends an ACK, the source’s window
expand i.e. (right boundary moves outward) to allow in
a number of new frames equal to the number of frames
acknowledged by that ACK.
• For example, Let the window size is 7 (see diagram (a)), if
frames 0 through 3 have been sent and no acknowledgment
has been received, then the sender’s window contains three
frames – 4,5,6.