Page 117 - DCAP406_DCAP_207_Computer Networks
P. 117

Computer Networks/Networks




                    Notes
                                                              Figure 8.1: Sliding Window



























                                   Sliding Window: Go Back N

                                   The Go Back N protocol enables the source machine to have more than one outstanding frame at
                                   a time by using buffers. It thus overcomes the problem of PAR. The source machine keeps a
                                   buffer of a predetermined size that receives a packet, stores it in the correct empty slot in the
                                   buffer, creates a frame with the correct sequence number and transmits it. The corresponding
                                   logical timer is reset to 0 and the upper bound of the window is slid up by circularly incrementing
                                   for the next frame to transmit.
                                   In case of no buffers are empty, the physical layer is checked to find out if an acknowledgement
                                   is there. If a good frame is received with the acknowledgement number within the current
                                   window, the number of buffers used is then decrement and the logical timer is reset to a negative
                                   value to indicate an unused slot. This enables to slide the Lower Bound of the window by
                                   circularly incrementing the acknowledgement number expected. This procedure creates a loop
                                   until expected acknowledgement equals received acknowledgement. This clears the received
                                   acknowledgement and the previous frames that have not been acknowledged so far.
                                   Subsequent to this, logical timers are updated if a bad frame or out of window frame arrives. In
                                   case of a frame timed out, the same frame is retransmitted and the logical timer is reset to 0.
                                   Hence, the next frame will time out and will be re-sent on the next iteration of the loop. Thus the
                                   timed out frame and all the subsequent frames are retransmitted.
                                   At the destination machine, the receiving machine waits until a good frame arrives. It checks the
                                   sequence number, if it is not the expected sequence number it re-sends an acknowledgement for
                                   the last correct sequence number received. If the sequence number is expected one, it passes the
                                   packet to the Network layer. Simultaneously, it updates the last correct sequence number received
                                   and circularly increments the expected next sequence number. An acknowledgement is thus
                                   created and transmitted. This creates loop back to the physical layer to retrieve the next frame.

                                   Sliding Window: Selective Repeat

                                   The Selective Repeat protocol intends to improve the problems of the Go Back N protocol. This
                                   is achieved by providing buffers at source and destination hosts to enable the source node to




          110                               LOVELY PROFESSIONAL UNIVERSITY
   112   113   114   115   116   117   118   119   120   121   122