OS-Independent CPU Utilization via Clock Signal Monitoring
Find Innovative SolutionsGenerate 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
Engineering Contradiction Analysis
1Measurement precision
If OS-specific APIs are used to determine CPU utilization, then measurement accuracy is improved, but operating system dependency increases
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.
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.
2Measurement precision
If ready-to-run task list is accessed to calculate CPU idle time, then measurement accuracy is improved, but device complexity increases
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.
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.
3Measurement precision
If processor is placed in C2 or C3 states to measure idle time, then measurement accuracy is improved, but power consumption increases
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.
Data Source
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.


