Interruptible GPU Context Switching via Precise Position Tracking

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current graphics processing units (GPUs) face challenges in efficiently handling multiple graphically intensive applications simultaneously due to inefficient scheduling and lack of mechanisms for precise interruption, leading to bottlenecks when resources are shared among applications.

Innovation Solution

A GPU is configured to be interruptible, allowing it to save and restore contexts seamlessly, enabling the switching between multiple tasks and sharing processing resources by receiving interrupt commands or internal events, and maintaining precise processing positions to resume tasks from the point of interruption.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If the GPU executes operations in serialized order as received, then the GPU can process operations sequentially without complex scheduling, but the GPU becomes a bottleneck when multiple applications with differing priorities need to access resources simultaneously

Engineering Contradiction:
Improvescheduling complexityVSAvoidmulti-application processing efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The GPU receives and queues multiple runlists from different applications in advance, organizing them before execution. This preliminary organization allows the GPU to switch between applications efficiently without complex real-time scheduling decisions, resolving the contradiction by preparing work ahead of time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The GPU divides processing into separate runlists for different applications, each representing a discrete unit of work. This segmentation allows independent management and switching between application contexts, enabling multi-application processing without requiring the entire GPU state to be managed as one monolithic sequence.

Inventive Principle:
Principle #1Segmentation

2Reliability

If the GPU ties up resources while finishing processing for one application, then processing completeness is ensured, but waiting applications are bottlenecked and resource utilization decreases

Engineering Contradiction:
Improveprocessing completion guaranteeVSAvoidresource utilization
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The GPU saves the complete processing state (context) of the current application before switching to another application. This preliminary saving ensures that when the application is resumed, it can continue exactly where it left off, guaranteeing processing completion while allowing the GPU to be productive during the switch by working on other applications.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The GPU creates a copy of the application's processing context (registers, program counter, etc.) and stores it in memory. This copying allows the GPU to switch applications without losing the original application's state, enabling reliable resumption later while improving overall resource utilization through concurrent processing.

Inventive Principle:
Principle #26Copying

3Measurement precision

If the GPU implements context save/restore mechanisms like CPUs, then precise interruption and resumption is enabled, but device complexity and overhead increase

Engineering Contradiction:
Improveinterruption precisionVSAvoidcontext management complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The GPU extracts only the essential context information needed for resumption (register values, program counter, runlist identifier) and stores it externally in memory, rather than maintaining complex internal state machines. This extraction approach enables precise interruption points while reducing the complexity of the GPU's internal architecture.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The GPU uses an external memory system as an intermediary to store context information, rather than requiring complex internal storage structures. This intermediary approach simplifies the GPU architecture by offloading context management to the memory system, enabling precise interruptions without significantly increasing device complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Productivity

If the GPU switches between multiple tasks frequently, then resource sharing and concurrency improve, but context switching overhead increases and processing speed decreases

Engineering Contradiction:
Improveconcurrent processing capabilityVSAvoidcontext switching time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The GPU prepares and queues multiple runlists in advance, so when a context switch is needed, the next runlist is already ready to execute. This preliminary preparation minimizes the actual switching time by eliminating the need to fetch or organize work items during the switch, reducing time loss while maintaining high concurrency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The GPU implements dynamic runlist management where the scheduling of runlists can be adjusted based on application priorities and resource availability. This dynamic approach allows the GPU to optimize the frequency and timing of context switches, balancing concurrent processing benefits against switching overhead by being flexible rather than rigid in its switching behavior.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS7545381B2Interruptible GPU and method for context saving and restoring
Publication Date: 2009.06.09 VIA TECH INC
  • US7545381B2 patent drawing
  • US7545381B2 patent drawing
  • US7545381B2 patent drawing

AI summary

A graphics processing unit (“GPU”) is configured to receive an interrupt command from a CPU or internal interrupt event while the GPU is processing a first context. The GPU saves the first context to memory and records a precise processing position for the first context corresponding to the point interrupted. Thereafter, the GPU loads a second context to the processing portion of the GPU from memory and begins executing instructions associated with the second context. After the second context is complete of if an interrupt command directs restoration of the first context, the GPU's processor switches to the first context for continued processing. The first context is retrieved from memory and restored to the precise processing position where previously interrupted. The GPU then processes a remainder portion of the first context from the precise processing point to an end of the first context.