Preemptive Context Switching for Accelerated Processing Devices

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current computing systems face challenges in efficiently preempting processes from GPUs and context-switching tasks due to separate memory systems, inefficient scheduling, and limited programming models, which hinder the effective utilization of combined CPU and GPU resources, especially in terms of power consumption and memory latency.

Innovation Solution

The implementation of an accelerated processing device (APD)-initiated preemptive context-switching method, which includes detecting memory exceptions and preempting processes based on these exceptions, allowing for more efficient management and utilization of GPU resources by enabling context-switching between processes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If processes are allowed to occupy the GPU for arbitrary amounts of time without preemption, then the GPU can maintain continuous computation, but rogue processes can prevent effective utilization of system capacity and significantly reduce processing progress

Engineering Contradiction:
ImproveGPU utilization efficiencyVSAvoidprocess scheduling control
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements preemptive context switching that allows the system to interrupt and switch between processes before they can monopolize the GPU. The context switch logic is pre-configured to enable interruption at designated synchronization points, preventing rogue processes from occupying the GPU for arbitrary amounts of time while maintaining systematic control over process execution.

Inventive Principle:
Principle #10Preliminary action

2Device complexity

If context switching is implemented at coarse granularity with limited preemption points, then the system can maintain simpler scheduling logic, but the ability to efficiently preempt processes and utilize system capacity is severely constrained

Engineering Contradiction:
Improvescheduling mechanism complexityVSAvoidprocess preemption efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent segments the process execution flow into distinct phases with identified synchronization points (e.g., barrier synchronization, memory fence points). Context switching can occur at these segmented points without requiring fine-grained interruption capability throughout the entire execution flow. This segmentation enables efficient preemption while maintaining relatively simple scheduling logic at each segment boundary.

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If separate memory systems are used for CPU and GPU, then each processor can have independent memory management, but memory latency and power consumption increase for cooperating heterogeneous processors

Engineering Contradiction:
Improveindependent memory managementVSAvoidmemory access power consumption
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent employs a unified virtual memory system that acts as an intermediary between the CPU and GPU memory systems. The memory management unit translates virtual addresses from both processors, enabling them to access a shared address space without requiring direct physical memory connections. This intermediary approach maintains independent memory management capabilities while reducing power consumption and latency compared to separate physical memory systems.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Ease of operation

If chip-to-chip interfaces are used for processors to access memory, then each processor can access system memory independently, but memory latency and power consumption are negatively affected

Engineering Contradiction:
Improveindependent memory accessVSAvoidmemory access latency
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent implements a unified memory address space that both the CPU and GPU can access through a common memory management interface. Instead of requiring separate chip-to-chip interfaces for each processor to access system memory, the unified address space allows both processors to access memory through standardized pathways, reducing latency and power consumption while maintaining independent access capabilities.

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

Data Source

PatentUS9299121B2Preemptive context switching
Publication Date: 2016.03.29 ADVANCED MICRO DEVICES INC
  • US9299121B2 patent drawing
  • US9299121B2 patent drawing
  • US9299121B2 patent drawing

AI summary

Methods, systems, and computer readable media embodiments are disclosed for preemptive context-switching of processes running on a accelerated processing device. Embodiments include, detecting by an accelerated processing device a memory exception, and preempting a process from running on the accelerated processing device based upon the detected exception.