AI InterviewSearch…Search problems, topics, or pages…Ctrl KGet started
Hardnetworkssliding windowdata link

~120s

Window size in Go-Back-N

A Go-Back-N protocol numbers its frames with a 4-bit sequence number. What is the largest sender window it may use?

Show the answer and the worked solution

Correct answer: C.

15

Worked solution

  1. Four bits give 2^4 = 16 distinct sequence numbers, 0 through 15.
  2. If the window used all 16, a receiver that lost every acknowledgement could not tell a retransmitted frame from a fresh one carrying the same number.
  3. Leaving one number unused removes the ambiguity, so the largest safe window is 16 − 1 = 15 frames. Selective repeat is stricter still and allows only half the space, 8.

Answer: 15.

The idea

Go-Back-N allows 2^n − 1 and selective repeat 2^(n−1), because selective repeat buffers out-of-order frames and so needs the old and new windows never to overlap.

Shortcut. A memory hook: the largest Go-Back-N window equals the largest sequence number, 2⁴ − 1 = 15.

Common trap. 16 uses all 2⁴ sequence numbers, which lets a fully retransmitted window be mistaken for a fresh one.

OS, DBMS & Networks

40 of 40

Level

Hard

Target time

~120s

Window size in Go-Back-N — Aptitude Question

Window size in Go-Back-N: A Go-Back-N protocol numbers its frames with a 4-bit sequence number. Answer and worked solution on CodeKairo.

Question

A Go-Back-N protocol numbers its frames with a 4-bit sequence number. What is the largest sender window it may use?

Options

  1. 4
  2. 8
  3. 15
  4. 16
Show the answer and the worked solution

Correct answer: C. 15

Worked solution

  1. Four bits give 2^4 = 16 distinct sequence numbers, 0 through 15.
  2. If the window used all 16, a receiver that lost every acknowledgement could not tell a retransmitted frame from a fresh one carrying the same number.
  3. Leaving one number unused removes the ambiguity, so the largest safe window is 16 − 1 = 15 frames. Selective repeat is stricter still and allows only half the space, 8.

Answer: 15.

The idea

Go-Back-N allows 2^n − 1 and selective repeat 2^(n−1), because selective repeat buffers out-of-order frames and so needs the old and new windows never to overlap.

Shortcut. A memory hook: the largest Go-Back-N window equals the largest sequence number, 2⁴ − 1 = 15.

Common trap. 16 uses all 2⁴ sequence numbers, which lets a fully retransmitted window be mistaken for a fresh one.

All OS, DBMS & Networks questions · placement mock tests