Hardware Pre-fetch Circuit for Task Switch Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Computer systems face inefficiencies in task switching and memory access latency due to the differences in memory hierarchy and access times across various memory levels, particularly in pre-emptive real-time operating systems where tasks need to be switched quickly without cooperation from the running task.

Innovation Solution

A hardware circuit is used to generate pre-fetch requests for loading task instructions into main memory, determining a load start time based on future task switch conditions, and utilizing a hardware loader to load instructions from non-volatile memory into random access memory before the task is executed, thereby hiding memory access latency and optimizing bandwidth usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If tasks are switched quickly in pre-emptive real-time operating systems, then task switching efficiency is improved, but memory access latency increases due to loading instructions from non-volatile memory

Engineering Contradiction:
Improvetask switching efficiencyVSAvoidmemory access latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by predicting future task switch conditions and generating pre-fetch requests to load task instructions into main memory before the actual task switch occurs. The task control circuit identifies future task switch conditions based on task information in the queue, determines load start times, and initiates pre-fetch operations in advance, ensuring that instructions are ready when needed without interrupting current task execution.

Inventive Principle:
Principle #10Preliminary action

2Loss of time

If instructions are loaded from non-volatile memory into main memory before execution, then memory access latency is reduced, but system complexity increases due to hardware pre-fetch circuitry

Engineering Contradiction:
Improvememory access latencyVSAvoidhardware pre-fetch circuitry
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The task control circuit performs multiple functions: it maintains the task information queue, identifies future task switch conditions, determines load start times, generates pre-fetch requests, and triggers task events. This multi-functional approach consolidates what could be separate complex circuits into a single control unit, reducing overall system complexity while achieving the pre-fetch functionality.

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

Solution Approach 2:

The system uses its own task scheduling information and queue structure to automatically determine when pre-fetch operations are needed. The task control circuit leverages existing task event information and scheduling data to make pre-fetch decisions without requiring external control signals or additional complex coordination logic.

Inventive Principle:
Principle #25Self-service

3Productivity

If pre-fetch requests are generated based on future task switch conditions, then bandwidth usage is optimized, but difficulty of detecting and measuring task switch timing increases

Engineering Contradiction:
Improvebandwidth usage efficiencyVSAvoidtask switch timing
Core Design Contradiction:
ProductivityVSDifficulty of detecting and measuring

Solution Approach 1:

The task control circuit continuously monitors the task information queue and uses feedback from task event information to identify future task switch conditions. By observing the state of the task queue and timing information, the circuit dynamically determines when to initiate pre-fetch operations, adapting to changing task schedules without requiring complex external timing measurement mechanisms.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10120713B2Hardware controlled instruction pre-fetching
Publication Date: 2018.11.06 NXP USA INC
  • US10120713B2 patent drawing
  • US10120713B2 patent drawing
  • US10120713B2 patent drawing

AI summary

A task control circuit maintains, in response to task event information, a task information queue that includes task information for a plurality of tasks. Based upon the task information in the task information queue, a future task switch condition is identified as corresponding to a task switch time for a particular task of the plurality of tasks. A load start time is determined for a set of instructions for the particular task. A pre-fetch request is generated to load the set of instructions for the particular task into the memory circuit. The pre-fetch request is forwarded to a hardware loader circuit. In response to the task switch time, a task event trigger is generated for the particular task. The hardware loader circuit is used to load, in response to the pre-fetch request, the set of instructions from a non-volatile memory into the memory circuit.