Pull-Affinity Scheduling for Cold Threads in Multiprocessor Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional time-limited affinity scheduling in multiprocessor systems incurs significant cache reload transient penalties when threads become cold, leading to inefficient execution due to cache misses and coherency issues, as the system prioritizes load balancing over affinity awareness.

Innovation Solution

The implementation of 'pull-affinity' scheduling, which utilizes state information to maintain affinity for a processor shared by a running thread with a blocked thread, even after the thread has become cold, allowing the blocked thread to access shared data without burdensome cache coherency operations by resetting the thread's state to indicate affinity for the processor of the running thread.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional time-limited affinity scheduling is used to prioritize load balancing, then system throughput is improved, but cache reload transient penalty increases when threads become cold

Engineering Contradiction:
Improvesystem throughputVSAvoidcache reload transient penalty
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The scheduler proactively identifies cold threads that share data with running threads and applies pull-affinity scheduling in advance, before the cold thread actually needs to execute. This preliminary action ensures that when the cold thread wakes up, it is already scheduled on the optimal processor, eliminating cache reload penalties without disrupting load balancing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The scheduling system dynamically adjusts affinity rules based on real-time system state. It transitions from static time-limited affinity to dynamic pull-affinity scheduling by monitoring thread states, data sharing relationships, and processor availability, allowing the system to adaptively optimize for both throughput and cache performance.

Inventive Principle:
Principle #15Dynamics

2Loss of energy

If pull-affinity scheduling is applied to cold threads, then cache coherency traffic is reduced, but scheduling complexity increases

Engineering Contradiction:
Improvecache coherency trafficVSAvoidscheduling complexity
Core Design Contradiction:
Loss of energyVSDevice complexity

Solution Approach 1:

The scheduler implements feedback mechanisms by monitoring thread execution states, data sharing patterns, and cache performance metrics. This feedback loop enables the system to identify when pull-affinity scheduling should be applied, automatically adjusting scheduling decisions based on observed system behavior without requiring complex manual configuration.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The scheduling system uses information already available in the thread state and data structure to make scheduling decisions. By leveraging existing metadata about thread-data relationships and processor states, the system achieves pull-affinity scheduling without requiring additional complex tracking or external control mechanisms.

Inventive Principle:
Principle #25Self-service

3Reliability

If affinity is maintained for cold threads, then cache hit rate improves, but load balancing efficiency deteriorates

Engineering Contradiction:
Improvecache hit rateVSAvoidload balancing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The scheduler applies different scheduling strategies to different thread categories based on their specific characteristics. Warm threads continue to use traditional affinity scheduling, while cold threads with data sharing relationships receive pull-affinity treatment. This localized approach optimizes cache performance for specific threads without compromising overall load balancing efficiency.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

Instead of applying pull-affinity scheduling universally to all cold threads, the system applies it selectively only to threads that meet specific criteria (data sharing with running threads, cache miss patterns). This partial action approach provides cache performance benefits where needed while maintaining load balancing efficiency for the broader system.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS8051418B1Techniques for providing improved affinity scheduling in a multiprocessor computer system
Publication Date: 2011.11.01 ORACLE AMERICAN INC
  • US8051418B1 patent drawing
  • US8051418B1 patent drawing
  • US8051418B1 patent drawing

AI summary

Techniques for controlling a thread on a computerized system having multiple processors involve accessing state information of a blocked thread, and maintaining the state information of the blocked thread at current values when the state information indicates that less than a predetermined amount of time has elapsed since the blocked thread ran on the computerized system. Such techniques further involve setting the state information of the blocked thread to identify affinity for a particular processor of the multiple processors when the state information indicates that at least the predetermined amount of time has elapsed since the blocked thread ran on the computerized system. Such operation enables the system to place a cold blocked thread which shares data with another thread on the same processor of that other thread so that, when the blocked thread awakens and runs, that thread is closer to the shared data.