 This is an example quiz question about sliding window flow control. In this question, the sliding window protocol is using a 3-bit sequence number. That means that each frame is numbered from 0 through to 7, and then we wrap around back to 0 again. And the protocol has a maximum window size of 7 frames, meaning the source node is allowed to send at a maximum of 7 frames before it must wait for an act. The current state of the source is that of the two variables, last frame act is set to 3 and last frame transmitted set to 6. Let's try and draw that and see what that means. Firstly, last frame act equals 3. So we can think that if the last frame act is 3, then that means frame with sequence number 3 and frames before that. 2, 1, 0, and before that have been already transmitted. I'll write transmitted as Tx, transmitted, and we've received an act back for them. So I'll write transmitted and act. So we'd like to keep track of the different frames at the source node and the state of those frames. So last frame act of 3 will separate that and distinguish this set of frames from future frames. So frame 3, last frame act. Because we transmit frames in order, the next frame to deal with will be frame 4. Back to our question. We know that the last frame transmitted was number 6. So that means frames number 4, 5, and 6 have been transmitted at this point in time. So note that these are transmitted but not yet act. That is, we've sent them but we haven't received an acknowledgement from the destination yet. So the last frame transmitted is 6. Tx for transmitted. Now with sliding window, the source is allowed to have a window size or the maximum window size number of frames outstanding. So we've currently got 3 transmitted. The maximum window size is 7, which means at this point in time the source is allowed to send another 4 frames. 3 transmitted plus another 4 frames allowed to be sent. So we'll break them up and say frame 7, 0, because we wrap around 1 and 2. They are the set of frames which are allowed to be sent at this point in time. And in fact, this set of frames, 7 through to 2, these 4 frames represent the window at this point in time or we can say the current window size is 4. Any subsequent frames are not yet allowed to be transmitted. So frames 3, 4, 5, and so on, not yet allowed. I'll just write not allowed. The idea is that the source is allowed to send a window of frames before it waits for an act. At this point in time it's sent 3 frames. It's allowed to send another 4 when it has them ready to send. Now back to the question, we see the next thing that happens is that the node transmits 3 data frames. So let's consider what happens after that transmission of 3 data frames. Be careful, it means that 3 different frames would be sent. It doesn't mean the sequence number of the frame is 3. So if 3 frames have been sent then we already know that 4, 5, and 6 have been sent. So the next 3 to be sent when we send in order would be 7, 0, 1. We'll keep track of the transmitted an act which is still the same at this point in time. 0, 1, 2, and 3 are done. 4, 5, and 6 have been transmitted plus another 3 data frames. 7 and 0, 1 have been transmitted and that leaves us 1 remaining allowed to be transmitted. Frame 2 is allowed to be transmitted meaning the current window size is 1. 3, 4, and 5 and beyond are still not allowed. That was just after the transmission of 3 frames, 7, 0, 1. Back to the question, something else happens. The source receives an act and the number inside that act is 6. What that number means is that the destination has finished processing up until including frame 5 because this act number indicates the next number expected. So frames up until including 5 have been effectively acknowledged by the destination. So before we had 0, 1, 2, and 3 transmitted an act but with the reception of the act we now know that 4 and 5 have been transmitted and also act. So we'll move this vertical bar to here to indicate that's the separation of transmitted an act up until 5. Transmitted but not yet act is still 6, 7, 0, 1. 2 is not yet transmitted we're allowed to transmit but because we received an act for 2 frames that allows us to transmit an additional 2 frames so that will be 3 and 4. So our window expands 5 and beyond still not yet allowed to be transmitted. So the result is after our initial state we first transmit 3 frames, 7, 0, 1. Our window shrinks from 4 down to 1. And then we receive an act with the act number 6 meaning up until 5 has been acknowledged. So the reception of that act acknowledges 2 frames, frames 4 and 5 allowing us to transmit another 2 frames, frame 3 and 4. So our window size grows to 3. The end result is that the last frame act is 5, the last frame transmitted is 1 and the current window size is 3. And from that we can answer our question which is what is the new value of the current window size? So the answer in this case is 3. It is 3 frames long.