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

Consider a program that consists of 8 pages (from 0 to 7) and we have 4 page frames in the physical memory for the pages. The page reference string is :

Consider a program that consists of 8 pages (from 0 to 7) and we have 4 page frames in the physical memory for the pages. The page reference string is : 1 2 3 2 5 6 3 4 6 3 7 3 1 5 3 6 3 4 2 4 3 4 5 1 The number of page faults in LRU and optimal page replacement algorithms are respectively (without including initial page faults to fill available page frames with pages) :
  1. A9 and 6
  2. B10 and 7
  3. C9 and 7
  4. D10 and 6
Show answerHide answer

Correct answer: (B) 10 and 7

Explanation

Simulating LRU with 4 frames gives 10 page replacements (faults after the frames are filled), and the optimal page replacement algorithm gives 7 replacements. So the correct answer is (b).

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

This is question 47 of UGC NET Computer Science PYQ, June 2014 (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.