Timewarp Elias Muche
What It Is An implementation of virtual time Imaginary Time Imaginary Ticking One dimensional Used to organize and synchronize distributed systems Analogous to virtual memory in operating systems
Major Applications Used to organize and synchronize distributed systems Distributed discrete event simulation Imposes a temporal coordinate system on distributed systems Concurrency control mechanism for databases
Distributed Discrete Event Simulation Every process represents a simulation object Virtual time identified by simulation time Processes schedule events by passing messages
Database Concurrency Virtual time derived by real time Data(tables, records) treated as processes that respond to read/write messages Each transaction must be completed in a band virtual time Must not overlap with other transactions’ bands High order bits of transaction’s virtual time used to calculate real time initiation Middle order bits used to break ties
Virtual Time Systems Each primitive action has virtual time and virtual space Messages use stamps Sender name Virtual send time Receiver name Virtual receive time Virtual send time must be smaller than the virtual receive time Virtual Receive time of each event must be smaller than the virtual time of next event for the same process
Timewarp Mechanism Some processes allowed to use virtual clocks Others allowed to fall behind Messages can be received out of order This means a process shouldn’t wait for the “next” message Uses timestamps, virtual receive time for ordering
Timewarp Mechanism Continued Local Control Mechansim Each process has its own virtual clock variable The clock changes value in between events Process “terminates” when input queue is empty
Timewarp Mechanism Continued Global control mechanism Manages space, flow control, I/O Global virtual time All virtual times at time r All virtual send times of sent messages(non-processed)
Implementations: Rollback Handles fault tolerance Look ahead rollback Each process executes normally If process causes synchronization conflict, rolls back to pre-conflict point in time Process then executes along revised path
Performance
Performance Cont.
Summary Timewarp used to synchronize distributed systems Uses virtual time and space coordinates Lookahead rollback is a common implementation Timewarp consists of local and global mechanisms Performance: Number of rollbacks increase as number of processors increase Execution time decreases as number of processors increase
Questions?