Selective Repeat | Sliding Window Protocol

Spread the love

Sliding Window Protocol-

 

Before you go through this article, make sure that you have gone through the previous article on Sliding Window Protocol.

 

The two well known implementations of sliding window protocol are-

 

 

  1. Go back N Protocol
  2. Selective Repeat Protocol

 

In this article, we will discuss about Selective Repeat protocol.

Learn about Go back N Protocol.

 

Selective Repeat Protocol-

 

Selective Repeat protocol or SR protocol is an implementation of a sliding window protocol.

The features and working of this protocol are explained in the following points-

 

Point-01:

 

In SR protocol, sender window size is always same as receiver window size.

 

In SR protocol,

  • Sender window size = Receiver window size
  • The size is of course greater than 1 otherwise the protocol will become Stop and Wait ARQ.
  • If n bits are available for sequence numbers, then-

Sender window size = Receiver window size = 2n/2 = 2n-1

 

Point-02:

 

SR protocol uses independent acknowledgements only.

 

In SR protocol,

  • Receiver acknowledges each frame independently.
  • As receiver receives a new frame from the sender, it sends its acknowledgement.

 

Point-03:

 

SR protocol does not accept the corrupted frames but does not silently discard them.

 

In SR protocol,

  • If receiver receives a frame that is corrupted, then it does not silently discard that frame.
  • Receiver handles the situation efficiently by sending a negative acknowledgement (NACK).
  • Negative acknowledgement allows early retransmission of the corrupted frame.
  • It also avoids waiting for the time out timer to expire at the sender side to retransmit the frame.

 

Point-05:

 

SR protocol accepts the out of order frames.

 

In SR protocol,

  • Consider receiver receives a frame whose sequence number is not what the receiver expects.
  • Then, it does not discard that frame rather accepts it and keeps it in its window.

 

Point-06:

 

SR protocol requires sorting at the receiver’s side.

 

In SR protocol,

  • Receiver window is implemented as a linked list.
  • When receiver receives a new frame, it places the new frame at the end of the linked list.
  • When the received frames are out of order, receiver performs the sorting.
  • Sorting sorts the frames in the correct order.

 

Point-07:

 

SR protocol requires searching at the sender’s side.

 

In SR protocol,

  • Receiver does not reject the out of order frames.
  • Receiver accepts the out of order frames and sort them later.
  • Thus, only the missing frame has to be sent by the sender.
  • For sending the missing frame, sender performs searching and finds the missing frame.
  • Then, sender selectively repeats that frame.
  • Thus, only the selected frame is repeated and not the entire window.
  • That is why, the protocol has been named as “Selective Repeat Protocol“.

 

Point-08:

 

SR protocol leads to retransmission of lost frames after expiry of time out timer.

 

In SR protocol,

  • Consider a frame being sent to the receiver is lost on the way.
  • Then, it is retransmitted only after time out timer expires for that frame at sender’s side.

 

Efficiency of SR Protocol-

 

Efficiency of any flow control protocol is given by-

 

Efficiency = Sender Window Size in Protocol / (1 + 2a)

 

In selective repeat protocol, if sender window size = N, then-

 

Efficiency of SR Protocol = N / (1 + 2a)

 

To gain better understanding about Selective Repeat ARQ,

Watch this Video Lecture

 

Next Article- Practice Problems On Selective Repeat Protocol

 

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Summary
Selective Repeat | Sliding Window Protocol
Article Name
Selective Repeat | Sliding Window Protocol
Description
Selective Repeat Protocol in computer networks is a Sliding Window Protocol. Selective Repeat ARQ or SR Protocol is an implementation of sliding window protocol like Go back N Protocol.
Author
Publisher Name
Gate Vidyalay
Publisher Logo

Spread the love