The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+16 votes

Which of the following page replacement algorithms suffers from Belady’s anamoly?

  1. Optimal replacement

  2. LRU

  3. FIFO

  4. Both (A) and (C)

asked in Operating System by Veteran (59.8k points)
edited by | 1.1k views

Proof that LRU does not incur Belady’s anomaly but that FIFO does incur the anomaly:

4 Answers

+15 votes
Best answer

Answer is (C).

FIFO sufferes from Belady's anomaly. Optimal replacement never suffers from Belady's anomaly.

answered by Loyal (8.1k points)
edited by
+9 votes
Answer : C) FIFO

Page Replacement algorithms suffer from Belady’s anamoly if :

  • They do not follow the stack based algorithm.

Reference :-

Since LRU & Optimal Replacement Algo follow Stack Algo, hence they are not affected by Belady's Anamoly.

answered by Active (1.6k points)
edited by
+1 vote

Belady’s anomaly occurs in those page replacement algorithm which does not have a Stack Algorithm.

Stack Algorithm: It is observed that on increasing the number of frames, the page fault is going to decrease, But FIFO shows an exceptional behavior. This algorithm says that if some pages are present in a system with n number then they are definitely going to present in a system with the n+1 frame. But FIFO denies this and that is why Only FIFO suffers from Belady's Anomaly.

answered by (287 points)
edited by
0 votes
In case of Optimal or LRU when i increase the no. of frames then the no. of page faults will either decrease or remains same. But in case of FIFO sometimes even if i increase the no. of frames it is not going to decrease the page faults and infact it is going to increase them. That's why FIFO is having Belady's anamoly, as FIFO doesn't have a property called Stack property and it's not a stack algorithm.
answered by Junior (657 points)
edited by
@punit I think FIFO is having Belady's anomaly because it does not follow the stack algorithm so how we called it as stack algo.
@lakshya yeah..i've rectified it!

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,126 questions
53,251 answers
70,502 users