Adaptive Cache Line Replacement Algorithm Selection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Direct-mapped caches suffer from low cache hit rates due to their restrictive mapping, which limits their performance across different workloads, as they rely on a single replacement algorithm that may not predict future data requests effectively, leading to suboptimal performance in various applications.

Innovation Solution

Implementing a method that dynamically switches between two cache line replacement algorithms based on which one performs better over a series of memory references, selecting the main memory block that matches the next reference more frequently for storage in the cache line, thereby increasing the cache hit rate.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a single cache line replacement algorithm is used in a direct-mapped cache, then the cache structure remains simple and fast, but the cache hit rate is low due to inability to adapt to different workload patterns

Engineering Contradiction:
Improvecache hit rateVSAvoidreplacement policy complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements dynamic adaptation by switching between different replacement algorithms (LRU and FIFO) based on the current workload characteristics. The system monitors cache performance and automatically transitions between algorithms to optimize for the specific access patterns being observed, making the replacement policy adaptive rather than static.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the replacement algorithm parameter based on detected workload patterns. When sequential access patterns are detected, it switches to FIFO; when random access patterns are detected, it switches to LRU. This parameter change allows the same cache hardware to optimize for different access patterns without increasing physical complexity.

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If a direct-mapped cache uses a fixed replacement policy, then the cache operation is simple and fast, but it cannot effectively predict future data requests for different types of processes

Engineering Contradiction:
Improveadaptability to different workloadsVSAvoidcache control logic
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent makes the cache replacement policy dynamic by implementing workload detection capabilities that monitor access patterns and automatically adjust the replacement algorithm accordingly. This dynamic adaptation allows the cache to handle both sequential and random access patterns effectively without requiring complex hardware for each specific workload type.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The cache system achieves multi-functionality by incorporating both LRU and FIFO replacement algorithms within the same cache structure. The workload detection unit identifies the current access pattern and selects the appropriate algorithm, making the cache universally effective for both sequential and random workload types without needing separate cache structures.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Productivity

If the cache evicts entries using a simple replacement heuristic, then the cache management is efficient, but the hit rate suffers when multiple active memory segments map to the same cache entry

Engineering Contradiction:
Improvecache hit rateVSAvoidprocessor waiting time for data
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent dynamically adapts the replacement strategy based on detected workload patterns. For sequential access patterns, FIFO eviction is used which is efficient and appropriate. For random access patterns, LRU eviction is used which better preserves recently accessed data that is likely to be needed again, thereby reducing cache misses and processor waiting time.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the eviction parameter (which replacement algorithm to use) based on the detected access pattern. This parameter change optimizes the balance between eviction efficiency and hit rate maintenance, reducing the time the processor spends waiting for data by keeping the right data in cache longer when needed.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10853267B2Adaptive method for selecting a cache line replacement algorithm in a direct-mapped cache
Publication Date: 2020.12.01 LENOVO GLOBAL TECHNOLOGIES SWITZERLAND INTERNATIONAL GMBH
  • US10853267B2 patent drawing
  • US10853267B2 patent drawing
  • US10853267B2 patent drawing

AI summary

A method of managing a direct-mapped cache is provided. The method includes a direct-mapped cache receiving memory references indexed to a particular cache line, using a first cache line replacement algorithm to select a main memory block as a candidate for storage in the cache line in response to each memory reference, and using a second cache line replacement algorithm to select a main memory block as a candidate for storage in the cache line in response to each memory reference. The method further includes identifying, over a plurality of most recently received memory references, which one of the algorithms has selected a main memory block that matches a next memory reference a greater number of times, and storing a block of main memory in the cache line, wherein the block of main memory stored in the cache line is the main memory block selected by the identified algorithm.