



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Sliding window protocol is a flow control protocol. It allows the sender to send multiple frames before needing the acknowledgements. Sender slides its window on receiving the acknowledgements for the sent frames. This allows the sender to send more frames. It is called so because it involves sliding of sender’s window. Maximum number of frames that sender can send without acknowledgement = Sender window size
In a sliding window protocol, optimal sender window size = 1 + 2a To get 100% efficiency, we must have- η = 1 Tt / (Tt + 2Tp) = 1 Tt = Tt + 2Tp Thus, To get 100% efficiency, transmission time must be Tt + 2Tp instead of Tt. This means sender must send the frames in waiting time too. Now, let us find the maximum number of frames that can be sent in time Tt + 2Tp. We have- In time Tt, sender sends one frame. Thus, In time Tt + 2Tp, sender can send (Tt + 2Tp) / Tt frames i.e. 1+2a frames. Thus, to achieve 100% efficiency, window size of the sender must be 1+2a.
Each sending frame has to be given a unique sequence number. Maximum number of frames that can be sent in a window = 1+2a. So, minimum number of sequence numbers required = 1+2a. To have 1+2a sequence numbers, Minimum number of bits required in sequence number field = ⌈log 2 (1+2a)⌉
When minimum number of bits is asked, we take the ceil. When maximum number of bits is asked, we take the floor.
The size of the sender’s window is bounded by-
Part-01: To get the maximum efficiency, sender window size = 1 + 2a = 1 + 2 x (Tp / Tt) = 1 + 2 x (49.5 msec / 1 msec) = 1 + 2 x 49. = 100 Thus, For maximum efficiency, sender window size = 100 Part-02: Minimum number of bits required in the sequence number field = ⌈log 2 (1+2a)⌉ = ⌈log 2 (100)⌉ = ⌈6.8⌉ = 7 Thus, Minimum number of bits required in the sequence number field = 7 Part-03: If only 6 bits are reserved in the sequence number field, then- Maximum sequence numbers possible = 2^6 = 64 Now, Efficiency = Sender window size in the protocol / Optimal sender window size = 64 / 100 = 0.
If transmission delay and propagation delay in a sliding window protocol are 1 msec and 99.5 msec respectively, then-
Given- Transmission delay = 1 msec Propagation delay = 99.5 msec Part-01: To get the maximum efficiency, sender window size = 1 + 2a = 1 + 2 x (Tp / Tt) = 1 + 2 x (99.5 msec / 1 msec) = 1 + 2 x 99. = 200 Thus, For maximum efficiency, sender window size = 200 Part-02: Minimum number of bits required in the sequence number field = ⌈log 2 (1+2a)⌉ = ⌈log 2 (200)⌉ = ⌈7.64⌉ = 8