Dynamic CPU Thread Scheduling for Latency Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current CPU resource allocation algorithms are based on worst-case scenarios and do not optimize for lightly threaded applications or non-worst case workloads, leading to suboptimal performance.

Innovation Solution

A method that monitors performance activity of multiple threads and dynamically modifies core assignments and resource allocations to reduce physical distance between threads, assign threads to optimal cores, and adjust thresholds for power and thermal management based on performance metrics, such as cache misses and inter-thread communication.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If CPU resource allocation is based on maximum frequency during worst case workload, then system can handle peak loads, but performance is suboptimal for lightly threaded applications or non-worst case workloads

Engineering Contradiction:
Improveworst case workload handlingVSAvoidperformance for lightly threaded applications
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system dynamically adjusts CPU resource allocation based on real-time workload characteristics. The scheduler monitors thread behavior and performance metrics, then modifies core assignments and frequency settings on-the-fly, transitioning from static worst-case allocation to dynamic adaptive allocation that optimizes for current workload conditions.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes operational parameters (CPU frequency, core assignment, power states) based on detected workload patterns. By monitoring performance metrics and thread behavior, the system adjusts these parameters to match actual demands rather than relying on fixed worst-case settings, thereby improving efficiency for non-worst-case scenarios.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If threads are assigned to distant cores, then load balancing is improved, but latency increases due to physical distance and cache misses

Engineering Contradiction:
Improveload balancingVSAvoidlatency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system applies different scheduling strategies to different thread pairs based on their specific characteristics and relationships. For threads that communicate frequently, it prioritizes proximity to reduce latency. For independent threads, it allows broader distribution for load balancing. This localized, context-aware scheduling resolves the contradiction by applying the right strategy in the right context.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The scheduler incorporates feedback from performance monitoring to adjust core assignments. By observing cache hit rates, communication patterns, and execution performance, the system learns which thread pairs benefit from proximity versus distribution, and continuously optimizes assignments accordingly, balancing load distribution with latency reduction.

Inventive Principle:
Principle #23Feedback

3Stability of the object's composition

If resource allocation is static based on worst case scenarios, then system stability is maintained, but adaptability to different workload types is reduced

Engineering Contradiction:
Improvesystem stabilityVSAvoidadaptability to different workload types
Core Design Contradiction:
Stability of the object's compositionVSAdaptability or versatility

Solution Approach 1:

The system transitions from static to dynamic resource allocation while maintaining stability through controlled adaptation. The scheduler introduces gradual changes based on monitored performance, using feedback loops to ensure stability while improving adaptability. This allows the system to respond to different workload types without compromising overall system stability.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system performs self-optimization by automatically monitoring its own performance and adjusting resource allocation without external intervention. The workload-aware scheduler detects workload characteristics and autonomously modifies core assignments and frequency settings, enabling the system to adapt to different workload types while maintaining stable operation through self-regulation.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12008401B2Automatic central processing unit (CPU) usage optimization
Publication Date: 2024.06.11 ADVANCED MICRO DEVICES INC
  • US12008401B2 patent drawing
  • US12008401B2 patent drawing
  • US12008401B2 patent drawing

AI summary

Automatic central processing unit (CPU) usage optimization includes: monitoring performance activity of a workload comprising a plurality of threads; and modifying a resource allocation of a plurality of cores for the plurality of threads based on the performance activity.