Speculation Supriya Vadlamani CS 6410 Advanced Systems.

Slides:



Advertisements
Similar presentations
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed System Architectures.
Advertisements

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.
1 Cheriton School of Computer Science 2 Department of Computer Science RemusDB: Transparent High Availability for Database Systems Umar Farooq Minhas 1,
CS-550: Distributed File Systems [SiS]1 Resource Management in Distributed Systems: Distributed File Systems.
Bandwidth and latency optimizations Jinyang Li w/ speculator slides from Ed Nightingale.
Distributed Processing, Client/Server, and Clusters
Speculations: Speculative Execution in a Distributed File System 1 and Rethink the Sync 2 Edmund Nightingale 12, Kaushik Veeraraghavan 2, Peter Chen 12,
Distributed Systems 2006 Styles of Client/Server Computing.
Remus: High Availability via Asynchronous Virtual Machine Replication.
Linux Operating System
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
DESIGN AND IMPLEMENTATION OF THE SUN NETWORK FILESYSTEM R. Sandberg, D. Goldberg S. Kleinman, D. Walsh, R. Lyon Sun Microsystems.
Network File System (NFS) Brad Karp UCL Computer Science CS GZ03 / M030 6 th, 7 th October, 2008.
Take An Internal Look at Hadoop Hairong Kuang Grid Team, Yahoo! Inc
I/O Systems ◦ Operating Systems ◦ CS550. Note:  Based on Operating Systems Concepts by Silberschatz, Galvin, and Gagne  Strongly recommended to read.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
Operating System Support for Application-Specific Speculation Benjamin Wester Peter Chen and Jason Flinn University of Michigan.
Accelerating Mobile Applications through Flip-Flop Replication
1 AutoBash: Improving Configuration Management with Operating System Causality Analysis Ya-Yunn Su, Mona Attariyan, and Jason Flinn University of Michigan.
Networked File System CS Introduction to Operating Systems.
Thanks to Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction n What is an Operating System? n Mainframe Systems.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 1 Introduction Read:
Distributed File Systems
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.
Parallelizing Security Checks on Commodity Hardware E.B. Nightingale, D. Peek, P.M. Chen and J. Flinn U Michigan.
CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.
Distributed File Systems Overview  A file system is an abstract data type – an abstraction of a storage device.  A distributed file system is available.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
EECS 262a Advanced Topics in Computer Systems Lecture 7 Transactional Flash & Rethink the Sync September 25 th, 2012 John Kubiatowicz and Anthony D. Joseph.
Parallelizing Security Checks on Commodity Hardware Ed Nightingale Dan Peek, Peter Chen Jason Flinn Microsoft Research University of Michigan.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
Introduction to DFS. Distributed File Systems A file system whose clients, servers and storage devices are dispersed among the machines of a distributed.
SPECULATIVE EXECUTION IN A DISTRIBUTED FILE SYSTEM E. B. Nightingale P. M. Chen J. Flint University of Michigan.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
A Low-bandwidth Network File System Athicha Muthitacharoen et al. Presented by Matt Miller September 12, 2002.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Speculative Execution in a Distributed File System Ed Nightingale Peter Chen Jason Flinn University of Michigan.
ENERGY-EFFICIENCY AND STORAGE FLEXIBILITY IN THE BLUE FILE SYSTEM E. B. Nightingale and J. Flinn University of Michigan.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Storage Systems CSE 598d, Spring 2007 Rethink the Sync April 3, 2007 Mark Johnson.
The Mach System Silberschatz et al Presented By Anjana Venkat.
Speculative Execution in a Distributed File System Ed Nightingale Peter Chen Jason Flinn University of Michigan Best Paper at SOSP 2005 Modified for CS739.
Transactional Flash V. Prabhakaran, T. L. Rodeheffer, L. Zhou (MSR, Silicon Valley), OSDI 2008 Shimin Chen Big Data Reading Group.
Chapter Five Distributed file systems. 2 Contents Distributed file system design Distributed file system implementation Trends in distributed file systems.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Hathi: Durable Transactions for Memory using Flash
Chapter 1: Introduction
Chapter 2: System Structures
Improving File System Synchrony
Chapter 1: Introduction
Chapter 1: Introduction
Introduction to Operating Systems
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen
Chapter 1: Introduction
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
Chapter 2: Operating-System Structures
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 2: Operating-System Structures
Operating System Overview
Chapter 1: Introduction
Presentation transcript:

Speculation Supriya Vadlamani CS 6410 Advanced Systems

Introduction : Authors Edmund B Nightingale – Microsoft Research(currently) – Speculator -thesis Jason Flinn – University of Michigan Peter M Chen – University of Michigan

SPECULATIVE EXECUTION IN DISTRIBUTED FILE SYSTEM Edmund B. Nightingale, Peter M. Chen and Jason Flinn

Distributed File System : basics allows access to files located on another remote host as though working on the actual host computer Does it perform worse than local file system? – YES, Synchronous I/O – Cache Coherence : Sync n/w messages provide consistency – Data Safety Sync disk writes provide safety

Proposal Solutions : 1.Sacrifice guarantees to gain speed 2.Speculation with OS support Speculation – DFS can be safe, consistent and fast Light weight checkpoints Speculative execution Tracking causal dependencies

Conditions for success Time for lightweight Check point < n/w round trip time – Around 52 microseconds Modern Computers can afford to execute speculatively – Spare resources: CPU cycles and memory File system clients can predict the outcome correctly. – Conflicts are rare – Very few concurrent updates

Speculation in NFS NFS without speculationNFS with speculation

Speculation Interface Undo log Process Spec Id Spec Spec Id 1) System call2) Create speculation Time 3) Fail speculation create_Speculation() commit_Speculation() fail_Speculation() 3) Commit speculation

Advantages of the Interface Application independent Speculation success/failure cab be declared by any process Abstraction over the hypothesis underlying each speculation

Undo log Implementing Speculation Process Checkpoint Spec 1) System call2) Create speculation Time

11 Speculation Success Undo log Checkpoint 1) System call2) Create speculation Process 3) Commit speculation Time Spec

Speculation Failure Undo log Checkpoint 1) System call 2) Create speculation Process 3) Fail speculation Process Time Spec

Implementing Speculation Data Structures – Speculation structure Set of kernel objects – Depend on speculation – Undo log Ordered list of speculative objects

Implementing Speculation Speculative process can – Call System calls that don’t modify state (Getpid()) Can modify calling process’ state : dup2 – Can perform file system operations If flag is set Correct Speculation Execution – Invisible to user or external device – Process shouldn’t view speculative state unless it is speculatively dependent

Implementing Speculation Ensuring Correctness Issues: – External state Displaying a message on to the console Sending a message over the network Solutions: – Propagate dependencies – Buffer – Block the process

Multi-process Speculation [Speculative processes and IPC] Processes often cooperate Example: “make” forks children to compile, link, etc. Would block if speculation limited to one task Allow kernel objects to have speculative state – Examples: inodes, signals, pipes, Unix sockets, etc. – Propagate dependencies among objects – Objects rolled back to prior states when specs fail

Multi-process Speculation [Speculative processes and IPC] Spec 1 Spec 2 pid 8001 Checkpoint inode 3456 Chown -1 Write -1 pid 8000 Checkpoint Chown -1 Write -1

Multi-process Speculation [Speculative processes and IPC] Speculator supports: DFS objects RAMFS Local file system objects - Ext3 Pipes & FIFOs Unix Sockets Signals Fork & Exit

Handling Mutating Operations bar depends on cat foo What does client 2 view in bar? Simple Solution: restricted nature of communication in a server-based DFS Client 1 1. cat foo > bar Client 2 2. cat bar

Handling Mutating Operations Server always knows the true state of the file system; – Client includes the hypothesis underlying that speculation. – Server: Evaluates the hypothesis underlying the speculation If hypothesis is valid. – Mutation is performed Else – fails the mutation

Handling Mutating Operations Eg: BlueFS client : check version RPC [version number of its cached copy foo] Server: checks this version number against current version fails the speculation if the two differ Server: If previously failed any of the listed speculations, it fails the mutation. Causal dependencies : – set of speculations associated with the undo log of prior processes – List returned by create speculation and included in any speculative RPC sent to the server.

Speculative group commit Parallelize writes to disk by grouping them write commit Client Server

SPEC NFS preserves existing NFS semantics, including close-to-open consistency. Issues the same RPCs, many of these RPCs are speculative NFS: Security is still an issue!

Blue FS Features: – Single copy semantics – Synchronous I/O Each file, directory, etc. has version number – Incremented on each mutating op (e.g. on write) – Checked prior to all operations. – Many ops speculate and check version async

Evaluation Two Dell Precision 370 desktops as the client and file server Each machine has a 3 GHz Pentium 4 processor, 2GB DRAM, and a 160GB disk. To insert delays, we route packets through a Dell Optiplex GX270 desktop running the NISTnet [4] network emulator. Ping time between client and server is 229 s.

Results : Apache Benchmark

Cost of Rollback

Group Commit & Sharing State

Discussion Speculation: not a new concept – Used for hardware – Is speculation in OS a good idea? Server handles the speculation – Server crashes ?

RETHINK THE SYNC Edmund B. Nightingale, Kaushik Veeraraghavan,Peter M. Chen and Jason Flinn

Synchronous I/O v/s Asynchronous I/O Very slow Applications a frequently blocked (decreases performance by 2 orders of magnitude) Fast, not safe Does not block an application Complicates applns tht require durability and reliability Despite, the Asynchronous I/O ‘s poor guarantees, users prefer asynchronous I/O because synchronous I/O is too slow!

External Synchrony – Provides the reliability & simplicity of synchronous system – Closely approaches the performance of asynchronous system Synchronous I/O: Application centric view External Synchrony: User centric view

Example: Synchronous I/O OS Kernel Disk Process 101 write(buf_1); 102 write(buf_2); 103 print(“work done”); 104 foo(); Application blocks %work done % TEXT %

Observing synchronous I/O 101 write(buf_1); 102 write(buf_2); 103 print(“work done”); 104 foo(); Sync I/O externalizes output based on causal ordering Enforces causal ordering by blocking an application Ext sync: Same causal ordering without blocking applications Depends on 1 st write Depends on 1 st & 2 nd write

Example: External synchrony OS Kernel Disk Process 101 write(buf_1); 102 write(buf_2); 103 print(“work done”); 104 foo(); TEXT %work done % %

Optimizations to External Synchrony Two modifications are grouped and committed as a single file system transaction Buffer screen output Causal dependencies need to be resolved to between file system modifications and external output

Limitations of External Synchrony Externally synchronous system can propagate failures using a speculator to checkpoint a process before modifications User may have temporal expectations about modifications committed to a disk Modifications to data in two different file system cannot be committed in a single transaction

Evaluation Implemented ext sync file system Xsyncfs Based on the ext3 file system Use journaling to preserve order of writes Use write barriers to flush volatile cache Compare Xsyncfs to 3 other file systems Default asynchronous ext3 Default synchronous ext3 Synchronous ext3 with write barriers

Postmark Benchmark

MYSQL Benchmark

SPEC web99 Throughput

Discussion Xsyncfs: – Performs several orders better than existing solns. – Why isn’t it widely used? Checkpoints: – How far can you go?

Conclusion Speculation in DFS – Spec NFS Security is still an issue Same authors examined security issues wrt speculation in later works – Blue FS Consistent and single copy semantics Rethink the sync : Xsyncfs a new model for local file I/O that provides the reliability and simplicity of synchronous I/O approximates the performance of asynchronous I/O But limitations of external synchrony exist

References Edmund B. Nightingale, Peter M. Chen, Jason Flinn, "Speculative Execution in a Distributed File System", Proceedings of the 2005 Symposium on Operating Systems Principles (SOSP), October 2005"Speculative Execution in a Distributed File System" Edmund B. Nightingale, Kaushik Veeraraghavan, Peter M. Chen, Jason Flinn, "Rethink the sync", Proceedings of the 2006 Symposium on Operating Systems Design and Implementation (OSDI), November 2006"Rethink the sync" Edmund B. Nightingale, Daniel Peek, Peter M. Chen, Jason Flinn, "Parallelizing security checks on commodity hardware", Proceedings of the 2008 International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), March 2008 "Parallelizing security checks on commodity hardware" Wikipedia