Anda di halaman 1dari 17

Topics to be Discussed in the Section

Communication Networks
Flow Control: Sliding Window Protocols

9/8/2016

RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Sliding Window
Sliding Window = an automatic repeat request (ARQ) protocol
The sending process continues to send a number of frames specified by
a (send) window size even without receiving an acknowledgement (ACK)
frame from the receiver.

Sliding window is best known algorithm in networking.


1. It enables reliable delivery of packets
Timeouts and ACKs

2. It enables the order of delivery.


Rx doesnt pass data up to application until it has packets in order

3. It enables flow control


Prevents server from overflowing Rxs buffer

9/8/2016

RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Sliding Window

Allow multiple frames to be in


transit
Each frame is
numbered(sequence number)
Sequence number bounded by
size of field (k)
Frames are numbered
modulo 2k

Sender window maintains a


list of sequence numbers
that it is allowed to send.

Rx window maintains a list


of sequence numbers that
is prepared to receive.
9/8/2016

RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Sliding Window

9/8/2016

Fig: 1-bit Sliding Window


RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Sliding Window Comments


If the maximum window size is one, then we have stop-and-wait
protocol.
If duplex, use piggybacking
Attach ACK with data frames.
If no data to send, use ACK frame
If data but no ACK to send, send last ACK number again.

9/8/2016

RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Sliding Window Protocols


Go-Back-N ARQ = a specific instance of the Sliding Window protocol, in
which: The receive window size = 1.

Go-Back-N ARQ: Sliding Window Protocol

Fig: Sender sliding window

Fig: Receiver sliding window


9/8/2016

RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Go-Back-N ARQ: Sliding Window Protocol

Fig: Go-Back-N ARQ, normal operation

9/8/2016

RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Go-Back-N ARQ: Sliding Window Protocol

9/8/2016

Fig: Go-Back-N ARQ, lost frame


RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Go-Back-N ARQ: Sliding Window Protocol

Fig: Go-Back-N ARQ, Sender Window size


9/8/2016

RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Go-Back-N ARQ: Sliding Window Protocol

Fig: Control variables


S Sequence number of the recently sent frame
SF Sequence number of the 1st frame in the window
SL Sequence number of the last frame in window
Size of window, W = SL SF + 1
In Go-Back-N ARQ, if wrongly receive frame comes, all successive frames will be
discarded, and they need to be retransmitted.
In Go-Back-N ARQ, the size of the sender window must be less than 2m; the size
of the receiver window is always 1. ( m No. of bits for Sequence number in the
9/8/2016
Header)

RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Selective-Repeat ARQ: Sliding Window Protocol


In Selective Repeat ARQ, only wrongly received frame needs to be
retransmitted.
In Selective Repeat ARQ, Max. window size is half of the range of
sequence numbers.

Fig: Selective Repeat ARQ, sender and receiver windows

9/8/2016

RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Selective-Repeat ARQ: Sliding Window Protocol

9/8/2016

Fig: Selective Repeat ARQ, Lost frame


RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

Selective-Repeat ARQ: Sliding Window Protocol


In Selective Repeat ARQ, the size of the sender and receiver window must
be at most one-half of 2m.

9/8/2016

Fig: Selective Repeat ARQ, sender window size


RAVILLA DILLI Faculty E & C Dept., MIT, Manipal

QUERIES ?

9/8/2016

CO&A DILLI RAVILLA E&C Dept.,

9/8/2016

CO&A DILLI RAVILLA E&C Dept.,

Anda mungkin juga menyukai