GATE / CS ARCHIVE

GATE CSE 2009 / QUESTION 9

Belady anomaly policy

Operating Systems · Virtual Memory & Paging · Full GATE CSE 2009 paper

GATE 2009, Q9 1 mark · MCQ
Report issue

Virtual Memory & Paging

Question 9, GATE 2009: For which listed page replacement policy may Belady’s anomaly occur? A FIFO; B optimal; C LRU; D MRU.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

FIFO can incur more faults with more frames: the standard reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 has 9 faults with 3 frames and 10 with 4. LRU and optimal replacement have the stack-inclusion property; ordinary MRU also preserves inclusion for nested initially empty caches. Thus FIFO is the supplied policy exhibiting the anomaly, A.

FIFO can evict a page because it arrived long ago even if it will be reused immediately; adding frames changes that queue order and can increase faults. The classic reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 produces 9 FIFO faults with three frames and 10 with four. LRU and optimal have the inclusion/stack property that prevents this anomaly. The intended listed answer is FIFO; the baseline qualification concerning the exact MRU model remains important.

Original paper, page 2