OS-Independent CPU Utilization via Clock Signal Monitoring

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for determining CPU utilization outside of an operating system are challenging due to the lack of access to the ready-to-run task list, making it difficult to calculate CPU idle time accurately through supported application programming interfaces (APIs).

Innovation Solution

An operating system-independent method that monitors clock signals from a CPU core to calculate the time period used for work during a sampling interval, using a high privilege driver to configure performance monitors and track CPU_CLKS_UNHALTED events, allowing for CPU utilization calculation without relying on OS-specific APIs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If OS-specific APIs are used to determine CPU utilization, then measurement accuracy is improved, but operating system dependency increases

Engineering Contradiction:
ImproveCPU utilization measurement accuracyVSAvoidOS independence
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The patent introduces performance monitors as an intermediary hardware component that bridges the gap between applications and the OS. These monitors track CPU_CLKS_UNHALTED events and provide OS-independent data about CPU utilization, eliminating the need for direct OS API access while maintaining measurement accuracy.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the software-based OS API mechanism with a hardware-based performance monitoring system. By using hardware counters and performance monitors to track CPU clock states, the system eliminates dependency on OS-specific software interfaces while achieving the same measurement goal.

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

2Measurement precision

If ready-to-run task list is accessed to calculate CPU idle time, then measurement accuracy is improved, but device complexity increases

Engineering Contradiction:
ImproveCPU idle time calculation accuracyVSAvoidSystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent extracts the CPU utilization measurement function from the OS's internal task list management. By using performance monitors to independently track CPU_CLKS_UNHALTED events, the system separates the measurement function from the OS scheduling mechanisms, reducing system complexity while maintaining accuracy.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The performance monitoring system serves itself by automatically tracking CPU clock states without requiring OS intervention or access to internal data structures. The hardware counters self-manage the measurement process, eliminating the need for complex OS coordination.

Inventive Principle:
Principle #25Self-service

3Measurement precision

If processor is placed in C2 or C3 states to measure idle time, then measurement accuracy is improved, but power consumption increases

Engineering Contradiction:
ImproveCPU idle time measurement accuracyVSAvoidPower consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

Instead of fully powering down the processor to measure idle time, the patent uses partial action by leveraging the performance monitor's ability to track CPU clock states while the processor remains in a lightly powered state. This approach provides sufficient measurement data without the need for complete power state changes.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS7694164B2Operating system-independent method and system of determining CPU utilization
Publication Date: 2010.04.06 TAHOE RES LTD
  • US7694164B2 patent drawing
  • US7694164B2 patent drawing
  • US7694164B2 patent drawing

AI summary

A method and device are provided to monitor clock control signals from a CPU core; and calculate a time period during a sampling interval that the CPU core was used to perform work based on the clock control signals.