Virtual Memory & Paging

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.