a technique for scheduling cache cleaning operations maintains a clean distance between a set of least - recently - used clean lines and the lru dirty line for each congruence class in the cache . the technique is generally employed at a victim cache at the highest - order level of the cache memory hierarchy , so that write - backs to system memory are scheduled to avoid having to generate a write - back in response to a cache miss in the next lower - order level of the cache memory hierarchy . the clean distance can be determined by counting all of the lru clean lines in each congruence class that have a reference count that is less than or equal to the reference count of the lru dirty line .