Bélády's anomaly

Page Requests 3 2 1 0 3 2 4 3 2 1 0 4
Newest Page 3 2 1 0 3 2 4 4 4 1 0 0
    3 2 1 0 3 2 2 2 4 1 1
Oldest Page     3 2 1 0 3 3 3 2 4 4
Page Requests 3 2 1 0 3 2 4 3 2 1 0 4
Newest Page 3 2 1 0 0 0 4 3 2 1 0 4
    3 2 1 1 1 0 4 3 2 1 0
      3 2 2 2 1 0 4 3 2 1
Oldest Page       3 3 3 2 1 0 4 3 2
An example of Bélády's anomaly. Using three page frames, 9 page faults occur. Increasing to four page frames causes 10 page faults to occur. Page faults are in red.

In computer storage, Bélády's anomaly is the phenomenon in which increasing the number of page frames results in an increase in the number of page faults for certain memory access patterns. This phenomenon is commonly experienced when using the First in First Out (FIFO) page replacement algorithm. László Bélády demonstrated this in 1969.[1]

In common computer memory management, information is loaded in specific sized chunks. Each chunk is referred to as a page. Main memory can only hold a limited number of pages at a time. It requires a frame for each page it can load. A page fault occurs when a page is not found, and might need to be loaded from disk into memory.

When a page fault occurs and all frames are in use, one must be cleared to make room for the new page. A simple algorithm is FIFO: whichever page has been in the frames the longest is the one that is cleared. Until Bélády's anomaly was demonstrated, it was believed that an increase in the number of page frames would always result in the same number or fewer page faults.

Bélády's anomaly is unbounded

Bélády, Nelson and Shedler constructed reference strings for which FIFO page replacement algorithm produced nearly twice as many page faults in a larger memory than in a smaller one and they formulated the conjecture that 2 is a general bound.

In 2010, Fornai and Iványi showed that the anomaly is in fact unbounded and that one can construct a reference string to any arbitrary page fault ratio.

References

  1. Christopher Kruegel (2012-12-03). "Operating Systems (CS170-08 course)" (PDF). cs.ucsb.edu. Retrieved 2016-06-13.


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.