1 / 130

Causality

Causality. The “happens before” relation. happens before (causes). A message is sent from to. transitivity. and. “happens before” is a partial order. Parallel events:. “happens before” is a partial order. Parallel events:. We can move parallel events.

ira
Download Presentation

Causality

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Causality

  2. The “happens before” relation happens before (causes)

  3. A message is sent from to

  4. transitivity and

  5. “happens before” is a partial order Parallel events:

  6. “happens before” is a partial order Parallel events:

  7. We can move parallel events The happens before relation doesn’t change

  8. We want to find a mechanism that captures the “happens before” relationship so that we use causality in various computation problems

  9. Logical Clocks 0 1 2 3 4 5 0 2 3 4 1 In each process, the logical clock increases by 1 with each local event

  10. Logical clocks are piggy-packed on messages 0 1 2 5 4 0 1 2 3 4

  11. 1 2 3 7 8 2 4 5 6 1 2 3 4 5 6 7 Logical clocks, seem that they capture the happens before relation

  12. 1 2 3 7 8 2 4 5 6 1 2 3 4 5 6 7 Example:

  13. 1 2 3 7 8 2 4 5 6 1 2 3 4 5 6 7 However, logical clocks cannot capture parallelism Parallel events

  14. We need another mechanism that can capture the parallelism of events

  15. Vector Clocks Process entry Process entry

  16. Each process increases its entry at each event increment

  17. Each process increases its entry at each event increment

  18. vector clocks are piggy-packed on messages The maximum of each entry

  19. vector clocks are piggy-packed on messages

  20. vector clocks are piggy-packed on messages

  21. Comparison of vector clocks We write if for all

  22. Examples:

  23. Incomparable vector clocks We write If neither nor

  24. Examples:

  25. Vector clocks capture causality If then If then

  26. By examining the vector clocks we can determine the order of events If then If then

  27. Cuts

  28. 2 1 3 4 5 1 2 3 4 1 2 3 4 5 6 7

  29. 2 1 3 4 5 1 2 3 4 1 2 3 4 5 6 7 Cut: consists from an event from each process

  30. 2 1 3 4 5 1 2 3 4 1 2 3 4 5 6 7 no messages cross the cut Consistent cut:

  31. 2 1 3 4 5 1 2 3 4 1 2 3 4 5 6 7 messages can cross from left to right of the cut Consistent cut:

  32. 2 1 3 4 5 1 2 3 4 1 2 3 4 5 6 7 messages cross from right to left of the cut Inconsistent cut:

  33. 2 1 3 4 5 1 2 3 4 1 2 3 4 5 6 7 messages cross from right to left of the cut Inconsistent cut:

  34. Maximal Consistent Cut Consider some (inconsistent) cut Maximal Consistent Cut of : A consistent cut such that and contains most recent events

  35. 2 1 3 4 5 1 2 3 4 1 2 3 4 5 6 7 (inconsistent cut)

  36. 2 1 3 4 5 1 2 3 4 1 2 3 4 5 6 7 maximal consistent cut (inconsistent cut)

  37. Theorem: For every cut , there is a unique maximal consistent cut Proof: Proof by contradiction

  38. Assume for contradiction there are two (or more) maximal cuts of maximal consistent cuts

  39. It cannot be that and don’t cross not maximal!

  40. and cross

  41. and cross new cut

  42. and cross impossible since is consistent

  43. and cross impossible since is consistent

  44. and cross Contradiction! not maximal! not maximal! is consistent End of proof

More Related