Javatpoint Logo
Javatpoint Logo

Belady'sAnomaly

In the case of LRU and optimal page replacement algorithms, it is seen that the number of page faults will be reduced if we increase the number of frames. However, Balady found that, In FIFO page replacement algorithm, the number of page faults will get increased with the increment in number of frames.

This is the strange behavior shown by FIFO algorithm in some of the cases. This is an Anomaly called as Belady'sAnomaly.

Let's examine such example :

The reference String is given as 0 1 5 3 0 1 4 0 1 5 3 4. Let's analyze the behavior of FIFO algorithm in two cases.

Case 1: Number of frames = 3

Request 0 1 5 3 0 1 4 0 1 5 3 4
Frame 3 5 5 5 1 1 1 1 1 3 3
Frame 2 1 1 1 0 0 0 0 0 5 5 5
Frame 1 0 0 0 3 3 3 4 4 4 4 4 4
Miss/Hit Miss Miss Miss Miss Miss Miss Miss Hit Hit Miss Miss Hit

Number of Page Faults = 9

Case 2: Number of frames = 4

Request 0 1 5 3 0 1 4 0 1 5 3 4
Frame 4 3 3 3 3 3 3 5 5 5
Frame 3 5 5 5 5 5 5 1 1 1 1
Frame 2 1 1 1 1 1 1 0 0 0 0 4
Frame 1 0 0 0 0 0 0 4 4 4 4 3 3
Miss/Hit Miss Miss Miss Miss Hit Hit Miss Miss Miss Miss Miss Miss

Number of Page Faults = 10

Therefore, in this example, the number of page faults is increasing by increasing the number of frames hence this suffers from Belady'sAnomaly.


Next TopicSegmentation




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA