CS FundamentalsHardGATE CS · Advanced

A process with pages numbered 0 to 4 references them in the order 0 4 0 1 3 4 0 1 4 0 2 0 4 1 3 2. Under FIFO replacement with initially empty memory, how many page faults occur with 3 frames and with 4 frames respectively?

  1. A. 9 and 10
  2. B. 10 and 9
  3. C. 11 and 7
  4. D. 9 and 9

Correct answer: A. 9 and 10

Simulate FIFO queues for both sizes: 9 faults with 3 frames and 10 with 4 frames, an instance of Belady's anomaly (more frames, more faults). LRU, a stack algorithm, never does this (it gives 11 and 7).

More Operating Systems questions

Exams that ask this topic