Operating System Support for Application-Specific Speculation Benjamin Wester Peter Chen and Jason Flinn University of Michigan.

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed System Architectures.
R2: An application-level kernel for record and replay Z. Guo, X. Wang, J. Tang, X. Liu, Z. Xu, M. Wu, M. F. Kaashoek, Z. Zhang, (MSR Asia, Tsinghua, MIT),
CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Resource Containers: A new Facility for Resource Management in Server Systems G. Banga, P. Druschel,
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen Jason Flinn University of Michigan.
Speculative Execution In Distributed File System and External Synchrony Edmund B.Nightingale, Kaushik Veeraraghavan Peter Chen, Jason Flinn Presented by.
Company name KUAS HPDS Using Remote Memory Paging for Handheld Devices in a Pervasive Computing Environment Arjuna Sathiaseelan.
Concurrency: introduction1 ©Magee/Kramer 2 nd Edition Concurrency State Models and Java Programs Jeff Magee and Jeff Kramer.
Study of Hurricane and Tornado Operating Systems By Shubhanan Bakre.
1 Cheriton School of Computer Science 2 Department of Computer Science RemusDB: Transparent High Availability for Database Systems Umar Farooq Minhas 1,
Using DSVM to Implement a Distributed File System Ramon Lawrence Dept. of Computer Science
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
12/2/2003chow1 Network and System Support for Multi-Level Security C. Edward Chow Department of Computer Science University of Colorado At Colorado Springs.
Ameoba Designed by: Prof Andrew S. Tanenbaum at Vrija University since 1981.
Lecture 2 Page 1 CS 236, Spring 2008 Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
Java Security Model Lab#1 I. Omaima Al-Matrafi. Safety features built into the JVM Type-safe reference casting Structured memory access (no pointer arithmetic)
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
Socket Programming.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
User Level Interprocess Communication for Shared Memory Multiprocessor by Bershad, B.N. Anderson, A.E., Lazowska, E.D., and Levy, H.M.
Application architectures
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
RPC Project Using either sockets or TLI, implement Remote Procedure Calls between two distinct machines that are communicating over an Ethernet network.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
Database System Architectures  Client-server Database System  Parallel Database System  Distributed Database System Wei Jiang.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
RFC6520 defines SSL Heartbeats - What are they? 1. SSL Heartbeats are used to keep a connection alive without the need to constantly renegotiate the SSL.
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
Accelerating Mobile Applications through Flip-Flop Replication
QuFiles: The right file at the right time Kaushik Veeraraghavan Jason Flinn Ed Nightingale * Brian Noble University of Michigan *Microsoft Research (Redmond)
SSL and https for Secure Web Communication CSCI 5857: Encoding and Encryption.
1 AutoBash: Improving Configuration Management with Operating System Causality Analysis Ya-Yunn Su, Mona Attariyan, and Jason Flinn University of Michigan.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Remus: VM Replication Jeff Chase Duke University.
JSProxy: Safety from Javascript Benjamin Prosnitz, Tang Yi, Yinzhi Cao.
Distributed File Systems
Parallelizing Security Checks on Commodity Hardware E.B. Nightingale, D. Peek, P.M. Chen and J. Flinn U Michigan.
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Four Windows Server 2008 Remote Desktop Services,
Swapping to Remote Memory over InfiniBand: An Approach using a High Performance Network Block Device Shuang LiangRanjit NoronhaDhabaleswar K. Panda IEEE.
Parallelizing Security Checks on Commodity Hardware Ed Nightingale Dan Peek, Peter Chen Jason Flinn Microsoft Research University of Michigan.
Practical Byzantine Fault Tolerance
CE Operating Systems Lecture 3 Overview of OS functions and structure.
SPECULATIVE EXECUTION IN A DISTRIBUTED FILE SYSTEM E. B. Nightingale P. M. Chen J. Flint University of Michigan.
Robustness in the Salus scalable block store Yang Wang, Manos Kapritsos, Zuocheng Ren, Prince Mahajan, Jeevitha Kirubanandam, Lorenzo Alvisi, and Mike.
Moving Web Apps From Synchronous to Asynchronous Processing Jason Carreira Architect, ePlus Systems OpenSymphony member.
Speculative Execution in a Distributed File System Ed Nightingale Peter Chen Jason Flinn University of Michigan.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Process Models, Creation and Termination Reference –text: Tanenbaum ch. 2.1.
Storage Systems CSE 598d, Spring 2007 Rethink the Sync April 3, 2007 Mark Johnson.
Shell Interface Shell Interface Functions Data. Graphical Interface Graphical Interface Command-line Interface Command-line Interface Experiments Private.
Speculation Supriya Vadlamani CS 6410 Advanced Systems.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Securing Distributed Systems with Information Flow Control.
Highly Available Services and Transactions with Replicated Data Jason Lenthe.
Speculative Execution in a Distributed File System Ed Nightingale Peter Chen Jason Flinn University of Michigan Best Paper at SOSP 2005 Modified for CS739.
Sockets A popular API for client-server interaction.
CS 540 Database Management Systems
Last Class: Introduction
Presented by: Daniel Taylor
Tolerating Latency in Replicated State Machines through Client Speculation April 22, 2009 Benjamin Wester1, James Cowling2, Edmund B. Nightingale3, Peter.
Chapter 2: System Structures
Parallel and Distributed Simulation Techniques
Advanced Operating Systems
Transactional Memory Semaphores, monitors, and conditional critical regions all suffer from limitations based on lock semantics Naïve synchronization may.
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen
Chapter 2: Operating-System Structures
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen
Prof. Leonardo Mostarda University of Camerino
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Chapter 2: Operating-System Structures
Presentation transcript:

Operating System Support for Application-Specific Speculation Benjamin Wester Peter Chen and Jason Flinn University of Michigan

Speculative Execution  Sequential dependent tasks  Predict results of Task A to break dependence  Execute Task B in parallel  Isolate all effects  Correct prediction: commit  Wrong prediction: abort A B B TIME 2EuroSys 2011 Predict A

Speculation Everywhere!  Discrete event simulation  I/O prefetching  Distributed shared memory  Distributed file systems  Deadlock detection  Remote displays  Web page pre-rendering EuroSys 20113

Speculation as a Service to Apps How is this system designed? In what ways can it be customized for an app? How can those customizations be specified? 4EuroSys 2011

Outline  Introduction  Designing Speculation as a Service  Implementation  Evaluation  Conclusion EuroSys 20115

Design 1: In-App Speculation +Complete semantic info +Predict arbitrary app operations +Safe operations allowed ‒No reuse: significant development needed ‒Scope is limited: unsafe operations block EuroSys App 1 Data App 2 Data

OS Design 2: Generic OS Speculation +Apps need no modifications +Wide scope: unsafe operations taint ‒Lacks semantic understanding of app ‒Predict system calls only ‒Handle application conservatively EuroSys App 2 App 1

Separate Mechanism and Policy Mechanism implements isolation Policy describes customizations Best of both extremes  Mechanism built in OS o Common implementation o Wide scope  Policy specified in Applications o Expose semantic information EuroSys 20118

OS Design 3: Expose Predictions +Predict arbitrary app operations +Reuse OS mechanism (with app assistance) +Wide scope for taint propagation ‒Limited semantic info ‒Speculative external output never allowed ‒Commit on identical results EuroSys App 2 App 1

OS Design 4: Expose Safety +Predict arbitrary app operations +Reuse OS mechanism (with app assistance) +Wide scope for taint propagation +More semantic info +Allow safe output +Commit on equivalent results EuroSys App 2 App 1

Customizable Policy  Creation o What tasks are predictable o How to predict them  Output o What output is safe to allow  Commit o Which results are acceptable to commit EuroSys

Outline  Introduction  Designing Speculation as an OS Service  Implementation  Evaluation  Conclusion EuroSys

Implementation  Mechanism built in OS o Based on Speculator kernel o Checkpoints & logs processes, files, IPC, etc.  Policies expressed using system call API EuroSys

Speculative Process Control Process spec_fork() EuroSys TIME spec_fork predict A B commit A abort B C

API Example int main() { int x; int prediction = get_prediction(); if (spec_fork() == SPECULATIVE) { x = prediction; } else { x = slow_function(); if (equiv(x, prediction)) commit(); else abort(); } set_output_policy(stdout, ALLOW); printf(“%d”, x); } EuroSys Output Policy Creation Policy Commit Policy

Outline  Introduction  Designing Speculation as an OS Service  Implementation  Evaluation  Conclusion EuroSys

Evaluation Can apps effectively use API to increase parallelism? Case studies 1.Predictive application launching in Bash 2.SSL certificate checks in Firefox 3.Replicated service in PBFT-CS EuroSys

Check command App 1: Predictive Launching in Bash EuroSys TIME Run program …finished bwester $ ▌ …finished bwester $ ▌ …finished bwester $ grep foo –r. ▌ …finished bwester $ grep foo –r. ▌ grep foo –r. Creation Policy: Use machine learning to predict user input Creation Policy: Use machine learning to predict user input Commit Policy: Normalize user input before comparison Commit Policy: Normalize user input before comparison Output Policy: Safe X11 Messages: Allow Output Policy: Safe X11 Messages: Allow

How Much Work Can Be Hidden? EuroSys TIME Non-Speculative 45 Speculative Prompt Get cmd Spec. Execute cmd Execute Prompt Execute cmd Get cmd

How Much Work Can Be Hidden? EuroSys TIME SpeculativeNon-Speculative 45 Up to 86% hidden Prompt Get cmd Spec. Execute cmd Execute Prompt Execute cmd Get cmd

Done Request page App 2: Firefox SSL Connections EuroSys TIME Web Server Validation Server Open Check cert. ValidateGet session key GET /index.html?id=0123 Creation Policy: Predict certificate is valid Creation Policy: Predict certificate is valid Output Policy: Alow SSL connection Output Policy: Alow SSL connection Output Policy: Block private data Output Policy: Block private data

Connection Latency Hidden? EuroSys TIME Non-SpeculativeSpeculative Check cert. Session key Done Request Check cert. Session key Done RequestValidate

Connection Latency Hidden? EuroSys TIME Non-SpeculativeSpeculative Avg 60ms hidden Check cert. Session key Done Request Check cert. Session key Done RequestValidate

App 3: PBFT-CS Protocol EuroSys TIME Send Request Distributed Replicated Service (Reply, sig1) Check reply Request (Reply, sig2) Work… Creation Policy: Agree on 1 st reply Creation Policy: Agree on 1 st reply Output Policy: PBFT-CS Messages: Allow Output Policy: PBFT-CS Messages: Allow

Improved Client Throughput? EuroSys TIME Non-SpeculativeSpeculative Request1 1 st Reply Verify Request2 1 st Reply Request1 1 st Reply Verify Request2 1 st Reply Null requests

Improved Client Throughput? EuroSys TIME Non-SpeculativeSpeculative 1.9x Throughput Request1 1 st Reply Verify Request2 1 st Reply Request1 1 st Reply Verify Request2 1 st Reply Null requests

Cost of Generic Mechanism EuroSys App-specific Mech Shared OS Mech Non-speculative Null requests

Cost of Generic Mechanism EuroSys App-specific: 8% faster App-specific Mech Shared OS Mech Non-speculative Null requests

Conclusion  Mechanism o Common: checkpoints, output buffering, taint propagation o Implemented in OS  Policy o App-specific: Controls creation, output, and commit o Implemented in applications  Demonstrated with 3 case studies o Improved parallelism o Small overhead relative to app-specific mechanism Questions? EuroSys