Thread Scheduling via Hardware Resource Demand Vectors

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional thread scheduling methods in multiprocessor systems fail to consider the actual resource utilization and demand of shared hardware components, leading to suboptimal scheduling decisions and poor performance due to contention on shared resources.

Innovation Solution

A method that determines the software and hardware resource demand vectors of threads using CPU performance counters, allowing for informed scheduling decisions to minimize resource contention and maximize efficiency by assigning threads to processor groups based on available resources and utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If conventional thread scheduling methods are used that treat all CPUs identically and ignore hardware-sharing relationships, then scheduling simplicity is maintained, but system performance deteriorates due to resource contention on shared hardware components

Engineering Contradiction:
Improvescheduling simplicityVSAvoidsystem performance
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent segments the processor system into processor groups (PGs) based on hardware-sharing relationships. Each PG is defined by a hierarchical tree structure where leaf PGs contain CPUs sharing specific hardware resources (execution pipeline, L1 cache, L2 cache, memory controller). This segmentation allows the scheduler to make informed decisions about which PG to assign threads to, considering the actual hardware resource utilization rather than treating all CPUs uniformly.

Inventive Principle:
Principle #1Segmentation

2Productivity

If thread scheduling considers hardware resource utilization and demand vectors, then resource contention is reduced and performance improves, but scheduling complexity increases

Engineering Contradiction:
ImproveperformanceVSAvoidscheduling complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces hardware resource utilization parameters and thread demand vectors to characterize resource usage. Each CPU has associated hardware performance counters that track utilization of shared resources (execution pipeline, caches, memory controllers). Threads are characterized by demand vectors indicating their resource requirements. The scheduler uses these parameters to make optimization decisions, balancing performance improvement against the increased complexity of tracking and processing these additional parameters.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If threads are assigned to processor groups based on hardware resource availability and utilization, then resource contention is minimized, but the computational overhead of calculating usage vectors and demand vectors increases

Engineering Contradiction:
Improveresource utilization efficiencyVSAvoidscheduling overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent implements preliminary action by pre-calculating and maintaining hardware usage vectors for each processor group and demand vectors for each thread. Hardware performance counters continuously track resource utilization, and the scheduler maintains updated usage vectors that reflect current system state. When a thread needs scheduling, the scheduler compares the thread's demand vector against the current usage vectors of available PGs, allowing for rapid decision-making without performing complex calculations at scheduling time.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10152354B2Optimized thread scheduling on processor hardware with performance-relevant shared hardware components
Publication Date: 2018.12.11 ORACLE INT CORP
  • US10152354B2 patent drawing
  • US10152354B2 patent drawing
  • US10152354B2 patent drawing

AI summary

To schedule a software thread for execution on a CPU in a multiprocessor system, a scheduler uses both software and hardware utilization information. For a thread, resource demands (including software and hardware resource demands) are determined based on measuring resource usage while the thread executes on the multiprocessor system without being isolated from any other threads that may run concurrently. For at least two processor cores, resource usage is calculated based on any threads already running on it. The software thread is assigned to a strand in the processor core with optimum available resources given the thread's resource demands.