CPU Load Measurement Using Delayed ISR Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for measuring CPU load are inaccurate and have high overhead, especially when CPU idling and frequency scaling are involved, as they require continuous idle loop spinning or complex instrumentation, leading to increased power consumption and inaccuracy.

Innovation Solution

A low-overhead method that utilizes the built-in capability of some digital signal processors (DSPs) to delay interrupt service routine processing upon CPU wakeup, allowing measurement of idle time by reading the time base before and after the IDLE instruction, and comparing it to total time to calculate CPU load.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the idle loop runs continuously to measure CPU load, then load measurement is possible, but power consumption increases and accuracy is lost when CPU is idled

Engineering Contradiction:
ImproveCPU load measurement accuracyVSAvoidCPU power consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent implements periodic action by using OS-triggered idle loops that execute only when the CPU is actually idle, rather than continuous spinning. The idle loop is activated periodically by the operating system based on workload conditions, allowing accurate measurement of idle time without continuous power consumption. This resolves the contradiction by making the measurement mechanism periodic rather than continuous.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The patent applies self-service by having the operating system automatically trigger idle loops when appropriate, eliminating the need for continuous active monitoring. The system serves itself by detecting idle conditions and activating measurement only when needed, thereby reducing power consumption while maintaining measurement accuracy during idle periods.

Inventive Principle:
Principle #25Self-service

2Use of energy by moving object

If frequency scaling is used to save power, then power consumption decreases, but accurate load measurement becomes difficult

Engineering Contradiction:
ImproveCPU power consumptionVSAvoidCPU load measurement accuracy
Core Design Contradiction:
Use of energy by moving objectVSMeasurement precision

Solution Approach 1:

The patent introduces an intermediary mechanism - the OS-triggered idle loop - that mediates between frequency scaling operations and load measurement requirements. The idle loop serves as an intermediary that can accurately measure idle time even when frequency scaling is active, because it is triggered by the OS which manages the frequency scaling, thereby decoupling the measurement accuracy from the frequency changes.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Use of energy by moving object

If clock gating is used to halt CPU during idle time, then power consumption decreases, but idle loop calibration becomes unnecessary and measurement approach must change

Engineering Contradiction:
ImproveCPU power consumptionVSAvoidMeasurement implementation complexity
Core Design Contradiction:
Use of energy by moving objectVSDevice complexity

Solution Approach 1:

The patent applies inversion by changing the measurement approach from active spinning (traditional method) to passive idle loop triggering (new method). Instead of having the CPU actively spin and measure time, the system inverts the approach by allowing the CPU to enter idle state and having the OS trigger measurement loops only when needed. This inversion simplifies the measurement implementation while maintaining accuracy and enabling clock gating.

Inventive Principle:
Principle #13The other way round (Inversion)

Data Source

PatentUS7788511B2Method for measuring utilization of a power managed CPU
Publication Date: 2010.08.31 TEXAS INSTRUMENTS INC
  • US7788511B2 patent drawing
  • US7788511B2 patent drawing
  • US7788511B2 patent drawing

AI summary

An extremely low overhead method calculates CPU load in the presence of both CPU idling and frequency scaling. The method measures time the CPU is idled while waiting for a wakeup. This invention uses a feature in current DSPs with the capability of delaying ISR processing on wake from IDLE. Using this mechanism it is possible to determine the time before IDLE, the time immediately following CPU wakeup, and then run the wakeup ISR. The delta time can be accumulated and compared to total time to determine true CPU load.