Question

In: Computer Science

Show that the window size must be less than or equal to half the size of...

Show that the window size must be less than or equal to half the size of the sequence number space for SR protocols.

Mathematically prove it.

Solutions

Expert Solution

This is to avoid packets being recognized incorrectly.

If the windows size is greater than half the sequence number space, then if an ACK is lost, the sender may send new packets that the receiver believes are retransmissions.

For example, if our sequence number range is 0-3 and the window size is 3, this situation can occur.

A -> 0 -> B

A -> 1 -> B

A -> 2 -> B

A <- 2ack <- B (this is lost)

A -> 0 -> B

A -> 1 -> B

A -> 2 -> B

After the lost packet, B now expects the next packets to have sequence numbers 3, 0, and 1.

But, the 0 and 1 that A is sending are actually retransmissions, so B receives them out of order.

By limiting the window size to 2 in this example, we avoid this problem because B will be expecting 2 and 3, and only 0 and 1 can be retransmissions.

Lets look at a obvious fail scenario:

The window size is greater than the sequence number space. Lets say we have sequence numbers 0, 1, 2. And our window size is 4. This means that the window has two occurrences of 0.

0,1,2,0 <- modulo wrap. When we get a package with a seq of 0. Is it the first packet or the fourth? No clue. Now, this problem will occur insofar as the window size is greater than half of the sequence number space. Why? Because there's always the possibility that the receiver is looking at a sequence number that MAY be contained in a packet coming from the sender that is NEW or OLD. Does it always happen? No. But when it does, here's what happens:

Case 1:

Receiver window after properly receiving packets 0,1,2. 0,1,2,[3,0,1],2 But what if the ACKs sent are lost? Well, the sender will resend 0,1,2. But are 0,1 OLD or NEW? The receiver can't tell.

Case 2:

Same window on receiving end. The three packets are received.

0,1,2,[3,0,1],2

Now, the receiver receives ALL the acks but ONE correctly. Lets pick the 2nd one (1). Now, it's going to resend 1. But the receiver is looking at 1! So is this the new one as it expects (nope), or the old one?

Therefore, to ensure that the window is never expecting sequence numbers that could possibly be used by potential outstanding packets (either coming from a normal transmission or re-transmission of a missing ack) we have to either decrease the window size or increase sequence numbers.

Look what happens when we increase the sequence number space to, say 6.

0,1,2,3,4,5.

No matter how we position the window, it's never at risk of receiving a packet with a old sequence number.

0,1,2,[3,4,5]0,1...

By the time the window wraps around, we are positive that we've received the previous ones in order.


Related Solutions

Show that the window size must be less than or equal to half the size of...
Show that the window size must be less than or equal to half the size of the sequence number space for SR protocols. Mathematically prove it.
prove that 2/pi is less than or equal to (sinx)/x which is less than or equal...
prove that 2/pi is less than or equal to (sinx)/x which is less than or equal to 1. for x is in (0,pi/2]
For each of the following, fill in the blanks with "Less than", "Greater than", or "Equal...
For each of the following, fill in the blanks with "Less than", "Greater than", or "Equal to" *) A gas flows through a one-inlet, one-exit control volume operating at steady state with no internal irreversibilities, Qcv = 0. Heat transfer at a rate Qcv takes place only at a location on the boundary where the temperature is Tb. The specific entropy of the gas at the exit is _____ than the specific entropy of the gas at the inlet. *)...
If we are testing the null hypothesis that the mean is less than or equal to...
If we are testing the null hypothesis that the mean is less than or equal to 100, and the critical value for the test is determined to be z = 1. 645, then the rejection region would be all of the z values that are ____________ 1. 645. Multiple Choice greater than less than greater than or equal to less than -1.645 or greater than +1.645
For each, indicate whether the first item is (greater than, equal to, less than) the second...
For each, indicate whether the first item is (greater than, equal to, less than) the second item oxygen content in the pulmonary veins      ___________       oxygen content in the carotid arteries Answer 1Choose...greater thanequal toless than maximum pressure in the aorta ___________     maximum pressure in the left atrium   Answer 2Choose...greater thanequal toless than blood flow through the lungs ____________ blood flow through the kidneys Answer 3Choose...greater thanequal toless than flow of blood through a dilated vessel _____________ flow of blood through...
Write 2 pages on "Why Macs Less prone to Viruses than Window PCs?
Write 2 pages on "Why Macs Less prone to Viruses than Window PCs?
solve tan^2 x =1 where x is more than or equal to 0 but x is less than or equal to pi
solev tan^2 x =1 where x is more than or equal to 0 but x is less than or equal to pi
8. The cardinality of S is less than or equal to the cardinality of T, i.e....
8. The cardinality of S is less than or equal to the cardinality of T, i.e. |S| ≤ |T| iff there is a one to one function from S to T. In this problem you’ll show that the ≤ relation is transitive i.e. |S| ≤ |T| and |T| ≤ |U| implies |S| ≤ |U|. a. Show that the composition of two one-to-one functions is one-to-one. This will be a very simple direct proof using the definition of one-to-one (twice). Assume...
4. Whether P3 or the space of the polynomials of degree less than or equal to...
4. Whether P3 or the space of the polynomials of degree less than or equal to 3 and consider T: P3 → P3, given by the derivation T(f) = f' . For example, T (−3x 2 + 5x - 10) = −6x + 5. (a) Prove that T is a linear transformation. (b) Determine ker (T). (c) Is the T transformation injective? Justify that. (d) The polynomial g (x) = 3x^2 + 1 belongs to the image? Justify that.
If a z-score is less than -3.49 it will have a probability equal to what?
If a z-score is less than -3.49 it will have a probability equal to what?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT