TimeGraph: GPU Scheduling for Real-Time Multi-Tasking Environments

The Graphics Processing Unit (GPU) is now commonly used for graphics and data-parallel computing. As more and more applications tend to accelerate on the GPU in multi-tasking environments where multiple tasks access the GPU concurrently, operating systems must provide prioritization and isolation capabilities in GPU resource management, particularly in real-time setups. We present TimeGraph, a real-time GPU scheduler at the device-driver level for protecting important GPU workloads from performance interference. TimeGraph adopts a new event-driven model that synchronizes the GPU with the CPU to monitor GPU commands issued from the user space and control GPU resource usage in a responsive manner. TimeGraph supports two priority-based scheduling policies in order to address the tradeoff between response times and throughput introduced by the asynchronous and non-preemptive nature of GPU processing. Resource reservation mechanisms are also employed to account and enforce GPU resource usage, which prevent misbehaving tasks from exhausting GPU resources. Prediction of GPU command execution costs is further provided to enhance isolation. Our experiments using OpenGL graphics benchmarks demonstrate that TimeGraph maintains the frame-rates of primary GPU tasks at the desired level even in the face of extreme GPU workloads, whereas these tasks become nearly unresponsive without TimeGraph support. Our findings also include that the performance overhead imposed on TimeGraph can be limited to 4-10%, and its event-driven scheduler improves throughput by about 30 times over the existing tick-driven scheduler.

[1]  E. Masterson,et al.  Summary , 1981, Vision Research.

[2]  Jay K. Strosnider,et al.  ENHANCED APERIODIC RESPONSIVENESS IN HARD REAL-TIME ENVIRONMENTS. , 1987, RTSS 1987.

[3]  Lui Sha,et al.  Exploiting unused periodic time for aperiodic service using the extended priority exchange algorithm , 1988, Proceedings. Real-Time Systems Symposium.

[4]  James W. Layland,et al.  Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment , 1989, JACM.

[5]  Marco Spuri,et al.  Efficient aperiodic service under earliest deadline scheduling , 1994, 1994 Proceedings Real-Time Systems Symposium.

[6]  Jason Nieh,et al.  SMART: a processor scheduler for multimedia applications , 1995, SOSP.

[7]  Daniel P. Siewiorek,et al.  A resource allocation model for QoS management , 1997, Proceedings Real-Time Systems Symposium.

[8]  Ragunathan Rajkumar,et al.  Real-time filesystems. Guaranteeing timing constraints for disk accesses in RT-Mach , 1997, Proceedings Real-Time Systems Symposium.

[9]  Michael B. Jones,et al.  CPU reservations and time constraints: efficient, predictable scheduling of independent activities , 1997, SOSP.

[10]  David R. Cheriton,et al.  Borrowed-virtual-time (BVT) scheduling: supporting latency-sensitive threads in a general-purpose scheduler , 1999, OPSR.

[11]  Kostadis Roussos,et al.  Deterministic Batch Scheduling without Static Partitioning , 1999, JSSPP.

[12]  Ragunathan Rajkumar,et al.  Portable RK: a portable resource kernel for guaranteed and enforced timing behavior , 1999, Proceedings of the Fifth IEEE Real-Time Technology and Applications Symposium.

[13]  Edward Y. Chang,et al.  Design and Implementation of Semi-preemptible IO , 2003, FAST.

[14]  S. Pronovost,et al.  Windows Display Driver Model (WDDM) v2 And Beyond , 2006 .

[15]  Eyal de Lara,et al.  VMM-independent graphics acceleration , 2007, VEE '07.

[16]  Emery D. Berger,et al.  Usenix Association 8th Usenix Symposium on Operating Systems Design and Implementation 73 Redline: First Class Support for Interactivity in Commodity Operating Systems , 2022 .

[17]  A Thesis Presented,et al.  A Fair-Share Scheduler for the Graphics Processing Unit , 2008 .

[18]  Mikhail Bautin,et al.  Graphic engine resource management , 2008, Electronic Imaging.

[19]  Galen C. Hunt,et al.  Helios: heterogeneous multiprocessing with satellite kernels , 2009, SOSP '09.

[20]  Vanish Talwar,et al.  GViM: GPU-accelerated virtual machines , 2009, HPCVirt '09.

[21]  Ashvin Goel,et al.  Fair and timely scheduling via cooperative polling , 2009, EuroSys '09.

[22]  Jeremy Sugerman,et al.  GPU virtualization on VMware's hosted I/O architecture , 2008, OPSR.