Thread Context Preservation in Multithreading Cores

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multithreading computer systems, the variability in thread density and resource utilization leads to inconsistent transaction response times and billing, as the operating system is unaware of whether it has exclusive control of a core or shares resources with other threads, resulting in unpredictable throughput capacity.

Innovation Solution

A computer-implemented method that configures a core to switch between single thread and multithreading modes, where the primary thread is maintained as the primary thread in single thread mode, and secondary thread contexts are made inaccessible, allowing for either clearing or retaining program accessible register values, thereby managing thread context preservation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If transparent multithreading operation is implemented, then processor core resource utilization is improved, but response time variability and capacity prediction accuracy worsen

Engineering Contradiction:
Improvecore resource utilizationVSAvoidresponse time consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces an intermediary mechanism (thread density tracking and OS notification system) that mediates between the hardware multithreading layer and the operating system. This intermediary provides the OS with accurate information about thread density and resource sharing, enabling better capacity prediction and response time management while preserving the transparent MT operation benefits.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements feedback mechanisms where the hardware layer provides information about thread density and resource utilization to the operating system. This feedback loop enables the OS to adjust scheduling decisions, capacity provisioning, and response time expectations based on actual multithreading conditions, thereby reducing response time variability.

Inventive Principle:
Principle #23Feedback

2Productivity

If high thread density is maintained, then throughput capacity is improved, but system complexity and context management overhead increase

Engineering Contradiction:
Improvethroughput capacityVSAvoidcontext management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent enables the system to self-manage thread context preservation by automatically detecting when MT mode must be exited and handling context transitions without requiring manual intervention from the operating system or applications. The hardware and firmware work together to preserve and restore thread contexts, reducing the complexity burden on the OS.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent performs preliminary actions by preserving thread contexts in advance before MT mode is exited. Thread contexts are saved and made inaccessible before the transition to ST mode occurs, preventing the need for complex real-time context management during mode transitions and reducing overall system complexity.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If thread contexts are made inaccessible during mode switching, then mode transition reliability is improved, but data loss risk increases

Engineering Contradiction:
Improvemode transition reliabilityVSAvoidthread context data loss
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent applies beforehand cushioning by preserving thread contexts before mode switching occurs. Thread contexts are saved and protected in advance, creating a cushion against potential data loss during the transition. This ensures that even though contexts are made inaccessible during mode switching, the data is preserved and can be restored when needed.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

Solution Approach 2:

The patent implements a discard and recover mechanism where thread contexts are temporarily made inaccessible (discarded from active use) during mode transitions, but then recovered and restored when the appropriate mode is re-entered. This cycle of discarding and recovering contexts maintains reliability during transitions while preserving data availability when needed.

Inventive Principle:
Principle #34Discarding and recovering

Data Source

PatentUS9804847B2Thread context preservation in a multithreading computer system
Publication Date: 2017.10.31 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9804847B2 patent drawing
  • US9804847B2 patent drawing
  • US9804847B2 patent drawing

AI summary

According to one aspect, a computer-implemented method for thread context preservation in a configuration including a core configurable between a single thread (ST) mode and a multithreading (MT) mode is provided. The ST mode addresses a primary thread, and the MT mode addresses the primary thread and one or more secondary threads on shared resources of the core. Based on determining, by the core in the MT mode, that MT is to be disabled, switching from the MT mode to the ST mode is performed, where the primary thread of the MT mode is maintained as the primary thread of the ST mode. A thread context including program accessible register values and program counter values of the one or more secondary threads is made inaccessible to programs. Based on the switching, any one of clearing the program accessible register values or retaining the program accessible register values is performed.