A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Consider the following statements:
P: Increasing the number of page frames allocated to a process sometimes increases the page fault rate.
Q: Some programs do not exhibit locality of reference.
Which one of the following is TRUE?
View worked solution
Answer: B
To determine the correct option, let us analyze both statements individually:
-
Statement P: "Increasing the number of page frames allocated to a process sometimes increases the page fault rate."
This phenomenon is known as Belady's Anomaly. It is a well-documented behavior of the First-In-First-Out (FIFO) page replacement algorithm, where allocating more physical frames to a process can lead to an increased number of page faults for certain page reference strings. Thus, Statement P is TRUE.
-
Statement Q: "Some programs do not exhibit locality of reference."
While most programs exhibit spatial and temporal locality of reference, certain programs with random memory access patterns (e.g., database queries performing random lookups, or sequential scans over extremely large datasets that exceed cache sizes) do not exhibit locality of reference. Thus, Statement Q is TRUE.
Relationship between P and Q:
Belady's anomaly (P) is a structural property of non-stack page replacement algorithms like FIFO. It occurs because the set of pages loaded in memory with frames is not guaranteed to be a subset of the pages loaded with frames. It is independent of whether a program exhibits locality of reference or not. Therefore, Q is not the reason for P.
Hence, both P and Q are true, but Q is not the reason for P.
Free practice · Your answers on this page are not saved.
