Class FrdPolicy

  • All Implemented Interfaces:
    Policy, Policy.KeyOnlyPolicy

    public final class FrdPolicy
    extends Object
    implements Policy.KeyOnlyPolicy
    Filtering-based Buffer Cache (FRD) algorithm. This algorithm organizes blocks by their reuse distance and partitions the cache into a filter and main space. The filter employs the LRU policy and accumulates new arrivals. The main space also employs LRU and holds history entries (filter and non-resident) and promoted resident entries. A resident entry is promoted when a miss occurs on a non-resident node, meaning that is has been used after having been evicted by the filter or main cache partitions.

    While the authors describe the filter entry and its history entry as distinct, thereby requiring two hash tables, this implementation merges them. Thus, during the main space's pruning operation an entry also in the filter space is treated as a history node, pruned, and remains in the hash table. This simplification should have no effect on the algorithm or its performance.

    The algorithm is explained by the authors in FRD: A Filtering based Buffer Cache Algorithm that Considers both Frequency and Reuse Distance.

    • Constructor Detail

      • FrdPolicy

        public FrdPolicy​(Config config)
    • Method Detail

      • stats

        public PolicyStats stats()
        Description copied from interface: Policy
        Returns the cache efficiency statistics.
        Specified by:
        stats in interface Policy
      • finished

        public void finished()
        Description copied from interface: Policy
        Indicates that the recording has completed.
        Specified by:
        finished in interface Policy