In LRU ,It removes the page that has not been utilized in the memory for the longest period of time.Whereas in LFU It replaces the least frequently used pages.
Consider the following example for LRU replacement algorithm
Consider the following example for LFU replacement algorithm
![](https://codelido.com/assets/files/2022-08-23/1661254835-117244-image.png)