Runtime System Guest Code Conversion Context Switch Overhead

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current processor architectures face inefficiencies in context switching, particularly when handling a large number of threads, due to the overhead of duplicating architecture state elements and the complexity of thread-aware hardware, which hinders fine-grain parallelism and efficient execution of non-threaded software codes.

Innovation Solution

The implementation of a universal agnostic runtime system that includes a hardware accelerated conversion/JIT layer, enabling efficient execution and optimization of guest code into native instructions, and supporting speculative architectural states, thereby reducing the need for context switching and enhancing performance across different architectures.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If hardware duplicates all architecture state elements for each supported thread, then context switch overhead is eliminated for hardware-supported threads, but area, power and complexity of duplicating architecture state elements increases

Engineering Contradiction:
Improvecontext switch overheadVSAvoidcomplexity of duplicating architecture state elements
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent implements a universal runtime system that can execute multiple guest architectures on a single host architecture without duplicating hardware state elements. The system uses a unified hardware thread model where one hardware thread can dynamically support multiple guest threads through software-based context management, eliminating the need for hardware duplication while maintaining low context switch overhead

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent creates software-based copies of architecture state in the form of guest context data structures that can be rapidly switched. Instead of duplicating physical hardware state, the system maintains multiple software context representations that can be loaded and switched efficiently, reducing hardware complexity while enabling fast context transitions

Inventive Principle:
Principle #26Copying

2Loss of time

If hardware supports a limited number of threads through explicit hardware threads, then context switching is reduced for those threads, but fine grain parallelism and large number of thread support is hindered

Engineering Contradiction:
Improvecontext switch frequencyVSAvoidnumber of supported threads
Core Design Contradiction:
Loss of timeVSAdaptability or versatility

Solution Approach 1:

The patent introduces a software dimension for thread management by implementing guest threads as software entities rather than hardware entities. This allows the system to support a large number of threads beyond hardware limitations by managing thread contexts in software, while hardware only needs to support a limited number of physical threads. The guest thread ID space is mapped to hardware thread IDs dynamically

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Solution Approach 2:

The patent introduces a runtime system as an intermediary layer between software threads and hardware threads. This runtime system manages the mapping between guest threads and hardware threads, allowing many guest threads to be multiplexed onto fewer hardware threads. The runtime handles context switching and state management, freeing hardware from supporting large numbers of explicit hardware threads

Inventive Principle:
Principle #24Intermediary (Mediator)

3Device complexity

If context switch is performed when software threads exceed hardware threads, then thread management is simplified, but performance degradation occurs due to frequent context switching

Engineering Contradiction:
Improvethread management complexityVSAvoidexecution performance
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent performs preliminary actions by pre-managing guest thread contexts and their mappings to hardware threads in the runtime system. When guest threads are created, the runtime pre-allocates and manages their context data structures, and when context switches are needed, the runtime has already prepared the necessary state transitions, reducing the actual switch time and performance impact

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP3172664B1A system converter that implements a run ahead run time guest instruction conversion/decoding process and a prefetching process where guest code is pre-fetched from the target of guest branches in an instruction sequence
Publication Date: 2021.12.08 INTEL CORP
  • EP3172664B1 patent drawingFigure 1
  • EP3172664B1 patent drawingFigure 2
  • EP3172664B1 patent drawingFigure 3

AI summary

A system for an agnostic runtime architecture. The system includes a system emulation/virtualization converter, an application code converter, and a converter wherein a system emulation/virtualization converter and an application code converter implement a system emulation process, and wherein the system converter implements a system and application conversion process for executing code from a guest image, wherein the system converter or the system emulator. The system further includes a run ahead run time guest such an conversion/decoding process, and a prefetching process where guest code is pre-fetched from the target of guest branches in an instruction sequence.