Search code examples
lru

how to determine a page(or file) is least used.how to determine calculate method,which is about Least Recently Used


i know about LRU algorithm,but how to determine the calculation is key point.if the space is not enough,i want to find some files's weight which are below,then delete them and put in some files's weight which are high weight.some one ever did this?


Solution

  • Here are a few implementations:

    1) http://www.careercup.com/question?id=14113740

    2) How would you implement an LRU cache in Java?

    3) http://www.geeksforgeeks.org/implement-lru-cache/