Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design of Nonmasking Tree Algorithm Goal: design a tree construction protocol systematically by constructing its invariant and fault-span.

Similar presentations


Presentation on theme: "Design of Nonmasking Tree Algorithm Goal: design a tree construction protocol systematically by constructing its invariant and fault-span."— Presentation transcript:

1 Design of Nonmasking Tree Algorithm Goal: design a tree construction protocol systematically by constructing its invariant and fault-span

2 Ideal State Each process j maintains a variable P.j. P.j denotes the parent of j in the tree. Each process also has a unique ID In an ideal state the graph imposed by the parent relation forms a tree

3 Faults Can fail or repair a process –Goal: Reconstruct the tree with the available processes

4 Due to faults, we may have Unrooted trees –Because some node’s parent has failed Multiple (rooted) trees –For example, when a node is repaired, it may form a tree by itself Observe that there are no cycles. In other words, in the presence of faults, a cycle is not created. –We may want to preserve this during reconstruction. –I.e., this constraint should be in the fault-span

5 Predicates for Fault-Span (1) The graph imposed by the parent relation is a forest

6 Approach for Reconstruction Dealing with unrooted trees –Somehow the nodes in unrooted trees should be informed so that they know that they are in an unrooted tree –Approach: Introduce a variable color (col) Green = node thinks it is in rooted tree Red = node thinks it is in unrooted tree

7 Action (1) col.j = green  (P.j  N.j  col.(P.j) = red)  col.j = red

8 Predicate in Invariant What is it that we would like to have true if this action is executed (P.j  N.j  col.(P.j) = red)  col.j = red

9 Predicate in Fault-Span (2) The graph imposed by the parent relation is a forest  col.j = red  (P.j  N.j  col.(P.j) = red)

10 Note Observe that Action (1) is aimed at correcting a predicate in the invariant –Must ensure that during correction, the fault- span constraints are not violated

11 Predicate in Invariant (P.j  N.j  col.(P.j) = red)  col.j = red col.j = green

12 Action (2) When should a node set its color to green –Need to ensure that constraints of fault-span are not violated –Need to ensure that constraints of previous predicates in invariant are not violated

13 Action (2) col.j = red  (????)  col.j = green Choose ???? so that this action does not affect fault-span predicate/previous predicates in invariant

14 Merging Multiple Trees Introduce variable root –root.j denotes the ID of the process that j believes to be the root –If a process finds another process with higher root value, it can choose to switch to it.

15 Action (2) modified col.j = red  (j has no children)  col.j = green, P.j = j, root.j = j

16 Predicate in Invariant (3) (P.j  N.j  col.(P.j) = red)  col.j = red col.j = green root.j = root.k

17 Action (3) root.j < root.k  (????)  root.j = root.k, P.j = k

18 Predicate in Fault-Span The graph imposed by the parent relation is a forest  col.j = red  (P.j  N.j  col.(P.j) = red) col.(P.j) = green  root.j  root.(P.j)

19 Recovery Action for Process Recovery of node j  col.j = red, P.j = j, root.j = j


Download ppt "Design of Nonmasking Tree Algorithm Goal: design a tree construction protocol systematically by constructing its invariant and fault-span."

Similar presentations


Ads by Google