New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Logical Clocks (Distributed computing)
1. Logical Clocks Paul Krzyzanowski [email_address] [email_address] Distributed Systems Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
12. Problem: Identical timestamps a b, b c, …: local events sequenced i c, f d , d g, … : Lamport imposes a send receive relationship Concurrent events (e.g., a & i) may have the same timestamp … or not a b h i k j P 1 P 2 P 3 1 2 1 7 7 1 d f g 3 c 6 4 6 e 5
13.
14. Unique (totally ordered) timestamps a b i k j P 1 P 2 P 3 1.1 2.1 1.2 7.2 7.3 1.3 d f g 3.1 c 6.2 4.1 6.1 h e 5.1
19. Vector timestamps a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) (1,0,0) Event timestamp a (1,0,0)
20. Vector timestamps a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) (1,0,0) Event timestamp a (1,0,0) b (2,0,0) (2,0,0)
21. Vector timestamps a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) (1,0,0) Event timestamp a (1,0,0) b (2,0,0) c (2,1,0) (2,0,0) (2,1,0)
22. Vector timestamps a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) (1,0,0) Event timestamp a (1,0,0) b (2,0,0) c (2,1,0) d (2,2,0) (2,0,0) (2,1,0) (2,2,0)
23. Vector timestamps a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) (1,0,0) Event timestamp a (1,0,0) b (2,0,0) c (2,1,0) d (2,2,0) e (0,0,1) (2,0,0) (2,1,0) (2,2,0) (0,0,1)
24. Vector timestamps a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) (1,0,0) Event timestamp a (1,0,0) b (2,0,0) c (2,1,0) d (2,2,0) e (0,0,1) f (2,2,2) (2,0,0) (2,1,0) (2,2,0) (0,0,1) (2,2,2)
25. Vector timestamps (0,0,1) (1,0,0) a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) Event timestamp a (1,0,0) b (2,0,0) c (2,1,0) d (2,2,0) e (0,0,1) f (2,2,2) (2,0,0) (2,1,0) (2,2,0) (2,2,2) concurrent events
26. Vector timestamps a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) (1,0,0) Event timestamp a (1,0,0) b (2,0,0) c (2,1,0) d (2,2,0) e (0,0,1) f (2,2,2) (2,0,0) (2,1,0) (2,2,0) (0,0,1) (2,2,2) concurrent events
27. Vector timestamps a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) (1,0,0) Event timestamp a (1,0,0) b (2,0,0) c (2,1,0) d (2,2,0) e (0,0,1) f (2,2,2) (2,0,0) (2,1,0) (2,2,0) (0,0,1) (2,2,2) concurrent events
28. Vector timestamps a b c d f e (0,0,0) P 1 P 2 P 3 (0,0,0) (0,0,0) (1,0,0) Event timestamp a (1,0,0) b (2,0,0) c (2,1,0) d (2,2,0) e (0,0,1) f (2,2,2) (2,0,0) (2,1,0) (2,2,0) (0,0,1) (2,2,2) concurrent events