实现LFU缓存回收方案的O(1)算法
An O(1) algorithm for implementing the LFU cache eviction scheme
摘要:
高速缓存驱逐算法广泛用于操作系统、数据库和使用高速缓存的其他系统中,以通过高速缓存应用程序所使用的数据来加速执行。有许多策略,如MRU(最近使用),MFU(最频繁使用),LRU(最近最少使用)和LFU(最不频繁使用),每个都有自己的优点和缺点,因此在特定的场景中使用。到目前为止,最广泛使用的算法是LRU,因为它的$O(1)$操作速度以及它与大多数应用所期望的行为类型的相似性。LFU算法还具有许多现实世界工作负载所期望的行为。然而,在许多地方,LRU算法优于LFU算法,因为其$O(1)$的运行时间复杂度低于$O(\log n)$。我们在这里提出了一个LFU缓存驱逐算法,它的所有操作,其中包括插入,访问和删除(驱逐)的运行时复杂度为$O(1)$。
英文摘要:
Cache eviction algorithms are used widely in operating systems, databases and other systems that use caches to speed up execution by caching data that is used by the application. There are many policies such as MRU (Most Recently Used), MFU (Most Frequently Used), LRU (Least Recently Used) and LFU (Least Frequently Used) which each have their advantages and drawbacks and are hence used in specific scenarios. By far, the most widely used algorithm is LRU, both for its $O(1)$ speed of operation as well as its close resemblance to the kind of behaviour that is expected by most applications. The LFU algorithm also has behaviour desirable by many real world workloads. However, in many places, the LRU algorithm is is preferred over the LFU algorithm because of its lower run time complexity of $O(1)$ versus $O(\log n)$. We present here an LFU cache eviction algorithm that has a runtime complexity of $O(1)$ for all of its operations, which include insertion, access and deletion(eviction).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。