Composing OS extensions safely and efficiently with Bascule

Library OS (LibOS) architectures implement the OS personality as a user-mode library, giving each application the flexibility to choose its LibOS. This approach is appealing for many reasons, not least the ability to extend or customise the LibOS. Recent work with Drawbridge [29] showed that an existing commodity OS (Windows 7) could be refactored to produce a LibOS while retaining application compatibility. This paper presents Bascule, an architecture for LibOS extensions based on Drawbridge. Rather than relying on the application developer to customise a LibOS, Bascule allows OS-independent extensions to be attached at runtime. Extensions interpose on a narrow binary interface of primitive OS abstractions, such as files and virtual memory. Thus, they are independent of both guest and host OS, and composable at runtime. Since an extension runs in the same process as an application and its LibOS, it is safe and efficient. Bascule demonstrates extension reuse across diverse guest LibOSes (Windows and Linux) and host OSes (Windows and Barrelfish). Current extensions include file system translation, checkpointing, and architecture adaptation.

[1]  Michael N. Nelson,et al.  Extensible file systems in spring , 1994, SOSP '93.

[2]  Jon Howell,et al.  Leveraging Legacy Code to Deploy Desktop Applications on the Web , 2008, OSDI.

[3]  David R. Cheriton,et al.  A caching model of operating system kernel functionality , 1995, OPSR.

[4]  Yuanyuan Zhou,et al.  Triage: diagnosing production run failures at the user's site , 2007, SOSP.

[5]  Adrian Schüpbach,et al.  The multikernel: a new OS architecture for scalable multicore systems , 2009, SOSP '09.

[6]  Robert Grimm,et al.  Application performance and flexibility on exokernel systems , 1997, SOSP.

[7]  Dilma Da Silva,et al.  Providing a Linux API on the Scalable K42 Kernel , 2003, USENIX Annual Technical Conference, FREENIX Track.

[8]  Gernot Heiser,et al.  Hype and Virtue , 2007, HotOS.

[9]  Galen C. Hunt,et al.  Detours: binary interception of Win32 functions , 1999 .

[10]  Dawson R. Engler,et al.  Exokernel: an operating system architecture for application-level resource management , 1995, SOSP.

[11]  Margo I. Seltzer,et al.  Dealing with disaster: surviving misbehaved kernel extensions , 1996, OSDI '96.

[12]  Dutch T. Meyer,et al.  Remus: High Availability via Asynchronous Virtual Machine Replication. (Best Paper) , 2008, NSDI.

[13]  Donald E. Porter,et al.  Rethinking the library OS from the top down , 2011, ASPLOS XVI.

[14]  Michael B. Jones,et al.  Interposition agents: transparently interposing user code at the system interface , 1994, SOSP '93.

[15]  Christoforos E. Kozyrakis,et al.  Usenix Association 10th Usenix Symposium on Operating Systems Design and Implementation (osdi '12) 335 Dune: Safe User-level Access to Privileged Cpu Features , 2022 .

[16]  Samuel T. King,et al.  Debugging Operating Systems with Time-Traveling Virtual Machines (Awarded General Track Best Paper Award!) , 2005, USENIX Annual Technical Conference, General Track.

[17]  Krste Asanovic,et al.  Mondrian memory protection , 2002, ASPLOS X.

[18]  Satish Narayanasamy,et al.  Respec: Efficient Online Multiprocessor Replay via Speculation and External Determinism , 2010, ASPLOS 2010.

[19]  Marianne Shaw,et al.  Constructing Services with Interposable Virtual Hardware , 2004, NSDI.

[20]  Fred B. Schneider,et al.  Hypervisor-based fault tolerance , 1996, TOCS.

[21]  Daniel C. DuVarney,et al.  Address Obfuscation: An Efficient Approach to Combat a Broad Range of Memory Error Exploits , 2003, USENIX Security Symposium.

[22]  Samuel T. King,et al.  ReVirt: enabling intrusion analysis through virtual-machine logging and replay , 2002, OPSR.

[23]  Brian N. Bershad,et al.  Extensibility safety and performance in the SPIN operating system , 1995, SOSP.

[24]  Jason Flinn,et al.  Rethink the sync , 2006, OSDI '06.

[25]  Robin Fairbairns,et al.  The Design and Implementation of an Operating System to Support Distributed Multimedia Applications , 1996, IEEE J. Sel. Areas Commun..

[26]  Junfeng Yang,et al.  Efficient deterministic multithreading through schedule relaxation , 2011, SOSP.

[27]  Thomas E. Anderson,et al.  SLIC: An Extensibility System for Commodity Operating Systems , 1998, USENIX ATC.

[28]  Mike Hibler,et al.  Microkernels meet recursive virtual machines , 1996, OSDI '96.

[29]  Andrew Warfield,et al.  Live migration of virtual machines , 2005, NSDI.

[30]  Dejan S. Milojicic,et al.  Process migration , 1999, ACM Comput. Surv..