Time Warp OS1 Time Warp Operating System Presenter: Munehiro Fukuda.

Slides:



Advertisements
Similar presentations
CSS434 Time and Global States
Advertisements

Virtual Time Virtual Time and Global States of Distributed Systems Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
Parallel Discrete Event Simulation Richard Fujimoto Communications of the ACM, Oct
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Last Class: Clock Synchronization
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
Parallel and Distributed Simulation Global Virtual Time - Part 2.
Time Warp: Global Control Distributed Snapshots and Fossil Collection.
Parallel and Distributed Simulation Time Warp: Basic Algorithm.
Lookahead. Outline Null message algorithm: The Time Creep Problem Lookahead –What is it and why is it important? –Writing simulations to maximize lookahead.
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Optimistic Parallel Discrete Event Simulation Based on Multi-core Platform and its Performance Analysis Nianle Su, Hongtao Hou, Feng Yang, Qun Li and Weiping.
Other Optimistic Mechanism, Memory Management. Outline Dynamic Memory Allocation Error Handling Event Retraction Lazy Cancellation Lazy Re-Evaluation.
Parallel and Distributed Simulation Time Warp: Other Mechanisms.
Parallel and Distributed Simulation Time Warp: State Saving.
Computer Science Lecture 18, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
7. Fault Tolerance Through Dynamic (or Standby) Redundancy The lowest-cost fault-tolerance technique in multiprocessors. Steps performed: When a fault.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CS-550 (M.Soneru): Recovery [SaS] 1 Recovery. CS-550 (M.Soneru): Recovery [SaS] 2 Recovery Computer system recovery: –Restore the system to a normal operational.
CS533 - Concepts of Operating Systems
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
CIS 720 Distributed algorithms. “Paint on the forehead” problem Each of you can see other’s forehead but not your own. I announce “some of you have paint.
Yavor Todorov. Introduction How it works OS level checkpointing Application level checkpointing CPR for parallel programing CPR functionality References.
Introduction To Time Management Siddharth Misra Background  Distributed Simulation which is nothing but simulation on LAN became a popular tool for.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Process Concept Process – a program.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
EEC 688/788 Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Time Warp State Saving and Simultaneous Events. Outline State Saving Techniques –Copy State Saving –Infrequent State Saving –Incremental State Saving.
Parallel and Distributed Simulation Memory Management & Other Optimistic Protocols.
1 M. Tudruj, J. Borkowski, D. Kopanski Inter-Application Control Through Global States Monitoring On a Grid Polish-Japanese Institute of Information Technology,
Winter, 2004CSS490 Synchronization1 Textbook Ch6 Instructor: Munehiro Fukuda These slides were compiled from the textbook, the reference books, and the.
“Virtual Time and Global States of Distributed Systems”
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
High Level Architecture Time Management. Time management is a difficult subject There is no real time management in DIS (usually); things happen as packets.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Movement-Based Check-pointing and Logging for Recovery in Mobile Computing Systems Sapna E. George, Ing-Ray Chen, Ying Jin Dept. of Computer Science Virginia.
6.2 Logical Clocks Kranthi Koya09/23/2015. Overview Introduction Lamport’s Logical Clocks Vector Clocks Research Areas Conclusion.
Efficient Algorithms for Distributed Snapshots and Global Virtual Time Approximation Author: Friedermann Mattern Presented By: Shruthi Koundinya.
1 Creating Simulations with POSE Terry L. Wilmarth, Nilesh Choudhury, David Kunzman, Eric Bohm Parallel Programming Laboratory University of Illinois at.
Timewarp Rigid Body Simulation Brian Mirtich. Simulation Discontinuities “Events that change the dynamic states or the equations of motion of some subset.
Clock Synchronization (Time Management) Deadlock Avoidance Using Null Messages.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Concurrent Revisions: A deterministic concurrency model. Daan Leijen & Sebastian Burckhardt Microsoft Research (OOPSLA 2010, ESOP 2011)
1 Fault Tolerance and Recovery Mostly taken from
PDES Introduction The Time Warp Mechanism
Creating Simulations with POSE
Processes and threads.
Chapter 3: Process Concept
Prepared by Ertuğrul Kuzan
Parallel and Distributed Simulation
Operating Systems (CS 340 D)
Process Management Presented By Aditya Gupta Assistant Professor
Parallel and Distributed Simulation Techniques
EEC 688/788 Secure and Dependable Computing
PDES: Time Warp Mechanism Computing Global Virtual Time
Operating Systems (CS 340 D)
CPSC 531: System Modeling and Simulation
Lecture 2: Processes Part 1
Timewarp Elias Muche.
EEC 688/788 Secure and Dependable Computing
Parallel and Distributed Simulation
EEC 688/788 Secure and Dependable Computing
Chapter 3: Processes.
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
Parallel Exact Stochastic Simulation in Biochemical Systems
Presentation transcript:

Time Warp OS1 Time Warp Operating System Presenter: Munehiro Fukuda

Time Warp OS2 Outline Why Time Warp Optimistic Synchronization Local Control Mechanism Rollback and Anti Messages Example Code Applications Performance

Time Warp OS3 Why Time Warp Optimistic Synchronization – Asynchronous entities Examples: Military simulation Continuous Simulation Basis: mathematical equations Examples: Analog circuit simulation and toxicology models Discrete Event Simulation Basis: time-stepped status change of simulation entities Conservative Synchronization – synchronous entities Examples: Cellular automata and clocked logical circuits

Time Warp OS4 Examples of Synchronous and Asynchronous Simulation Entities Clocked Logical Circuit War Game 1cell/time unit 1cell/5 time units 1cell/20 time units Process 0 Process 3 Process 2 Process 1 J Q K Q J Q K Q J Q K Q J Q K Q A B C D Clock

Time Warp OS5 Optimistic Synchronization Virtual Time Global simulation time not necessarily synchronized to a wall clock Each computing node ticks its local virtual time (LVT) independently Rollback and Anti-Message A node must ticks back the LVT (and thus rollback computation) if a stagnant message has come in. If the node has previously sent out messages, it must send anti- messages to cancel them. GVT Commitment Each node must maintain a history of its computation which must be garbage-collected for memory saving. All nodes must periodically agree at the bottom line of their LVTs that becomes GVT.

Time Warp OS6 Local Control Mechanism LVT Advanced from one to another local event (including a message send). Visible only to a local processor Ticked back upon a delayed or anti message Computation Check-pointed upon every event Rolled back in accordance with LVT Sending anti-messages to cancel previously send messages Process A Process B LVT Rollback 185LVT Message

Time Warp OS7 Local Control Mechanism: A War Game Example Process 0 Process 1 Process 2 Process 3 e2 e1 e5 e6 e4 e3 e7 e11 e10 e9 e8 e12 e1 attack Discrete event simulation with optimistic synchronization e2 e3 e13 e14 Rollback Old event history kept so as to rollback computation.

Time Warp OS8 Rollback Mechanism and Anti- Messages ECBEBDBB AAAAAAAA AAAAAAA ABBCCDC ––––––– Sending time Receiving time Sender Sender Receiver Receiver Sign Sign Text Text LVT of State Saved State Current State LVT Send anti-messages To cancel them Discarded + A E Delayed message Anti message – A E Cancelled

Time Warp OS9 Rollback and Anti-Messages Example 1 p2 p1 p Arrived late 135 Rollback Anti-message

Time Warp OS10 p2 p1 p Rollback and Anti-Messages Example 1 So far, it went well. Then, how to garbage-collect old states? GVT = 141 Discard all states < 141 Use Samadi ’ s algoirthm

Time Warp OS11 Example Code begin { Logical process A } var seed : integer; { State variables } r : real; Initialization Section: begin seed := 123; r := 1.0; end; EventMessage Section: begin var i : integer; { Loop counter } n : integer; { # of event msgs arriving at same virtual time } current : VirtualTime; VirtualTime( current ); Mcount( n ); for I := 1 to n do begin ReadEventMessage( I, Type ); SendEventMessage( Current + ExpRandom( Seed, r ), ‘B’, type ); end Termination Section: begin print( ‘Program completed’ ); end; end. { of logical process A }

Time Warp OS12 Applications Distributed Discrete Event Simulation Distributed Database Concurrency Control If reading at timestamp 10 occurs before writing at timestamp 5, rollback the transactions. Virtual Circuit Communication They focused on TCP when writing this paper in 1985.

Time Warp OS13 Performance: Game of Life (Paul Irwin, a CSS graduate created this graph from the original paper.) Processors Time (s) Sequential Execution (1364 s) Optimal Configuration (166 s) Speedup of 8.22

Time Warp OS14 Contributions The first implementation of optimistic synchronization Application suggestions Performance analysis

Time Warp OS15 Drawbacks Many restrictions: No dynamic process creation or migration once simulation is running. No user level I/O during simulation execution. Processes must be deterministic. No heap storage (new() or malloc()). Performance problems: Little detail of GVT computation, (i.e., global state capturing). Domino effect and large check-pointing cost.

Time Warp OS16 Questions?