Visualizing Process Management Algorithm

About

LRU stands for Least Recently Used. The development of the LRU algorithm ended the debate and research that had been going on about page replacement algorithms in the 1960s and 1970s.

LRU replaces the line in the cache that has been in the cache the longest with no reference to it. It works on the idea that the more recently used blocks are more likely to be referenced again. LRU is the most frequently used algorithm as it gives less number of page faults when compared to the other algorithms.

FIFO means "First In, First Out." It's an asset management and valuation method in which older inventory is moved out before new inventory comes in. The first goods to be sold are the first goods purchased.

FIFO assumes that assets with the oldest costs are included in the income statement's Cost of Goods Sold (COGS). The remaining inventory assets are matched to assets that were most recently purchased or produced.

The FIFO method avoids obsolescence by selling the oldest inventory items first and maintaining the newest items in inventory. The actual inventory valuation method used doesn't have to follow the actual flow of inventory through a company but it must be able to support why it selected the inventory valuation method.

The theoretically optimal page replacement algorithm (also known as OPT, clairvoyant replacement algorithm, or Bélády's optimal page replacement policy) is an algorithm that works as follows: when a page needs to be swapped in, the operating system swaps out the page whose next use will occur farthest in the future.

Output

Page fault -