CREATE OWN LIBRARY

Special feature of MRU

 

To see this topic please follow the previous chapter: 

Some other page replacement algorithm

 

MRU replace the page which was just recently used in the frame of the main memory.

 

MRU performs best among all page replacement algorithms, for a special type of page references request sequence where the same sequence of same page references are coming repeated time (in a loop).

 

Example:

Page references: 4   5   6  7  8  9  4  5   6  7 8  9  4  5  6 7  8  9

 

Now, firstly we do this by FIFO and LRU then we calculate page fault by MRU. Now we compare page faults among FIFO, LRU, and MRU.

 

FIFO:

Page references: 4   5  6   7  8 9  4   5  6  7  8 9  4  5 6  7  8  9 and number of frame is 4.

 

Number of page faults = 18

So, number of page references = number of page fault (all page requests are page fault). So, it is a thrashing.

 

LRU:

Page references: 4   5  6   7  8 9  4   5  6  7  8 9  4  5 6  7  8  9 and number of frame is 4.

 

For this page reference, LRU performs the same as FIFO.

 

Number of page faults = 18

 

So, number of page references = number of page fault (all page requests are page fault). So, it is a thrashing.

 

MRU: 

Page references: 4   5  6   7  8  9  4  5   6  7 8  9  4 5  6  7 8  9 and number of frame is 4

 

Number of page faults = 10

 

So,

Page references: 4   5   6  7  8  9  4  5   6  7 8  9  4  5  6 7  8  9

 

Number of page faults using FIFO = 18 (Thrashing)

Number of page faults using LRU  = 18 (Thrashing)

Number of page faults using MRU = 10 

 

 

Important note (MRU benchmark Check):

As we know optimal page replacement algorithm always gives the best result (fewer page faults) and it is used as the benchmark

 

So, for repeated page references optimal gives the same result as MRU

 

Reversely we can say to check, MRU gives the best result or not (check benchmark), we should compare MRU with optimal page replacement algorithm. 

 

Optimal

Page references: 4   5  6   7  8 9  4   5  6  7  8 9  4  5 6  7  8  9 and number of frame is 4.

 

Number of page faults = 10

 

So, here page faults of MRU and Optimal are the same