in Computer Networks
12,548 views
3 votes
3 votes
Q.   If maximum sequence number in Go back N ( arq) protocol is 'n' then  window size (sender) is ?

If your answer is 'n' or 'n'+1' then please design GBN for sender window 5 and 11 .
in Computer Networks
12.5k views

1 comment

max window size and max sequence number is depend on how many bits u r using.

if no of bits are n then max sequence no will be 2^n-1

and sender window size < 2^n.
0
0

4 Answers

7 votes
7 votes
Best answer

Maximum sequence number in GBN is same as window size.

For sequence bits = n, number of sequence numbers = 2n and window size = 2n - 1

Consider n = 3, sequence numbers will be 23 = 8 ( i.e. from 0 - 7 )

and maximum window size = 23 - 1 = 7 i.e  window will carry frames  from 0 to 6 which are 7 in number.

Now, for sender window = 5

number of sequence bits needed = ceil (log2(1+window size)) = 3

So, sequence numbers generated would be 0 to 7 but window will carry frames from 0 to 4 which is 5 in number (same as window size)

selected by

4 Comments

edited by
@abhi Consider this :

The relation should be sequence_numbers(N) >= Sender_Window_Size(S) + Receiver_Window_Size(R)

Thus N >= 5+1 and N should be at least 6. Thus the sequence numbers will be from 0 to 5 (6 sequences)

 

The question says 'Maximum' sequence number which can be lot greater than sender window size .. even as big as the number of packets ... thus there is no relation IFF maximum sequence number is given.

I don't agree with the best chosen answer.
0
0
According to the question: if the maximum sequence no is n what is the sender window size (WS).

# of sequence numbers = sender window size + receiver window size

                                      = WS+ 1

  Maximum sequence number is n :(0 1 2 3 ...........n)

so total sequence numbers= n+1

n+1 = WS + 1;

WS= n

Hence according to (# of seq numbers>= WS+WR) there should be atleast n+1 distinct sequence numbers for window size of n.

Please share if u feel something is wrong.
0
0

@gari, you are making mistake in interpreting #f seq no.s from 0 to n-1.

Max seq no.s available are 'n', now Ws + WR = n. So it gives Ws = n-1 as Wr=1

Now for sender window u will assign no.s from 0 to n-2 which are (n-1) in total.

0
0
1 vote
1 vote

in any of the flow control mechanism, it is always true: sequence number >= (sws + rws) however for GBN we know rws=1 always.

as per question sequence number =n out of which 1 is given to rws, therefore, sws must be less or equal to n-1.

4 Comments

In this question we are not talking about maximum sender window , we are saying sender window ..... I think we have no relationship between maximum sequence number and sender window in GBN as well as SR....... This question was in my test..... And all options are wrong....
0
0
you cannot say there is no relation between maximum seq. number and sender window size because in GBN or in SRA we have suff to calculate the sws..nd ofcousre it is also true that with the help of only sequence number we can say about maximum sender window size but not about exact sws...for exact one we should have other relevant information.

however in ur question only seq. number given so we can tell about only maximum sender window size... which will be in case of GBN is n-1 or u can say the sws< or = (n-1)
0
0
The best answer chosen had me doubt my learnings completely. I agree with your answer. I'll research more to see if it is true.
0
0
0 votes
0 votes
Maximum window size at sender will be 'n-1'(As in question,no of sequence no is given not the no of bits used in sequence no)
0 votes
0 votes
if maximum sequence number in Go back N ( arq) protocol is 'n' then  window size  is 2^n-1 is sender window size

Related questions