Instruction Cache Lock Indicators Prevent Loop Thrashing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Small caches in computer systems lead to cache thrashing during execution of instruction loops, resulting in repetitive loading and unloading of data, increased energy consumption, and no performance enhancement, especially when the loop size exceeds the cache capacity.

Innovation Solution

An instruction cache with lock indicators and control logic that allows initial storage of loop instructions and inhibits further writes, preventing thrashing by resetting lock flags upon loop detection, thereby ensuring cached instructions are reused on subsequent iterations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the cache size is increased to store larger instruction loops, then cache effectiveness improves, but the cost and area of the cache increases

Engineering Contradiction:
Improvecache effectivenessVSAvoidcache area
Core Design Contradiction:
ReliabilityVSArea of stationary object

Solution Approach 1:

The cache is segmented into multiple cache blocks, each with its own lock indicator. This allows selective locking of individual blocks rather than requiring a large unified cache, enabling efficient use of limited cache area while maintaining effectiveness for loop execution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The lock indicators are set in advance before loop execution begins, preventing cache thrashing by proactively blocking write access to cache blocks that will be repeatedly accessed. This preliminary action eliminates the need for larger cache capacity to handle loop iterations.

Inventive Principle:
Principle #10Preliminary action

2Loss of energy

If lock indicators are used to prevent write access to cache blocks, then cache thrashing is reduced, but the device complexity increases

Engineering Contradiction:
Improveenergy consumptionVSAvoidcache control complexity
Core Design Contradiction:
Loss of energyVSDevice complexity

Solution Approach 1:

Each cache block has its own lock indicator, providing localized control over write access. This distributed approach reduces overall system complexity compared to a centralized locking mechanism, as each block can be independently managed without coordinating across the entire cache structure.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The control logic automatically manages lock indicators based on detected loop patterns, eliminating the need for external control mechanisms. The cache system self-regulates write access by monitoring access patterns and setting lock indicators accordingly, reducing overall device complexity.

Inventive Principle:
Principle #25Self-service

3Productivity

If write access is denied to cache blocks during loop execution, then cache thrashing is minimized, but access flexibility is reduced

Engineering Contradiction:
Improveloop execution speedVSAvoidcache access flexibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The lock indicators are dynamically set and cleared based on detected loop patterns. During loop execution, write access is blocked to prevent thrashing, but the locking mechanism is flexible enough to be cleared when loops are detected, allowing the cache to adapt its access behavior to different execution phases and maintain versatility.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The control logic monitors cache access patterns to detect loop execution and dynamically adjusts lock indicator states accordingly. This feedback mechanism allows the system to automatically switch between locked and unlocked states, maintaining both productivity during loops and flexibility when loops are not executing.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS9645825B2Instruction cache with access locking
Publication Date: 2017.05.09 TEXAS INSTRUMENTS INC
  • US9645825B2 patent drawing
  • US9645825B2 patent drawing
  • US9645825B2 patent drawing

AI summary

An instruction cache includes instruction storage, a plurality of lock indicators, and control logic. The instruction storage includes a plurality of cache blocks to store instructions. Each of the lock indicators is associated with one of the cache blocks so as to control access to the associated cache block. The control logic is configured to: set to a write disable state, on access of a given one of the cache blocks, a given one of the lock indictors associated with the given one of the cache blocks; to determine whether a given instruction is stored in the instruction storage; and to deny write access to the given one of the cache blocks that is assigned to store the given instruction based on the given one of the block indicators being set to the write disable state.