Open In App

Sliding Window protocols Summary With Questions

Prerequisites – Stop & Wait, Go Back N, Selective Repeat

Summary of all the protocols –

Before starting with the questions a quick recap for all the protocols. Stop and wait –



  1. Sender window size (Ws) = 1
  2. Receiver window size (Wr) = 1
  3. Sequence Number ≥ 1 + 1
  4. Uses independent acknowledgement
  5. Discards out of order packets
  6. Packet Loss ? Retransmit packet after time out
  7. Acknowledgement loss ? Resends packet after time out
  8. Efficiency = 1/(1+2a) where a = Tp / Tt

Go Back N –

  1. Sender window size Ws = N
  2. Receiver window size Wr = 1
  3. Sequence number ≥ N + 1
  4. Can use both cumulative or independent acknowledgement depends on acknowledge timer
  5. Discards out of order packets
  6. Packet Loss ? Track back N size from the last packet within the window limit to the lost packet and retransmit them
  7. Acknowledgement loss ? If not received before timeout the entire window N size is resend
  8. Efficiency = N/(1+2a) where a = Tp / Tt

Selective Repeat –



  1. Sender window size Ws = N
  2. Receiver window size Wr = N
  3. Sequence Number ≥ N + N
  4. Uses only independent acknowledgement
  5. Can Accept out of order packets
  6. Packet Loss ? Resend only the lost packet after timeout
  7. Acknowledgement loss ? Resend if not receive before timeout
  8. Efficiency = N/(1+2a) where a = Tp / Tt

Practice Questions –

1 2 3 4 5 6 7 8 9 10 (Initially)
      ^
1 2 3 4 4 5 6 7 8 9 10 (Packet no. 4 retransmitted) 
              ^
1 2 3 4 4 5 6 7 7 8 9 10 (Packet no. 10 retransmitted)
                       ^
1 2 3 4 4 5 6 7 7 8 9 10 10 (Result)
1 2 3 4 5 6 7  | 8 9 10 
        ^   $            (packet no. 5 lost)
1 2 3 4 5 6 7 5 6 7 8 9 | 10
              *   ^   $       
1 2 3 4 5 6 7 5 6 7 8 9 7 8 9 10
                        *   ^  $
1 2 3 4 5 6 7 5 6 7 8 9 7 8 9 10 9 10 (count starts from * till ^)
(from ^ to $ retransmission is done)
1 2 3 4 5 6 7 8 9 10
        ^
1 2 3 4 5 5 6 7 8 9 10
                  ^
1 2 3 4 5 5 6 7 8 9 9 10
Article Tags :