Operating system support for application-specific speculation

Speculative execution is a technique that allows serial tasks to execute in parallel. An implementation of speculative execution can be divided into two parts: (1) a policy that specifies what operations and values to predict, what actions to allow during speculation, and how to compare results; and (2) the mechanisms that support speculative execution, such as checkpointing, rollback, causality tracking, and output buffering. In this paper, we show how to separate policy from mechanism. We implement a speculation mechanism in the operating system, where it can coordinate speculations across all applications and kernel state. Policy decisions are delegated to applications, which have the most semantic information available to direct speculation. We demonstrate how custom policies can be used in existing applications to add new features that would otherwise be difficult to implement. Using custom policies in our separated speculation system, we can hide 85% of program load time by predicting the program's launch, decrease SSL connection latency by 15% in Firefox, and increase a BFT client's request rate by 82%. Despite the complexity of the applications, small modifications can implement these features since they only specify policy choices and rely on the system to realize those policies. We provide this increased programmability with a modest performance trade-off, executing only 8% slower than an optimized, application-implemented speculation system.

[1]  Brian Beckman,et al.  Time warp operating system , 1987, SOSP '87.

[2]  Frank B. Schmuck,et al.  Experience with transactions in QuickSilver , 1991, SOSP '91.

[3]  Andreas Reuter,et al.  Transaction Processing: Concepts and Techniques , 1992 .

[4]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[5]  James E. Smith,et al.  A study of branch prediction strategies , 1981, ISCA '98.

[6]  Todd C. Mowry,et al.  The potential for using thread-level data speculation to facilitate automatic parallelization , 1998, Proceedings 1998 Fourth International Symposium on High-Performance Computer Architecture.

[7]  Cristian Tapus,et al.  Kernel level speculative DSM , 2003, CCGrid 2003. 3rd IEEE/ACM International Symposium on Cluster Computing and the Grid, 2003. Proceedings..

[8]  Tong Li,et al.  Pulse: A Dynamic Deadlock Detection Mechanism Using Speculative Execution , 2005, USENIX Annual Technical Conference, General Track.

[9]  Jason Flinn,et al.  Speculative execution in a distributed file system , 2005, SOSP '05.

[10]  Kunle Olukotun,et al.  The Atomos transactional programming language , 2006, PLDI '06.

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

[12]  Jason Hickey,et al.  The Mojave Compiler: Providing Language Primitives for Whole-Process Migration and Speculation for Distributed Applications , 2007, 2007 IEEE International Parallel and Distributed Processing Symposium.

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

[14]  Peter A. Dinda,et al.  Experiences with Client-based Speculative Remote Display , 2008, USENIX Annual Technical Conference.

[15]  Jason Flinn,et al.  Tolerating Latency in Replicated State Machines Through Client Speculation , 2009, NSDI.

[16]  Eric Yeh,et al.  Efficient Online Learning and Prediction of Users' Desktop Actions , 2009, IJCAI.

[17]  Donald E. Porter,et al.  Operating System Transactions , 2009, SOSP '09.

[18]  Chen Ding,et al.  Fast Track: A Software System for Speculative Program Optimization , 2009, 2009 International Symposium on Code Generation and Optimization.

[19]  Jon Howell,et al.  Crom: Faster Web Browsing Using Speculative Execution , 2010, NSDI.

[20]  Christof Fetzer,et al.  Prospect: a compiler framework for speculative parallelization , 2010, CGO '10.