190 likes | 317 Views
Efficient Algorithms for Distributed Snapshots and Global Virtual Time Approximation. Author: Friedermann Mattern Presented By: Shruthi Koundinya. Overview. Introduction Models and Definitions Consistent Cut Algorithm Distributed Monotonic Computation Scheme Distributed Simulation
E N D
Efficient Algorithms for Distributed Snapshots and Global Virtual Time Approximation Author: Friedermann Mattern Presented By: Shruthi Koundinya
Overview • Introduction • Models and Definitions • Consistent Cut Algorithm • Distributed Monotonic Computation Scheme • Distributed Simulation • Global Virtual Time • Summary
Introduction • Efficient snapshot algorithms to get global state of the system under non FIFO conditions and without acknowledgments • Assumptions: • Processes and channels form a strongly connected finite graph • Messages are assumed to be delivered correctly with arbitrary delay, but not necessarily in the same order. • 3 types or events – Send , Receive and internal • Applications • Detecting stable properties like termination detection, detection of deadlocks. • Used to compute monotonic functions of the global state such as lower bounds of simulation time (Global Virtual Time)
Models and Definitions • Causally Consistent Global state • State of the channels – Messages still in transit • Local states of processes • Monotonic Functions of the Global State • F is monotonic function from a partial ordered set: f(s(c))<f(s(c’)) where s( c) is a particular global state. • Infimum • Greatest lower bound, the infimum of a subset of some set is the greatest element that is smaller than all other elements of the subset
Consistent Cut Algorithm • Algorithm • There are 2 colors for each process Red and White. Initially all processes are white • A process becomes red when the local snapshot is taken. • Messages carry the process color along with the basic message • Every process takes a local snapshot when feasible before a red message is received. • A single process initiates the snapshot algorithm, sends virtual broadcast messages to the rest of the processes. *Messages are non-FIFO One can receive red messages before receiving a red control message to initiate a local timestamp
Consistent Cut Algorithm 3 Initiator - 1 4 2 1
Consistent Cut Algorithm 3 Initiator - 1 4 2 1 Control Messages & a Red message sent
Consistent Cut Algorithm 3 Initiator - 1 4 2 Red Message Received at 2 1
Consistent Cut Algorithm 3 Initiator - 1 3 sends white Mesg to 1 Ctrl Mesg from 1 reaches 3 4 2 1
Consistent Cut Algorithm 3 Initiator - 1 4 2 Red Ctrl Mesg received 1 White Mesg received at 1
Catching Messages in Transit • Counting Method • Each process has a counter storing (white) sent messages during local snapshot these are sent to the initiator • Initiator has total white message count and waits until they are all received.
Catching Messages In Transit • Vector Counter Principle • Every process Pi counts the number of white messages it has sent to Pj on jth component of a Vector • A control message, with control vector circulates the ring. • Round 1-Send control message across the ring and increment the control vector C:= C+V[i] • Reset V[i] to zero • C[i] = number of white message • Round 2- Process C[i]> 0 for all i revisited and control message waits at each process until count goes to 0.
Distributed Monotonic Computing Scheme • Internal events – xi only increases • Send event xi >= current value of xi • Receive event • xi >= to value of xi before the receive event • xi >= to X-stamp of the received message. • A global infimum function tells one how far the computation has progressed.
How to handle inconsitent message- Closure C* • DMC allows messages FUTURE PAST • FUTURE PAST doesn’t affect global infimum of the system • Global consistent cut reached through closure for cut C • C* = C U {e’ Є E| e Є C: e’ e} • F(C) is the lower bound : f(c )<=f(c*)<=f(c’)
Distributed Simulation A distributed discrete simulation system has a set of sequential event driven simulators implemented by autonomous processes which interact by messages • Chronology is essential in Simulations • Optimistic Scheme: Simulator may directly execute the earliest event. If the event message with an earlier timestamp arrives, the simulator rolls back. • How long to keep the memory around for rollback?
GVT Approximation • GVT is also called distributed infimum approximation • GVT is calculated along the cut C’ • Messages sent between C and C’ are used to determine the GVT • Consistent cut algorithm and Vector Counter Implementation are used to device the algorithm.
GVT Approximation • Rules: Each process has a local clock & a vector counter Send Message Receive Message Control Message reaches Pinit Control Message reaches Pi
Summary 2. Get Transit message 1. Consistent Cut 3. Monotonic Functions 4. GVT