Instruction-Level Execution Preemption via In-Flight Capture

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing preemption mechanisms in processor time-slicing require either waiting for the processor pipeline to idle or storing and restoring the entire state, which is inefficient for long-running applications and reduces available time for other applications.

Innovation Solution

A system and method for instruction-level execution preemption that captures and stores in-flight instructions in a processing task buffer, allowing for quick resumption without draining the pipeline or storing the entire state, and prioritizes reissue of preempted instructions upon context restoration.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the processor pipeline is drained to idle before preemption, then the preemption can be performed safely, but the time required for preemption increases significantly

Engineering Contradiction:
Improvepreemption safetyVSAvoidpreemption time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts only the necessary in-flight instructions from the processor pipeline that need to be preserved for later resumption, rather than draining the entire pipeline. This selective extraction allows preemption to occur without waiting for pipeline idle, significantly reducing preemption time while maintaining reliability through proper instruction capture and restoration.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs preliminary capture of in-flight instructions into a buffer before the preemption takes effect. This preliminary action ensures that the instructions are already saved and ready for restoration, eliminating the need to wait for pipeline draining while guaranteeing that no instructions are lost during the preemption transition.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the entire processor state is stored and restored for preemption, then the preemption is complete and accurate, but the overhead for state saving and restoration becomes very large

Engineering Contradiction:
Improvepreemption completenessVSAvoidexecution time
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts and stores only the specific in-flight instructions that are currently being processed in the pipeline, rather than saving the entire processor state including all registers and pipeline flip-flops. This selective extraction dramatically reduces the amount of data that needs to be saved and restored, minimizing overhead while maintaining preemption completeness for the active instructions.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by saving only the necessary portion of the processor state (in-flight instructions) rather than the complete state. This partial saving approach is sufficient for achieving preemption goals while avoiding the excessive overhead of full state preservation, thereby improving productivity during preemption operations.

Inventive Principle:
Principle #16Partial or excessive action

3Duration of action of moving object

If long-running applications are executed without preemption, then they can complete their full execution, but other applications suffer from reduced time slice availability

Engineering Contradiction:
Improveapplication execution durationVSAvoidtime slice availability
Core Design Contradiction:
Duration of action of moving objectVSProductivity

Solution Approach 1:

The patent enables preemption at any instruction boundary by having in-flight instructions preliminarily captured in a buffer. This allows the system to interrupt long-running applications at precise moments without requiring pipeline draining, ensuring that time slices can be allocated to multiple applications efficiently while maintaining the ability to restore and complete long-running applications later.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10552201B2Software-assisted instruction level execution preemption
Publication Date: 2020.02.04 NVIDIA CORP
  • US10552201B2 patent drawing
  • US10552201B2 patent drawing
  • US10552201B2 patent drawing

AI summary

One embodiment of the present invention sets forth a technique for instruction level execution preemption. Preempting at the instruction level does not require any draining of the processing pipeline. No new instructions are issued and the context state is unloaded from the processing pipeline. Any in-flight instructions that follow the preemption command in the processing pipeline are captured and stored in a processing task buffer to be reissued when the preempted program is resumed. The processing task buffer is designated as a high priority task to ensure the preempted instructions are reissued before any new instructions for the preempted context when execution of the preempted context is restored.