Download presentation
Presentation is loading. Please wait.
Published byEvelyn Poole Modified over 9 years ago
1
Time Warp OS1 Time Warp Operating System Presenter: Munehiro Fukuda
2
Time Warp OS2 Outline Why Time Warp Optimistic Synchronization Local Control Mechanism Rollback and Anti Messages Example Code Applications Performance
3
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
4
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
5
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.
6
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 120 130 LVT140 125 155 Rollback 185LVT Message
7
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.
8
Time Warp OS8 Rollback Mechanism and Anti- Messages 412 110105120125130146175176 112119121141156162181182 ECBEBDBB AAAAAAAA ++++++++ 119121141 156 162 141122142196180157163 AAAAAAA ABBCCDC ––––––– 8290106119141 3127 -2128 0 162 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 135 132 Delayed message Anti message – A E 141 125 Cancelled
9
Time Warp OS9 Rollback and Anti-Messages Example 1 p2 p1 p3 142 162142 141 141 120 122120 121 152 Arrived late 135 Rollback Anti-message
10
Time Warp OS10 p2 p1 p3162142 141141 120 122120 121 135136 166 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
11
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 }
12
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.
13
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
14
Time Warp OS14 Contributions The first implementation of optimistic synchronization Application suggestions Performance analysis
15
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.
16
Time Warp OS16 Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.