• edited by
13,905 views
33 33 votes

In which one of the following page replacement policies, Belady's anomaly may occur?

  1. FIFO
  2. Optimal
  3. LRU
  4. MRU

6 Answers

Best answer
19 19 votes
Answer : A) FIFO

How/Why?
Page Replacement algorithms suffer from Belady’s anamoly if :

  • They do not follow the stack based algorithm.

Reference :-

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

• selected by
1 1 vote

 GOAL:

We’ll use the same page reference string with 3 frames and then 4 frames, and show that more frames cause more page faults — this is Belady’s Anomaly.


 Page Reference String:

1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5


Case 1: Using 3 Frames with FIFO

StepReferenceFrame StatePage Fault?
111 _ _ Yes
221 2 _ Yes
331 2 3 Yes
442 3 4 Yes
513 4 1 Yes
624 1 2 Yes
751 2 5 Yes
811 2 5 No
921 2 5 No
1032 5 3 Yes
1145 3 4 Yes
1253 4 5 Yes

 Total Page Faults = 9


Case 2: Using 4 Frames with FIFO

StepReferenceFrame StatePage Fault?
111 _ _ _ Yes
221 2 _ _ Yes
331 2 3 _ Yes
441 2 3 4 Yes
511 2 3 4 No
621 2 3 4 No
752 3 4 5 Yes
813 4 5 1 Yes
924 5 1 2 Yes
1035 1 2 3 Yes
1141 2 3 4 Yes
1252 3 4 5 Yes

Total Page Faults = 10


Conclusion:

  • 3 frames → 9 page faults

  • 4 frames → 10 page faults ❗

So, we increased memory but got more page faults — this is Belady’s Anamoly

0 0 votes
Option:( A) FIFO

Belady's anomaly is the problem which occur when we increase the frame size and still the page fault increases
Answer:
Position:
Show:

Related questions

50 50 votes
11 answers 11 answers
31.4k
31.4k views
Kathleen asked Sep 22, 2014
31,425 views
$$S \to aSa \mid bSb\mid a\mid b$$The language generated by the above grammar over the alphabet $\{a,b\}$ is the set of:all palindromesall odd length palindromesstrings t...
194 194 votes
21 answers 21 answers
76.5k
76.5k views
Kathleen asked Sep 22, 2014
76,533 views
Frames of $\text{1000 bits}$ are sent over a $10^6$ $\text{bps}$ duplex link between two hosts. The propagation time is $\text{25 ms}$. Frames are to be transmitted into ...
57 57 votes
8 answers 8 answers
21.7k
21.7k views
Kathleen asked Sep 22, 2014
21,670 views
A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address becauseIt reduces the memory access ti...
52 52 votes
2 answers 2 answers
19.8k
19.8k views
Kathleen asked Sep 22, 2014
19,799 views
The essential content(s) in each entry of a page table is / areVirtual page numberPage frame numberBoth virtual page number and page frame numberAccess right information