Instruction Cache Management via Temporal Locality Attributes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Instruction caches in computing devices inefficiently manage storage due to evicting instructions with high temporal locality to make room for those with lower temporal locality, leading to decreased performance, especially in applications with large instruction footprints.

Innovation Solution

Implementing a method to manage the instruction cache based on temporal locality by determining and utilizing temporal locality attributes to prioritize the storage of instructions likely to be frequently reused, evicting less likely instructions to maintain cache efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional cache replacement algorithms are used, then cache space is managed, but instructions with high temporal locality are evicted leading to decreased hit rate

Engineering Contradiction:
Improvecache hit rateVSAvoidprocessor performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent changes the parameter used for cache replacement from traditional LRU (least recently used) to temporal locality attributes. Each cache entry is tagged with a temporal locality indicator that predicts future reuse probability, and replacement decisions are based on comparing these indicators rather than access time. This parameter change resolves the contradiction by prioritizing instructions that are more likely to be reused, thereby improving both hit rate and processor performance.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent implements feedback by using temporal locality indicators that are updated based on actual instruction access patterns. The system monitors which instructions are accessed and updates their temporal locality attributes accordingly, creating a feedback loop that improves cache management decisions over time. This feedback mechanism ensures that instructions with high temporal locality are retained in the cache, improving both reliability and productivity.

Inventive Principle:
Principle #23Feedback

2Adaptability or versatility

If cache entries are frequently replaced to make room for new instructions, then cache space utilization increases, but frequently used instructions are lost

Engineering Contradiction:
Improvecache space utilizationVSAvoidinstruction reuse efficiency
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent changes the replacement criterion from simple cache fullness checks to temporal locality-based decisions. When the cache needs replacement, it compares the temporal locality indicators of existing entries with the incoming instruction, replacing only those with lower indicators. This maintains adaptability in space utilization while preserving instruction reuse efficiency.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent applies preliminary action by pre-calculating and tagging instructions with temporal locality attributes before they enter the cache. This preliminary classification allows the cache management system to make informed replacement decisions without sacrificing frequently used instructions, thereby maintaining both space utilization and reuse efficiency.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If temporal locality attributes are calculated and used for replacement decisions, then cache hit rate improves, but system complexity increases

Engineering Contradiction:
Improvecache hit rateVSAvoidcache management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies self-service by enabling the cache system to automatically calculate and update temporal locality attributes based on observed access patterns. The system serves itself by using its own performance data to improve its management decisions, reducing the need for external control logic and minimizing the increase in system complexity while maintaining improved hit rates.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent substitutes complex mechanical replacement algorithms with a simpler attribute-based system. Instead of implementing complex prediction algorithms or multiple cache levels, the system uses temporal locality indicators as a straightforward replacement criterion, reducing device complexity while improving reliability.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

4Quantity of substance

If instructions are fetched from memory instead of cache, then cache capacity is preserved, but processor performance decreases

Engineering Contradiction:
Improvecache capacityVSAvoidinstruction fetch speed
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent changes the parameter for determining cache replacement from arbitrary or time-based to temporal locality-based. This ensures that instructions with high reuse probability remain in cache, maximizing the effective use of cache capacity and minimizing slow memory fetches, thereby improving productivity without sacrificing cache capacity.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent treats cache entries with low temporal locality indicators as disposable - they are readily replaced when needed. This allows the system to maintain a small, highly effective cache that prioritizes frequently used instructions, achieving high instruction fetch speed while preserving essential cache capacity.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Data Source

PatentEP2980703B1Instruction cache management based on temporal locality
Publication Date: 2021.09.08 GOOGLE LLC
  • EP2980703B1 patent drawingFigure 1
  • EP2980703B1 patent drawingFigure 2
  • EP2980703B1 patent drawingFigure 3A~3B

AI summary

The present disclosure relates to managing an instruction cache based on temporal locality of cached instructions. One example method includes receiving a request for a first instruction included in a software application; storing the first instruction in a cache structure; receiving a request for a second instruction included in the software application; determining that a cache entry must be removed from the cache structure to create space to store the second instruction; determining that the first instruction should be removed from the cache structure based on temporal locality attributes associated with at least one of the first instruction or the second instruction, the temporal locality attributes representing a likelihood that additional requests will be received for an associated instruction while the instruction is stored in the cache structure; removing the first instruction from the cache structure; and storing the second instruction in the cache structure.