Question 23Asked in UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)

Consider the reference string: 0 1 2 3 0 1 4 0 1 2 3 4 If FIFO page replacement algorithm is used, then the number of page faults with three page frames and…

Consider the reference string: 0 1 2 3 0 1 4 0 1 2 3 4 If FIFO page replacement algorithm is used, then the number of page faults with three page frames and four page frames are _______ and _______ respectively.
  1. A10, 9
  2. B9, 9
  3. C10, 10
  4. D9, 10
Show answerHide answer

Correct answer: (D) 9, 10

Explanation

Given reference string: 0, 1, 2, 3, 0, 1, 4, 0, 1, 2, 3, 4. (i) FIFO with 3 page frames: faults occur at 0, 1, 2, 3, 0, 1, 4, 2, 3 (hits at the 2nd 0 and 1 after 4). Total page faults = 9. (ii) FIFO with 4 page frames: faults occur at 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 (hits at 0 and 1 before 4 is loaded). Total page faults = 10. This is Belady's anomaly.

From UGC NET Computer Science PYQ, June 2016 (Paper II & III, Selected Questions)

This is question 23 of UGC NET Computer Science PYQ, June 2016 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.