DDL Sliding Window Protocols
DDL Sliding Window Protocols
Figure 1: Piggybacking
Sliding Window Protocols
• In all sliding window protocols, each outbound
frame contains a sequence number, ranging from
0 up to some maximum.
• The maximum is usually 2n-1 so the sequence
number fits exactly in an n-bit field.
• The stop-and-wait sliding window protocol uses
n=1, restricting the sequence number to 0 and
1.
Sliding Window Protocols
• The essence of all sliding window protocols is
that at any instant of time, the sender maintains a
set of sequence numbers corresponding to
frames it is permitted to send.
• These frames are said to fall within the
sending window.
• Similarly, the receiver also maintains a receiving
window corresponding to the set of frames it is
permitted to accept.
Sliding Window Protocols
• The sender’s window and the receiver’s
window need not have the same lower and
upper limits or even have the same size.
• In some protocols they are fixed in size, but
in others they can grow or shrink over the
course of time as frames are sent and
received.
Sliding Window Protocols
Figure 3: Two scenarios for protocol 4. (a) Normal case. (b) Abnormal case.
The notation is (seq, ack, packet number). An asterisk indicates where a
network layer accepts a packet.
PROTOCOL 5: A Protocol Using Go Back N
• Until now we have made the tacit assumption that the transmission time
required for a frame to arrive at the receiver plus the transmission time for
the acknowledgement to come back is negligible.
• Sometimes this assumption is clearly false. In these situations the long
round-trip time can have important implications for the efficiency of the
bandwidth utilization.
• The technique of keeping multiple frames in flight is called as pipelining.
• Pipelining frames over an unreliable communication channel raises some
serious issues. First, what happens if a frame in the middle of a long stream
is damaged or lost? Large numbers of succeeding frames will arrive at the
receiver before the sender even finds out that anything is wrong.
• When a damaged frame arrives at the receiver, it obviously should be
discarded, but what should the receiver do with all the correct frames
following it? Remember that the receiving data link layer is obligated to
hand packets to the network layer in sequence.
PROTOCOL 5: A Protocol Using Go Back N
Two basic approaches are available for dealing with errors in the
presence of pipelining.
• In other words, the data link layer refuses to accept any frame
except the next one it must give to the network layer. Eventually,
the sender will time out and retransmit all unacknowledged
frames in order, starting with the damaged or lost one. This
approach can waste a lot of bandwidth if the error rate is high.
PROTOCOL 5: A Protocol Using Go Back N