In-Memory Shadow Registers for Multi-Threading Context Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The increasing number of latch-based control registers in computing environments leads to performance, chip area, and power consumption issues, particularly during context switching and due to the sequential nature of updates in program order.

Innovation Solution

Implementing configuration state registers in-memory rather than in-processor, allowing for reordering and speculative processing of access requests, and using hypervisor calls for pinning and unpinning operations to manage memory efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If latch-based control registers are used to support multi-threading, then the number of control registers increases to support concurrent threads, but chip area increases and context switching cost increases

Engineering Contradiction:
Improvemulti-threading supportVSAvoidchip area
Core Design Contradiction:
Adaptability or versatilityVSArea of stationary object

Solution Approach 1:

The patent uses shadow registers as copies of the actual control registers. Each thread has shadow register sets that are software-maintained copies, allowing the physical register count to remain limited while supporting multiple threads. The shadow registers store thread-specific control values without requiring dedicated physical registers for each thread.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces shadow registers as an intermediary layer between software and physical control registers. This intermediary allows software to manage thread-specific register states without requiring a proportional increase in physical register resources, thereby reducing chip area while maintaining multi-threading capability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If latch-based control registers are switched during context switches, then multi-threading is supported, but the cost of context switching increases due to the number of registers

Engineering Contradiction:
Improvecontext switching capabilityVSAvoidcontext switching time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent maintains shadow register copies that can be quickly swapped between threads. During context switching, the system updates shadow register pointers rather than physically switching numerous latch-based registers, significantly reducing context switching time while maintaining full multi-threading support.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent extracts the thread-specific register state management from the physical register switching mechanism. By maintaining thread states in shadow registers and using pointer switching, the system separates the heavy register switching operation from the lightweight context switch operation, reducing context switching overhead.

Inventive Principle:
Principle #2Taking out (Extraction)

3Speed

If configuration state registers are implemented in-processor as latches, then fast access is achieved, but updates occur in program order which affects performance

Engineering Contradiction:
Improveregister access speedVSAvoidprocessing throughput
Core Design Contradiction:
SpeedVSProductivity

Solution Approach 1:

The patent makes the register access mechanism dynamic by allowing out-of-order updates to shadow registers. Software can update shadow register values in any order, and the system dynamically manages these updates without being constrained by program order, improving processing throughput while maintaining fast access through the shadow register mechanism.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent segments the register system into physical control registers and software-maintained shadow registers. This segmentation allows independent management of each layer, enabling fast physical register access while allowing flexible, out-of-order updates to shadow registers, thereby improving overall processing throughput.

Inventive Principle:
Principle #1Segmentation

4Adaptability or versatility

If the number of control registers is increased to support more threads, then multi-threading performance is improved, but power consumption increases

Engineering Contradiction:
Improvethread concurrencyVSAvoidpower consumption
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by stationary object

Solution Approach 1:

The patent uses shadow registers as lightweight software-maintained copies rather than increasing physical register count. This approach supports thread concurrency without proportionally increasing power consumption, as shadow registers use minimal hardware resources compared to full latch-based control registers for each thread.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent employs shadow registers that are inexpensive software structures rather than expensive physical hardware registers. These shadow register copies can be quickly created and discarded during thread context switches without significant power penalty, enabling high thread concurrency with reduced power consumption compared to maintaining full physical register sets for each thread.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Data Source

PatentUS10642757B2Single call to perform pin and unpin operations
Publication Date: 2020.05.05 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10642757B2 patent drawing
  • US10642757B2 patent drawing
  • US10642757B2 patent drawing

AI summary

Single hypervisor call to perform pin and unpin operations. A hypervisor call relating to the pinning of units of memory is obtained. The hypervisor call specifies an unpin operation for a first memory address and a pin operation for a second memory address. Based on obtaining the hypervisor call, at least one of the unpin operation for the first memory address and the pin operation for the second memory address is performed.