Coprocessor Scheduling via Preemptive Multitasking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current computer systems face inefficiencies in scheduling coprocessor resources, particularly when multiple graphically intensive applications compete for GPU resources, leading to issues like 'hogging' where one application dominates the coprocessor, causing delays and performance degradation.
Innovation Solution
Implementing preemptive multitasking techniques that allow for executing rendering commands out of order, preempting the GPU during scheduling, allowing user mode drivers to build work items securely, preparing DMA buffers while the GPU is busy, resuming interrupted DMA buffers, and reducing memory usage for translated DMA buffers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If cooperative multitasking is used for GPU scheduling, then applications can submit work requests to the GPU driver, but one application can hog the coprocessor causing delays for other applications
Solution Approach 1:
The patent applies preliminary action by pre-calculating and storing execution time estimates for each work request in a priority queue before GPU execution. The scheduler uses these pre-computed time values to make informed scheduling decisions, allowing it to preempt long-running tasks and allocate GPU resources fairly among multiple applications without waiting for actual execution completion.
Solution Approach 2:
The patent implements dynamics by transitioning from static cooperative multitasking to dynamic preemptive multitasking. The GPU driver continuously monitors execution progress and can interrupt (preempt) currently running work requests based on priority changes or time estimates, dynamically adjusting resource allocation to prevent any single application from monopolizing the GPU and reducing waiting times for other applications.
2Ease of operation
If work requests are executed in the order they are received, then processing is simple, but high priority applications cannot get timely access to GPU resources
Solution Approach 1:
The patent applies preliminary action by pre-calculating and storing execution time estimates for each work request in a priority queue before GPU execution. The scheduler uses these pre-computed time values to make informed scheduling decisions, allowing it to preempt long-running tasks and allocate GPU resources fairly among multiple applications without waiting for actual execution completion.
Solution Approach 2:
The patent introduces an intermediary scheduling layer between application submission and GPU execution. The GPU driver acts as a mediator that intercepts work requests, assigns priorities, estimates execution times, and manages the priority queue. This intermediary layer adds complexity but enables sophisticated scheduling algorithms that can prioritize high-importance applications while maintaining overall system efficiency.
3Productivity
If an application submits voluminous work requests, then it充分利用 GPU resources, but it effectively hogs the coprocessor preventing other applications from accessing it
Solution Approach 1:
The patent implements dynamics by transitioning from static cooperative multitasking to dynamic preemptive multitasking. The GPU driver continuously monitors execution progress and can interrupt (preempt) currently running work requests based on priority changes or time estimates, dynamically adjusting resource allocation to prevent any single application from monopolizing the GPU and reducing waiting times for other applications.
Solution Approach 2:
The patent applies feedback by continuously monitoring GPU execution state and using this information to make real-time scheduling decisions. The driver receives feedback about execution progress, priority queue status, and application requirements, then adjusts the scheduling policy accordingly - preempting long-running tasks when necessary and allocating GPU resources to maintain both high throughput and fair multi-application access.
Data Source
AI summary
Systems and methods for scheduling coprocessing resources in a computing system are provided without redesigning the coprocessor. In various embodiments, a system of preemptive multitasking is provided achieving benefits over cooperative multitasking by any one or more of (1) executing rendering commands sent to the coprocessor in a different order than they were submitted by applications; (2) preempting the coprocessor during scheduling of non-interruptible hardware; (3) allowing user mode drivers to build work items using command buffers in a way that does not compromise security; (4) preparing DMA buffers for execution while the coprocessor is busy executing a previously prepared DMA buffer; (5) resuming interrupted DMA buffers; and (6) reducing the amount of memory needed to run translated DMA buffers.


