GATE / CS ARCHIVE

GATE CSE 2017 SET 1 / QUESTION 40

GATE CSE 2017 Set 1 Q40

Operating Systems · Virtual Memory & Paging · Full GATE CSE 2017 Set 1 paper

GATE 2017 Set 1, Q40 2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 40, GATE 2017: Belady’s anomaly means page faults may increase when allocated frames increase. S1 random replacement suffers from it; S2 LRU suffers from it. A both true; B S1 true,S2 false; C S1 false,S2 true; D both false.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. For LRU, order all pages by recency after each reference. The k-frame cache contains the k most recent distinct pages; those pages are included in the first k+1 pages of that same order.

2. This stack inclusion means a reference hitting with k frames cannot miss with k+1. Increasing LRU capacity therefore never increases faults for a fixed reference string, so S2 is false.

3. Random replacement has no such nested-set guarantee: its eviction choices can retain different useful pages, and an adverse larger-cache realization may fault more. S1 is interpreted as possibility, not inevitability or a claim about every run. Hence B.

Original paper, page 18 · Answer key