Sliding window protocol working principle and types

This article is about to Sliding window protocol,working principle,example and types of sliding window protocol .

Sliding window protocol

The window may be a technique for causing multiple frames at a time. It controls the information packets between the 2 devices wherever reliable and gradual delivery of information frames is needed. it’s conjointly used in TCP (Transmission management Protocol).

In this technique, every frame has sent from the sequence number. The sequence numbers are wont to notice the missing data within the receiver end. the aim of the sliding window technique is to avoid duplicate data, so it uses the sequence number.

Working Principle of Sliding window protocol :

In these protocols, the sender contains a buffer referred to as the causation window and therefore the receiver has buffer called the receiving window.

The size of the sending window determines the sequence variety of the outward frames. If the sequence number of the frames is an n-bit field, then the vary of sequence numbers that may be allotted is zero to 2𝑛−1. Consequently, the dimensions of the sending window is 2𝑛−1. therefore so as to accommodate a sending window size of 2𝑛−1, a n-bit sequence number is chosen.

Read Also : Difference between DBMS and RDBMS

The sequence numbers are numbered as modulo-n. For example, if the sending window size is 4, then the sequence numbers are going to be 0, 1, two, 3, 0, 1, 2, 3, 0, 1, and then on. the amount of bits within the sequence number is 2 to get the binary sequence 00, 01, 10, 11.

The size of the receiving window is that the maximum number of frames that the receiver will settle for at a time. It determines the utmost number of frames that the sender can send before receiving acknowledgment.


Suppose that we’ve got sender window and receiver window every of size 4. that the sequence listing of each the windows will be 0,1,2,3,0,1,2 and so on. The following diagram shows the positions of the windows once causation the frames and receiving acknowledgments.

Sliding window protocol

Types of Sliding Window Protocol :

Mainly we have a two types of protocol

  1. Go – Back – N ARQ
  2. Selective Repeat ARQ

Read Also : Addressing modes of 8086 microprocessorc

1. Go – Back – N ARQ

Go – Back – N ARQ provides for causation multiple frames before receiving the acknowledgment for the primary frame. It uses the conception of window, then is additionally referred to as slippery window protocol. The frames are consecutive rangeed and a finite number of frames are sent. If the acknowledgment of a frame isn’t received among the time period, all frames ranging from that frame are retransmitted.

2. Selective Repeat ARQ

Selective Repeat ARQ This protocol also provides for sending multiple frames before receiving the acknowledgment for the first frame. However, here solely the incorrect or lost frames are retransmitted, whereas the great frames are received and buffered.

Difference between the Go-Back-N ARQ and Selective Repeat ARQ?

[table id=4 /]

Share on:

Learnitspro is the online learning platform,Here you will find best articles for online learning.

1 thought on “Sliding window protocol working principle and types”

Leave a Comment