 hello friends in this video we are going to discuss about the window size selection in sliding window flow control mechanism at the end of this video the outcomes expected are we can describe the requirement of window and we must be able to select appropriate size of window for the sliding window flow control mechanism the basic goals are the need of window in sliding window what is the meaning of piggybacking the use of sequence numbers during the frame communication then the timers used for the frame communications and finally we are going to discuss about selection criteria of window for the starting window flow control now briefly we are discussing the features of starting window in the sliding window both sender and receiver is going to manage some window for the communication as we manage windows on both sides the starting window is normally called as a buffered transfer during every frame communication the sender management timer and before this timer is elapsed back to zero we expect some feedback from receiver side suppose the feedback doesn't come in the given time period then the sender times out and retransmit the same frame once again now in this sliding window the feedback is provided by receiver as rrn where the integer n specifies up to n-1 sequence numbers the frames are received successfully at the site of receiver in sliding window the feedback is piggybacked now what is the need of sequence number now in the sliding window flow control the sender is allowed to send more than one frame on a channel without waiting for the feedback hence to distinguish every frame from each other we expect some sequence number to be inserted now this number also help to the receiver to provide the specific feedback for the frame he receives but when we choose the sequence number we must careful that the length of sequence number should be very small that is it doesn't consume much space in the frame now to specify sequence number we use some binary bits so the size of window is defined as 2 raised to n that is for 3-bit sequence number the window size is 8 now as I said here the center and receiver both are going to manage some window so in this case we are showing some windows one is at the center side other is at the receiver side in this case we use a 3-bit sequence number now just try to understand some problems are faced during practical communication with the window setting set to W equal to 2 raised to n suppose currently I use suppose a 2-bit sequence number that is I am allowed to use the maximum window size of 4 now diagram shows here the sender is going to have a window which carries the frame from F0, F1, F2 and F3 and these frames are sent by the sender on the channel now these frames are received by receiver as the sequence numbers are falling in the legal window size at receiver those frames are accepted now the receiver is going to apply some check against error control and he is going to plan for feedback now suppose currently he planned to give feedback after checking the 0, 1st and 2nd frame so he gives the feedback as RR3 so number 3 confirms that the frame number 0, 1 and 2 are received successfully by receiver and depending upon this feedback the again sender is going to re-align its window again starting with F3 again F0, F1 and F2 now suppose in the second phase of transmission the sender sends the frame suppose F3, F0, F1 and F2 and suppose these all frames are get garbled or suppose get lost because of errors on the given channel so sender wait for some time and when you find this no feedback is coming to its side he can send one additional signal called as inquiry to probe the network conditions now upon getting this inquiry back at the receiver side the receiver has to reply the inquiry signal so what he do he simply repeat the previous feedback signal once again now so he repeat the previous signal as RR3 now when this signal comes at the sender side we interpret that signal wrongly here because the feedback is given for the previous phase of communication and currently the case is that the frame F3 up to F2 are get lost in the network here now as RR3 signal carries a number 3 which confirms that the frames up to 2 they are received successfully by receiver and here we expect that from the given diagram all the frames are received successfully by the receiver but actual thing is that all the frames has got lost and here the protocol fails so what is solution here now here the confusion is because of the sequence number we use so number 2 in the previous sequence number is covered by the feedback signal RR3 which is creating confusion there so we can use a modified window size defined as 2 raise to n minus 1 which confirm that the frame number 2 will not be a part of legal window at the sender side and this problem can be avoided but this again a problem is faced here even with if you say it suppose the window size is equal to 2 raise to n minus 1 so whenever we get some sort of network which carries more noise during communication now in this cases the studying window flow control takes one more care in this case we attach one timer for every frame we transmit so we load some timers count in the timer and before this count becomes 0 the sender expects some feedback from receiver side suppose that feedback doesn't come in the given time period that is suppose the timer get elapsed back to 0 the sender repeat the same packet once again and this is normally called a retransmission of the frame in a studying window now again the diagram shows that I use a 3 bit sequence number so I can have the sequence number from 0 up to 7 I am marking here one red rectangle it gives me the legal windows on both senders and the receiver side now take one more example here let us see the practical condition we are facing now in initial transmission phase the sender plan to send frame 0 up to 6 suppose all the frames are received by receiver successfully and he planned to give the feedback here so obviously the feedback is given by the receiver as rr7 and he will transfer all the frames to upper layers to further modifications and this is going to slide its window newly now back given by this red rectangle here that is currently the frame 7 and the frame from 0 up to 5 are the part of legal window whereas the frame number 6 is not a part of legal window now suppose the feedback sent by receiver is lost because of error on the channel so that the transmitter is waiting for the feedback here and obviously after some time the timer for frame 0 get elapsed here and he planned to transmit the frame once again here but when he transmit the same frame once again here that is frame 0 it comes to the receiver side again reserve find that the frame sequence number lies in the legal window he accept the frame now this frame is sent to upper layers to further process and in dll we found that the frame has already received by the receiver now here though we we create duplicates of the frames here and we found that in these cases the protocol fails here now how to overcome this difficulty here now in this case we found that the sequence numbers at the site of receiver are overlapping with the sequence numbers of the transmitter here if you suppose choose the window size in such a way that so after first phase of transmission this window sizes or window sequence number doesn't overlap this problem can be overcame that is suppose if i choose a window half of that one that is suppose i will use 3 bit sequence number that gives me window size of 8 now that is i can use the maximum sequence up to 7 here and window size equal to 8 so i will use only half of the window here now with this case we avoid all the confusion that we create in the previous case here now again question become how to use the window size properly in the starting window so for normal networks we are going to set the window size equal to 2 raised to n minus 1 and for the more nauseous channels we use the window size equal to w equal to max sequence number plus 1 upon 2 that is for n equals to 3 the sequence numbers are 0 to 7 and we manage the window size only up to 4 this gives me a total overcoming of a confusion during standing window flow control these are my references thank you friends and thank you