In which one of the following page replacement policies, Belady's anomaly may occur?
View worked solution
Answer: A
Belady's anomaly is the phenomenon where increasing the number of physical page frames results in an increase in the number of page faults for certain page reference strings.
This anomaly can occur in page replacement algorithms that do not satisfy the stack property.
- Stack Algorithms: An algorithm is a stack algorithm if the set of pages in a memory of size frames is always a subset of the pages in a memory of size frames. Stack algorithms never exhibit Belady's anomaly. Examples include LRU (Least Recently Used) and Optimal replacement.
- Non-Stack Algorithms: Algorithms like FIFO (First-In-First-Out) do not satisfy the stack property and are susceptible to Belady's anomaly.
For example, using the FIFO policy on the reference string: :
- With 3 frames: 9 page faults occur.
- With 4 frames: 10 page faults occur (an increase in page faults despite more memory).
Therefore, Belady's anomaly occurs in the FIFO page replacement policy.
Free practice · Your answers on this page are not saved.
