Jump to content

Least frequently used

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Addbot (talk | contribs) at 05:59, 10 March 2013 (Bot: Migrating 2 interwiki links, now provided by Wikidata on d:q1810751). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Least Frequently Used (LFU) is a type of cache algorithm used to manage memory within a computer. The standard characteristics of this method involve the system keeping track of the number of times a block is referenced in memory. When the cache is full and requires more room the system will purge the item with the lowest reference frequency.

LFU is sometimes combined with a Least Recently Used algorithm and called LRFU[1]

Implementation

The simplest method to employing an LFU algorithm is to assign a counter to every block that is loaded into the cache. Each time a reference is made to that block the counter is increased by one. When the cache reaches capacity and has a new block waiting to be inserted the system will search for the block with the lowest counter and remove it from the cache.[2]

Problems

While the LFU method may seem like an intuitive approach to memory management it is not without faults. Consider an item in memory which is referenced repeatedly for a short period of time and is not accessed again for an extended period of time. Due to how rapidly it was just accessed its counter has increased drastically even though it will not be used again for a decent amount of time. This leaves other blocks which may actually be used more frequently susceptible to purging simply because they were accessed through a different method.[3]

Due to major issues like this a pure LFU system is fairly uncommon. Instead hybrids which utilize concepts from LFU are created such as [ROBI90], [Kame92], and [Will93].[4]

See also

References

  1. ^ Donghee Lee; Jongmoo Choi; Jong-Hun Kim; Noh, S.H.; Sang Lyul Min; Yookun Cho; Chong Sang Kim. LRFU: a spectrum of policies that subsumes the least recently used and least frequently used policies. IEEE Transactions on Computers
  2. ^ Silvano Maffeis. Cache Management Algorithms for Flexible Filesystems. ACM SIGMETRICS Performance Evaluation Review, Vol. 21, No. 3
  3. ^ William Stallings. Operating Systems: Internals and Design Principles 7th Edition. 2012
  4. ^ B.T. Zivkoz and A.J. Smith. Disk Caching in Large Database and Timeshared Systems. IEEE MASCOTS, 1997