Open In App
Related Articles

Sliding Window Protocol | Set 3 (Selective Repeat)

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Prerequisite : Sliding Window Protocol – Set 1 (Sender Side), Set 2 (Receiver Side) Why Selective Repeat Protocol? The go-back-n protocol works well if errors are less, but if the line is poor it wastes a lot of bandwidth on retransmitted frames. An alternative strategy, the selective repeat protocol, is to allow the receiver to accept and buffer the frames following a damaged or lost one. Selective Repeat attempts to retransmit only those packets that are actually lost (due to errors) :

  • Receiver must be able to accept packets out of order.
  • Since receiver must release packets to higher layer in order, the receiver must be able to buffer some packets.

Retransmission requests :

  • Implicit – The receiver acknowledges every good packet, packets that are not ACKed before a time-out are assumed lost or in error.Notice that this approach must be used to be sure that every packet is eventually received.
  • Explicit – An explicit NAK (selective reject) can request retransmission of just one packet. This approach can expedite the retransmission but is not strictly needed.
  • One or both approaches are used in practice.

Selective Repeat Protocol (SRP) : This protocol(SRP) is mostly identical to GBN protocol, except that buffers are used and the receiver, and the sender, each maintains a window of size. SRP works better when the link is very unreliable. Because in this case, retransmission tends to happen more frequently, selectively retransmitting frames is more efficient than retransmitting all of them. SRP also requires full-duplex link. backward acknowledgements are also in progress.

  • Sender’s Windows ( Ws) = Receiver’s Windows ( Wr).
  • Window size should be less than or equal to half the sequence number in SR protocol. This is to avoid packets being recognized incorrectly. If the size of the window is greater than half the sequence number space, then if an ACK is lost, the sender may send new packets that the receiver believes are retransmissions.
  • Sender can transmit new packets as long as their number is with W of all unACKed packets.
  • Sender retransmit un-ACKed packets after a timeout – Or upon a NAK if NAK is employed.
  • Receiver ACKs all correct packets.
  • Receiver stores correct packets until they can be delivered in order to the higher layer.
  • In Selective Repeat ARQ, the size of the sender and receiver window must be at most one-half of 2^m.

Figure – the sender only retransmits frames, for which a NAK is receivedEfficiency of Selective Repeat Protocol (SRP) is same as GO-Back-N’s efficiency :

Efficiency = N/(1+2a)
Where a = Propagation delay / Transmission delay
Buffers = N + N
Sequence number = N(sender side) + N ( Receiver Side)

if  Tt(ack) :Transmission delay for acknowledgment , Tq: Queuing delay and  Tpro: Processing delay is mention

We know that the Efficiency (?),

=Useful time / Total cycle time

=Tt(data) /Tt(data) + 2*Tp + Tq + Tpro + Tt(ack)

Tt(data) : Transmission delay for Data packet
Tp : propagation delay for Data packet
Tq: Queuing delay
Tpro: Processing delay
Tt(ack): Transmission delay for acknowledgment

Above formula is applicable for any condition, if any of the things are not given we assume it to be 0.


References – Slideshare Youtube MIT article<


Last Updated : 31 Aug, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads