All mock tests are FREE till 31 December — register to save your progress

A virtual memory system uses the first-in-first-out (FIFO) page replacement policy and allocates a fixed number of frames to a process.
Assertion A: Increasing the number of page frames allocated to a process sometimes increases the page fault rate.
Reason R: Some programs do not exhibit locality of reference.

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. Both A and R are true but R is NOT the correct explanation of A

Explanation

Assertion A is true — this is Belady's anomaly, a documented property of FIFO replacement where adding more frames can paradoxically raise the page-fault count for certain reference strings. Reason R is also a true general statement, since not every program's access pattern obeys the locality-of-reference principle. However R does not explain A: Belady's anomaly arises specifically because FIFO's replacement order ignores recency/frequency of use, not because of a program's locality behaviour — stack algorithms such as LRU never exhibit this anomaly regardless of locality. So the correct choice is both true, but R is not the correct explanation of A, option (ii).

More Programming Languages and Computer Graphics questions