hw4sol - CSCI 415 Computer Networks Homework 4 Solution...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSCI 415 Computer Networks Homework 4 Solution Saad Mneimneh Hunter College of CUNY Problem 1: Sliding window algorithm The sliding window algorithm with unbounded sequence numbers is given in the notes. Upon receiving an RN , the sender checks if RN > SN and slides the window. Similarly, upon receiving an SN , the receiver checks if SN = RN and slides the window. Describe the modifications needed (if any) for these two rules when the sequence numbers are sent modulo p (bounded). ANSWER : The rule for the receiver does not need to change. However, the rule for the sender will not work as it is possible to receive a smaller subsequent num- ber after performing the modulo p operation. More precisely, the sender needs to check if the received RN is equal to any of SN + 1 mod p...SN + n mod p , and slide the window accordingly. Problem 2: Modulus without FIFO Assume that a sliding window algorithm is used but the FIFO property does not hold. Instead, consider only frames that are sent and received (possibly with error). If a frame is the i th frame sent and the j th frame received, then | i- j | K . Note that when K = 0, we have the FIFO property. Heres an example scenario with K = 3. 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 (a) Show that if the receiver receives SN at time t , then RN ( t )- n- K SN RN ( t ) + n- 1 ANSWER : If frame SN was received at time t , consider the time t < t at which the received frame SN was transmitted. We can establish three inequal-was transmitted....
View Full Document

Page1 / 4

hw4sol - CSCI 415 Computer Networks Homework 4 Solution...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online