/* In the following C / C++ Program, The LRU (Least Recently Used) algorithm is used, when a page fault occurs, it throw out the page that has been unused for the longest time. This strategy is called LRU (Least Recently Used) paging. To fully implement LRU, it is necessary to maintain a linked list of all pages in memory, with the most recently used page at the front and the least recently used page at the rear. The difficulty is that the list must be updated on every memory reference. Finding a page in the list, deleting it, and then moving it to the front is a very time consuming operation, even in hardware (assuming that such hardware could be built). */
/*The C++ Code Implementation of LRU Page Replacement Algorithm is given below & it is being tested in MS Visual Studio 2010*/