Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

GATE | GATE-CS-2007 | Question 56

  • Last Updated : 28 Jun, 2021

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?
(A) Both P and Q are true, and Q is the reason for P
(B) Both P and Q are true, but Q is not the reason for P.
(C) P is false, but Q is true
(D) Both P and Q are false


Answer: (B)

Explanation:

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

First In First Out Page Replacement Algorithms: This is the simplest page replacement algorithm. In this algorithm, operating system keeps track of all pages in the memory in a queue, oldest page is in the front of the queue. When a page needs to be replaced page in the front of the queue is selected for removal.



FIFO Page replacement algorithms suffers from Belady’s anomaly :

Belady’s anomaly states that it is possible to have more page faults when increasing the number of page frames.

Solution:

Statement P: Increasing the number of page frames allocated to a process sometimes increases the page fault rate.

Correct, as FIFO page replacement algorithm suffers from belady’s anomaly which states above statement.

Statement Q: Some programs do not exhibit locality of reference. Correct, Locality often occurs because code contains loops that tend to reference arrays or other data structures by indices. So we can write a program does not contain loop and do not exhibit locality of reference.

So, both statement P and Q are correct but Q is not the reason for P as Belady’s Anomaly occurs for some specific patterns of page references.

See Question 1 of https://www.geeksforgeeks.org/operating-systems-set-13/

Reference :
https://www.geeksforgeeks.org/page-replacement-algorithms-in-operating-systems/

This solution is contributed by Nitika Bansal

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :