GATE / CS ARCHIVE

GATE CSE 2007 / QUESTION 56

FIFO anomaly and locality of reference

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

GATE 2007, Q56 2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 56, GATE 2007: A virtual-memory system uses FIFO replacement with a fixed allocation of frames. P: increasing a process’s frame allocation sometimes increases its page-fault rate. Q: some programs do not exhibit locality of reference. Which statement is true?
Options:
(A) Both true and Q explains P
(B) Both true but Q does not explain P
(C) P false,Q true
(D) Both false
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Approach. Separate truth from causation. Belady’s anomaly is possible because FIFO does not retain a nested set of resident pages as frame count grows; locality is not the defining cause.

2. Derivation and interpretation. P is true: FIFO can exhibit Belady's anomaly. For example, reference string 1,2,3,4,1,2,5,1,2,3,4,5 incurs 9 faults with three initially empty frames but 10 with four. Q is also true: programs can make accesses without useful locality, for example broadly scattered independent random accesses. Q does not explain the anomaly; the issue is FIFO's failure of the stack-inclusion property, not simply the presence or absence of locality. Stack algorithms such as LRU do not exhibit this anomaly even on reference strings without locality. Thus B.

Original paper, page 14