Device-driver reuse via virtual machines

Authors

Joshua LeVasseur

NICTA, Sydney, Australia
UNSW, Australia

Abstract

Device drivers constitute a significant portion of an operating system's source code. The effort to develop a new driver set is a sobering hurdle to the pursuit of novel operating system ventures. A practical solution is to reuse drivers, but this can contradict design goals in a new operating system. We offer a new approach to device-driver reuse, with a focus on promoting novel operating-system construction, which insulates the new operating system from the invariants of the reused drivers, while also addressing development effort. Our solution runs the drivers along with their original operating systems inside virtual machines, with some minor reuse infrastructure added to the driver's operating system to interface with the rest of the system. This approach turns the drivers into de-privileged applications of the new operating system, which separates their architectures and reduces cross-influences, and improves system dependability.

Virtual machines help reuse drivers, but they also penalize performance. The known solution for improving virtual machine performance, para-virtualization, modifies the operating system to run on a hypervisor, which has an enormous cost: substantial development effort, and abandonment of many of virtualization's benefits such as modularity. These costs contradict our goals for driver reuse: to reduce development effort, and to easily reuse from a variety of operating systems. Thus we introduce a new approach to constructing virtual machines: pre-virtualization. Our solution combines the performance of para-virtualization with the modularity of traditional virtual machines. We still modify the operating system, but according to a set of principles called soft layering that preserves modularity, and via automation which reduces implementation costs. With pre-virtualization we can easily reuse device drivers.

We describe our driver-reuse approach applied to a real system: we run virtual machines on the L4Ka::Pistachio microkernel, with reused Linux drivers. We include an evaluation and demonstrate that we achieve throughput comparable to the native Linux drivers, but with moderately higher CPU and memory utilization. Additionally, we describe how to apply pre-virtualization to multiple hypervisor environments. We include an evaluation of pre-virtualization, and demonstrate that it achieves comparable performance to para-virtualization for both the L4Ka::Pistachio and Xen hypervisors, with modularity.

BibTeX Entry

  @phdthesis{LeVasseur:phd,
    school           = {UNSW},
    author           = {Joshua LeVasseur},
    title            = {Device-driver reuse via virtual machines},
    month            = {May},
    year             = {2009},
    annote           = {School of Computer Science and Engineering, UNSW, Sydney, Australia},
    address          = {Sydney, Australia}
  }

Download

Served by Apache on Linux on seL4