Computer Sciences > Gate 2017 Set-1 > Page Replacement Algorithm
Recall that Belady’s anomaly is that the pages-fault rate may increase as the number of allocated frames increases. Now consider the following statements:

S1: Random page replacement algorithm (where a page chosen at random is replaced) suffers from Belady’s anomaly.
S2: LRU page replacement algorithm suffer from Belady’s anomaly .


Which of the following is CORRECT?
A
S1 is true, S2 is true
B
S1 is true, S2 is false
C
S1 is false , S2 is true
D
S1 is false, S2 is false

Correct : B

Given:
Two statements regarding Belady's anomaly:
S1: Random page replacement algorithm suffers from Belady’s anomaly.
S2: LRU page replacement algorithm suffers from Belady’s anomaly.
To find:
Which of the statements S1 and S2 are correct.
Solution:
Let me check statement S2 first.
A page replacement algorithm is free from Belady's anomaly if it belongs to the class of stack algorithms.
For a stack algorithm, the set of pages in memory for n frames is always a subset of the pages in memory for n + 1 frames.
Since LRU (Least Recently Used) is a stack algorithm, it can never suffer from Belady's anomaly.
So, statement S2 is false.
Now let me check statement S1.
The Random page replacement algorithm randomly picks a page to replace.
Because of this random choice, it does not satisfy the inclusion property of stack algorithms.
Since it is not a stack algorithm, it can exhibit Belady's anomaly where increasing the number of frames leads to more page faults.
So, statement S1 is true.
Therefore, S1 is true and S2 is false.
Answer: (B) S1 is true, S2 is false

Similar Questions

In which one of the following page replacement algorithms it is possible for the page fault rate to increase even when the number of allocated frames increases?
#104 MCQ
A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters. From...
#1 MCQ
Which number does not belong in the series below? 2, 5, 10, 17, 26, 37, 50, 64
#4 MCQ

Related Topics

memory management gate 2017 Belady's anomaly random page replacement LRU page replacement computer science gate memory allocation anomalies page fault rate anomalies GATE CS 2017 Set-1

Unique Visitor Count

Total Unique Visitors

Loading......