Multi-threaded Processing Context Switch Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multi-threaded processing systems like Cell processors, frequent context switches are computationally intensive and time-consuming, especially for processors with many registers, leading to performance issues due to the involvement of the Power Processor Element (PPE) in managing Synergistic Processing Elements (SPE) threads, which are not autonomous and tend to be slow.

Innovation Solution

Implementing a system where the operating system notifies threads of pre-emption by higher-priority threads with a specified time limit, allowing threads to yield the processor without saving context if they complete within that time, thereby reducing or avoiding context switches, and enabling more cooperative scheduling decisions based on additional information provided by applications.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If traditional context switching is used to manage multiple threads on SPE, then thread switching capability is achieved, but processing speed deteriorates due to computational overhead and time consumption

Engineering Contradiction:
Improvethread switching capabilityVSAvoidprocessing speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

The patent applies preliminary action by pre-loading multiple thread contexts into the SPE's local store before execution. The operating system prepares thread contexts in advance and loads them into the limited local memory, so that when a thread needs to switch, the new context is already available locally without requiring time-consuming transfers from main memory. This resolves the contradiction by maintaining thread switching capability while eliminating the speed penalty of traditional context switching.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the context switching operation from the main processing flow by implementing asynchronous context loading. Instead of performing context switches synchronously (which blocks processing), the system extracts context loading into a separate asynchronous operation that occurs in the background. This allows the SPE to continue processing while contexts are being prepared and loaded, thereby maintaining switching capability without sacrificing processing speed.

Inventive Principle:
Principle #2Taking out (Extraction)

2Adaptability or versatility

If frequent context switches are performed to implement multi-threaded processing, then thread concurrency is achieved, but productivity deteriorates due to computational intensity and time consumption

Engineering Contradiction:
Improvethread concurrencyVSAvoidprocessing productivity
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent implements self-service by enabling the SPE to autonomously manage its own thread contexts without requiring intervention from the PPE. The SPE maintains a local context store and can switch between threads using contexts already loaded in its local memory, making it self-sufficient for context management. This eliminates the need for PPE involvement in each context switch, thereby achieving thread concurrency while preserving processing productivity.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The operating system performs preliminary actions by pre-loading multiple thread contexts into the SPE's local store before the SPE needs to switch between them. This advance preparation ensures that when concurrency is needed, all required contexts are already available locally, allowing immediate switching without productivity loss. The system proactively manages context availability rather than reactively handling context switches.

Inventive Principle:
Principle #10Preliminary action

3Ease of operation

If the PPE is involved in managing SPE threads to ensure proper context switching, then thread management control is achieved, but autonomy of SPE deteriorates and performance slows down

Engineering Contradiction:
Improvethread management controlVSAvoidSPE autonomy
Core Design Contradiction:
Ease of operationVSExtent of automation

Solution Approach 1:

The patent applies segmentation by dividing thread management responsibilities between the PPE and SPE. The PPE retains control over high-level thread creation, destruction, and priority management, while the SPE autonomously handles context switching and local context maintenance. This segmentation allows the PPE to maintain management control without being involved in every context switch operation, thereby increasing SPE autonomy and performance while preserving necessary control mechanisms.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism in the form of a context buffer or local store that sits between the PPE and SPE. The PPE loads contexts into this intermediary structure, and the SPE autonomously retrieves and switches between contexts from it. This intermediary allows the PPE to maintain control over context availability while the SPE independently performs switching operations, resolving the contradiction between management control and SPE autonomy.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9870252B2Multi-threaded processing with reduced context switching
Publication Date: 2018.01.16 SONY INTERACTIVE ENTERTAINMENT LLC
  • US9870252B2 patent drawing
  • US9870252B2 patent drawing
  • US9870252B2 patent drawing

AI summary

Multi-threaded processing with reduced context switching is disclosed. Context switches may be avoided through the use of pre-emption notification, a pre-emption wait time attribute and a no-context-save yield.