PTask: Operating System Abstractions To Manage GPUs
as Compute Devices
Christopher J. Rossbach
Microsoft Research
crossbac@microsoft.com
Jon Currey
Microsoft Research
jcurrey@microsoft.com
Mark Silberstein
Technion
marks@cs.technion.ac.il
Baishakhi Ray
University of Texas at Austin
bray@cs.utexas.edu
Emmett Witchel
University of Texas at Austin
witchel@cs.utexas.edu
ABSTRACT
We propose a new set of OS abstractions to support GPUs and other
accelerator devices as first class computing resources. These new
abstractions, collectively called the PTask API, support a dataflow
programming model. Because a PTask graph consists of OS-managed
objects, the kernel has sufficient visibility and control to provide
system-wide guarantees like fairness and performance isolation,
and can streamline data movement in ways that are impossible un-
der current GPU programming models.
Our experience developing the PTask API, along with a gestural
interface on Windows 7 and a FUSE-based encrypted file system
on Linux show that the PTask API can provide important system-
wide guarantees where there were previously none, and can enable
significant performance improvements, for example gaining a 5×
improvement in maximum throughput for the gestural interface.
Categories and Subject Descriptors
D.4.8 [Operating systems]: [Performance]; D.4.7 [Operating sys-
tems]: [Organization and Design]; I.3.1 [Hardware Architecture]:
[Graphics processors]; D.1.3 [Programming Techniques]: [Con-
current Programming]
General Terms
OS Design, GPUs, Performance
Keywords
Dataflow, GPUs, operating systems, GPGPU, gestural interface,
accelerators
1. INTRODUCTION
Three of the top five supercomputers on the TOP500 list for
June 2011 (the most recent ranking) use graphics processing units
(GPUs) [6]. GPUs have surpassed CPUs as a source of high-density
computing resources. The proliferation of fast GPU hardware has
been accompanied by the emergence of general purpose GPU (GPGPU)
Figure 1: Technology stacks for CPU vs GPU programs. The
1-to-1 correspondence of OS-level and user-mode runtime ab-
stractions for CPU programs is absent for GPU programs
frameworks such as DirectX, CUDA [59], and OpenCL [47], en-
abling talented programmers to write high-performance code for
GPU hardware. However, despite the success of GPUs in super-
computing environments, GPU hardware and programming envi-
ronments are not routinely integrated into many other types of sys-
tems because of programming difficulty, lack of modularity, and
unpredictable performance artifacts.
Current software and system support for GPUs allows their com-
putational power to be used for high-performance rendering or for a
wide array of high-performance batch-oriented computations [26],
but GPU use is limited to certain application domains. The GPGPU
ecosystem lacks rich operating system (OS) abstractions that would
enable new classes of compute-intensive interactive applications,
such as gestural input, brain-computer interfaces, and interactive
video recognition, or applications in which the OS uses the GPU
for its own computation such as encrypted file systems. In contrast
to interactive games, which use GPUs as rendering engines, these
applications use GPUs as compute engines in contexts that require
OS support. We believe these applications are not being built be-
cause of inadequate OS-level abstractions and interfaces. The time
has come for OSes to stop managing graphics processing devices
(GPUs) as I/O devices and start managing them as a computational
devices, like CPUs.
Figure 1 compares OS-level support for traditional hardware to
OS-level support for GPUs. In contrast to most common system
resources such as CPUs and storage devices, kernel-level abstrac-
tions for GPUs are severely limited. While OSes provide a driver
interface to GPUs, that interface locks away the full potential of the
graphics hardware behind an awkward ioctl-oriented interface
designed for reading and writing blocks of data to millisecond-
latency disks and networks. Moreover, lack of a general kernel-
facing interface severely limits what the OS can do to provide high-
level abstractions for GPUs: in Windows, and other closed-source
OSes, using the GPU from a kernel mode driver is not currently
supported using any publicly documented APIs. Additionally, be-
233
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that copies
bear this notice and the full citation on the first page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior
specific permission and/or a fee.
SOSP '11, October 23-26, 2011, Cascais, Portugal.
Copyright © 2011 ACM 978-1-4503-0977-6/11/10 ... $10.00.
- 1
- 2
- 3
- 4
- 5
- 6
前往页