Ba Ra 02 IEEE Distributed Systems Online Fundamentals
![[Ba. Ra 02] IEEE Distributed Systems Online Fundamentals of Distributed Computing: A Practical Tour [Ba. Ra 02] IEEE Distributed Systems Online Fundamentals of Distributed Computing: A Practical Tour](https://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-1.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online Fundamentals of Distributed Computing: A Practical Tour of Vector Clock Baldoni, R. and Michel Raynal Systems 15 -Jul-09 Ok-kyoon Ha GNU OS Lab.
![[Ba. Ra 02] IEEE Distributed Systems Online Contents Introduction A Model of Distributed Execution [Ba. Ra 02] IEEE Distributed Systems Online Contents Introduction A Model of Distributed Execution](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-2.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online Contents Introduction A Model of Distributed Execution Vector Clocks: A causality tracking mechanism Three Issues of Vector Clock Systems Managing the Clocks An Efficient Implementation of Vector Clock 2
![[Ba. Ra 02] IEEE Distributed Systems Online Introduction Distributed Computation consists of a set [Ba. Ra 02] IEEE Distributed Systems Online Introduction Distributed Computation consists of a set](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-3.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online Introduction Distributed Computation consists of a set of processes that cooperate to achieve a common goal Causality a key concept of asynchronous distributed systems knowing whether two events are causally related could the occurrence of one event be consequence of the other Vector Clock an array of n integers (one entry per process) the timestamp of an event is the current value of the corresponding process’s vector clock 3
![[Ba. Ra 02] IEEE Distributed Systems Online A Model of Distributed Execution a distributed [Ba. Ra 02] IEEE Distributed Systems Online A Model of Distributed Execution a distributed](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-4.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online A Model of Distributed Execution a distributed program is made up of n sequential local programs happened-before relation a d b concurrent (causally independent) • events a, b, c have c ▲ An example of a distributed computation 4 • an event d corresponds
![[Ba. Ra 02] IEEE Distributed Systems Online Vector Clocks: A causality tracking mechanism a [Ba. Ra 02] IEEE Distributed Systems Online Vector Clocks: A causality tracking mechanism a](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-5.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online Vector Clocks: A causality tracking mechanism a mechanism which indicates causality relation by comparing timestamps of two events Pi produces an event – increments VCi[i] (VCi[i] : = VCi[i] + 1) Pi sends a message m – attaches VCi (denote: m. VC) Pi receives a message m – updates VCi ( ) Strong Clock Condition 5
![[Ba. Ra 02] IEEE Distributed Systems Online Three Issues of Vector Clock Systems Causal [Ba. Ra 02] IEEE Distributed Systems Online Three Issues of Vector Clock Systems Causal](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-6.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online Three Issues of Vector Clock Systems Causal Broadcast to reduce the asynchrony of communication channels (checks message’s concurrency) How can piggyback all information whose broadcasts causally precede the broadcast of delivered message? Detecting Message Stability abstracts notions of reliable broadcasting and eventual consistency How can deliver safely message with the minimum buffering? Detecting an Event Pattern delivers correct vectors for causally related events How can manage and carry a vector of vector clocks? 6
![[Ba. Ra 02] IEEE Distributed Systems Online Causal Broadcast Idea a receiving Process Pi [Ba. Ra 02] IEEE Distributed Systems Online Causal Broadcast Idea a receiving Process Pi](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-7.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online Causal Broadcast Idea a receiving Process Pi must delay delivering m until all the messages broadcast in the causal past of m P 2 delayed delivery of m’ arrived at P 2 before m m causally precedes m’ ▲ Causal delivery of broadcast message 7
![[Ba. Ra 02] IEEE Distributed Systems Online Detecting Message Stability Idea a process buffers [Ba. Ra 02] IEEE Distributed Systems Online Detecting Message Stability Idea a process buffers](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-8.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online Detecting Message Stability Idea a process buffers m immediately after receives m discards m as soon as m becomes stable Use a vector of vector clocks denote: MCi [k][l](i ≠ k, l) MCi [i][i]: represents the sequence number of the next message Pi sent min 1≤x≤ 3(MC 3[x][m. sender]) = 0 8
![[Ba. Ra 02] IEEE Distributed Systems Online Detecting an Event Pattern must keep only [Ba. Ra 02] IEEE Distributed Systems Online Detecting an Event Pattern must keep only](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-9.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online Detecting an Event Pattern must keep only a vector of vector clocks that it causally related events s→u∧u→t vector clocks do not solve tracking predicate (3, 4, 2) (0, 3, 0) (0, 4, 0) (0, 0, 2) 9
![[Ba. Ra 02] IEEE Distributed Systems Online How to Solve Tracking Predicate use a [Ba. Ra 02] IEEE Distributed Systems Online How to Solve Tracking Predicate use a](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-10.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online How to Solve Tracking Predicate use a vector timestamp e. VC use an array of vector timestamps e. MC [1…n] P(s, t 1) = False t 1. MC[1]=a. VC, t 1. MC[2]=b. VC, t 1. MC[3]=s. VC t 1. VC = (2, 1, 1) P(s, t 2) = True t 2. MC[1]=t 1. VC, t 2. MC[2]=u. VC, t 2. MC[3]=s. VC t 2. VC = (3, 2, 1) 10
![[Ba. Ra 02] IEEE Distributed Systems Online Managing the Clocks Pi has a vector [Ba. Ra 02] IEEE Distributed Systems Online Managing the Clocks Pi has a vector](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-11.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online Managing the Clocks Pi has a vector clock VCi [1…n] and a vector of vector clocks MCi [1…n] a rec t 1 rec P 1 1 0 0 - - - b P 2 - - 0 1 - - - 1 0 0 0 1 0 s P 3 - - - 0 0 1 - - - 0 0 1 2 0 0 - - - 0 1 0 0 2 0 - - - 0 0 1 - - - 2 0 0 11 rec u t 2 3 0 0 1 0 2 1 1 0 0 1 d
![[Ba. Ra 02] IEEE Distributed Systems Online An Efficient Implementation of Vector Clock vector [Ba. Ra 02] IEEE Distributed Systems Online An Efficient Implementation of Vector Clock vector](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-12.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online An Efficient Implementation of Vector Clock vector clock systems have a drawback each message must carry an array of n integers n: the total number of processes M. Singhal and A. Kshemkalyani’s technique based on the empirical observation that only a few of the vector clock’s entries are expected to change uses to piggyback only the information relative to the entries piggybacks a set of tuples (proc_id, VC[proc_id]) can save communication bandwidth at the cost of local memory overhead 12
![[Ba. Ra 02] IEEE Distributed Systems Online the progress of vector clocks using SK [Ba. Ra 02] IEEE Distributed Systems Online the progress of vector clocks using SK](http://slidetodoc.com/presentation_image_h2/f672b82576491399951735baa0537541/image-13.jpg)
[Ba. Ra 02] IEEE Distributed Systems Online the progress of vector clocks using SK technique piggybacks only changed vector timestamps {(1, 2)(3, 1)} {(2, 1)} 13 {(1, 3)} {(1, 2)(2, 3)}
- Slides: 13