Cache-Aware Thread Scheduling for Chip Multithreading Processors

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In computer networks, especially in multithreaded processors, estimating the shared cache miss rate of threads is challenging, leading to inefficient thread scheduling and increased latency due to unknown cache miss rates, which affects processor utilization and overall system performance.

Innovation Solution

A method and apparatus for a chip multithreading processor that concurrently executes threads to measure and determine their shared cache miss rates, allowing for improved scheduling based on these rates to optimize cache usage and reduce contention on shared resources like the L2 cache.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If threads are scheduled without knowing their cache miss rates, then scheduling can proceed without delay, but cache efficiency deteriorates and latency increases

Engineering Contradiction:
Improvethread scheduling efficiencyVSAvoidcache latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary classification of threads into cache-greedy and non-cache-greedy categories using performance counters and historical data before actual execution. This preliminary action allows the scheduler to make informed decisions about thread placement and cache allocation, avoiding the need to wait for cache miss rates to manifest during execution, thereby resolving the contradiction between immediate scheduling and cache efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback mechanisms through performance counters that monitor cache miss rates and other metrics during thread execution. This feedback is used to dynamically adjust thread scheduling decisions, cache allocation, and thread affinity settings. The feedback loop enables the system to learn from actual cache behavior and improve scheduling efficiency while maintaining low latency through adaptive adjustments.

Inventive Principle:
Principle #23Feedback

2Productivity

If cache-greedy threads are allowed to execute concurrently on multiple cores, then processor utilization increases, but shared cache contention increases and causes long latency events

Engineering Contradiction:
Improveprocessor utilizationVSAvoidlatency consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system segments threads into distinct categories based on their cache access patterns, specifically identifying cache-greedy threads versus non-cache-greedy threads. This segmentation allows the scheduler to apply different scheduling policies to different thread types. Cache-greedy threads are scheduled with awareness of their cache demands, while non-cache-greedy threads can be scheduled more aggressively, thus maintaining high processor utilization while preventing cache contention-induced latency spikes.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system applies local quality by assigning specific cache allocation policies and scheduling priorities to different thread types based on their characteristics. Cache-greedy threads receive targeted cache allocation and scheduling treatment different from non-cache-greedy threads. This localized approach ensures that each thread type operates under optimal conditions for its specific behavior, maintaining overall system reliability and latency consistency.

Inventive Principle:
Principle #3Local quality

3Productivity

If thread scheduling is based on estimated cache miss rates, then cache usage is optimized, but the complexity of measuring and determining miss rates increases

Engineering Contradiction:
Improvecache usage efficiencyVSAvoidmeasurement and scheduling system complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system implements self-service by using performance counters and monitoring mechanisms that automatically track cache miss rates and thread behavior without requiring external intervention or complex manual measurement systems. The scheduler uses this self-generated data to make autonomous scheduling decisions, optimizing cache usage while keeping the measurement and control system relatively simple through automated, self-servicing mechanisms.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7487317B1Cache-aware scheduling for a chip multithreading processor
Publication Date: 2009.02.03 ORACLE AMERICAN INC
  • US7487317B1 patent drawing
  • US7487317B1 patent drawing
  • US7487317B1 patent drawing

AI summary

A chip multithreading processor schedules and assigns threads to its processing cores dependent on estimated miss rates in a shared cache memory of the threads. A cache miss rate of a thread is estimated by measuring cache miss rates of one or more groups of executing threads, where at least one of the groups includes the thread of interest. Using a determined estimated cache miss rate of the thread, the thread is scheduled with other threads to achieve a relatively low cache miss rate in the shared cache memory.