Approximation of δ -Timeliness
description
Transcript of Approximation of δ -Timeliness
Approximation of δ-TimelinessCarole Delporte-Gallet, LIAFA UMR 7089, Paris VII
Stéphane Devismes, VERIMAG UMR 5104, Grenoble I
Hugues Fauconnier, LIAFA UMR 7089, Paris VII
LIAFA
SSS'2010 2
Motivation
• Settings– Asynchronous message-passing distributed system
with process crashes• Problem– ∃t, ∃ P = p, …,q such that ∀t’>t every message sent
through P arrives to q in at most δ time units• Output– all correct processes eventually agree on such a path
22/09/2010
We want to solve this problem with a general algorithm
SSS'2010 3
Framework (1/3)• Eventual Property
– e.g., δ-timeliness of a path: ɸP(t) every message sent through ⇔P= p,…,q at time t arrives to q in at most δ time units
– PɸP ⇔∃t such that ∀t’>t, ɸP(t’) = true• PɸP is true ɸ⇔ P is eventually forever true
• PɸP is false ɸ⇔ P is infinitely often false
• Set of predicates SP
– e.g., {PɸP: P is an elementary path from p to q }– If ∃P ∈ SP : P is true in the run, then
• All correct processes eventually agree on P’ such that P’ is true in the run • e.g., problem of the previous slide
22/09/2010
SSS'2010 4
Framework (2/3)• Approximate a property is often too hard !
– e.g., δ-timeliness of a link (p,q): Proposition: In any algorithm that approximates the δ-timeliness of a (p,q), p
must eventually sends messages at every clock tick
• Approximate (P,Q)– P,Q are predicates– P ⇒ Q– e.g, (δ-timeliness of P, Δ-timeliness of P) with Δ≥ δ– Set of pairs of predicates (P0,Q0), (P1,Q1) …
• Extraction Algorithm – If ∃Pi : Pi is true in the run, then
• All correct processes eventually agree on Qj such that Qj is true in the run
22/09/2010
SSS'2010 5
Framework (3/3)
• Other problems:– Extraction of tree containing at least all correct
processes whose all paths from the root are Δ-timely
– Extraction of ring among all correct processes whose all links are Δ-timely
– …
22/09/2010
SSS'2010 6
Outline
• Model
• Approximation and Extraction
• Case-Study: δ-Timeliness– Approximation for δ-Timeliness of a link– Extraction of δ-Timeliness graphs
• Conclusion
22/09/2010
SSS'2010 7
System Settings
• Processes: – Synchronous (able to take a step at each clock tick → accurately measure the
time)– Some process crashes (correct / faulty)
• Communication: – Fully connected graph– Messages– Links:
• Reliable (no message loss)• FIFO
22/09/2010
SSS'2010 8
Reliable Broadcast (possible because links are reliable)
• Two primitives: Broadcast(m), Deliver(m)– Validity: If a correct process invokes Broadcast(m)
then it eventually executes Deliver(m)– Agreement: If a process executes Deliver(m), then
all other correct processes eventually execute Deliver(m)
– Integrity: For every message m, every process executes Deliver(m) at most once, and only if sender(m) previously invokes Broadcast(m)
22/09/2010
SSS'2010 9
Approximation Algorithm
• Let (P,Q) be a pair of predicates such that P⇒Q• An approximation algorithm A for process p of
predicates (P,Q) is an algorithm with a variable OutA
p such that:– If P is true, then OutA
p is eventually forever true
– If Q is false, then OutAp is false infinitely often
22/09/2010
SSS'2010 10
Example
• An approximation algorithm A for process q of (Tpq(δ),Tpq(Δ))– If (p,q) is δ-timely, then OutA
q is eventually forever true
– If (p,q) is not (p,q) is Δ-timely, , then OutAq is false
infinitely often – Remark: If (p,q) is not δ-timely but is (p,q) is Δ-
timely, nothing to guarantee
22/09/2010
SSS'2010 11
From local to global approximation• Proposition: If A is an approximation algorithm for p of
predicates local to p (P,Q), then for every correct process q there exists an approximation algorithm B for q of predicate (P,Q).
• Local to p = depend on p only, e.g:– Tpq(δ) is local to q– Pp is crashed is local to p
• Sketch: – Each time p modifies OutA
p , it (reliably) broadcasts the new value– Whenever a process q (included p) delivers a message from p, q
updates OutBq with the new value and, then sets OutB
q to true again
22/09/2010
SSS'2010 12
Composition of approximations
• Proposition: If AP,Q and AP’,Q’ are approximation algorithms for correct process p of (P,Q) and for correct process q of predicates (P’,Q’), then for every correct process r there exists an approximation algorithm for r of predicate (P∧P’,Q∧Q’).
• Sketch: Similar to the previous proposition
22/09/2010
SSS'2010 13
Extraction Algorithm (1/3)
• Let (Pi,Qi)i I ∈ be a set of pairs of predicates• Extraction algorithm – Each process p has a variable dp
– In each run where ⋁i I∈ Pi = true, ∃i0 I:∈• Eventual Agreement: ∃t: after time t, dp = i0 for all
correct process p • Validity: Qi0 is true
22/09/2010
SSS'2010 14
Extraction Algorithm (2/3)
• Proposition: Let (Pi,Qi)i I ∈ be a set of predicates.. If (Ai)i I ∈is a set of approximation algorithms of (Pi,Qi)i I∈ , then there exists an extraction algorithm for (Pi,Qi)i I∈
• Sketch: – Acc[i] initialized to 0– p increments Acc[i] each time OutAi
p become false– p regularly sends Acc to all other process– Upon receiving an array A, a process sets Acc[i] to
max(A[i],Acc[i]) for all I– p chooses i0 such that Acc[i0] is minimum
22/09/2010
SSS'2010 15
Extraction Algorithm (3/3)
• Proposition: Let (Pi,Qi)i I ∈ be a set of predicates. If (Ai)i I ∈ is a set of approximation algorithms of (Pi,Qi)i I∈ , then there exists an communication-efficient extraction algorithm A for (Pi,Qi)i I∈
• Communication-efficiency: In each run where ⋁i I∈ Pi = true, ∃t: after time t– ∃j I : every process ∈ p reads only OutAj
p
– No message is sent by A
22/09/2010
SSS'2010 16
Summary
22/09/2010
Local approximation of predicate
Global approximation of predicate
Composition
Extraction Algorithm
Local approximation of predicate
Global approximation of predicate
SSS'2010 17
Approximation of Link δ-Timeliness (1/3)
• Proposition: Without additional assumption on the system, it is not possible to approximate (Tpq(δ) , Tpq(Δ))
• Sketch: If the links are asynchronous and the local clocks are not synchronized, then it is impossible to evaluate the time to traverse the link (p,q)
22/09/2010
SSS'2010 18
Approximation of Link δ-Timeliness (2/3)
• Theorem: If processes are equipped of perfectly synchronized clocks, then approximation of (Tpq(δ) , Tpq(δ+K)) is possible
• Theorem: If a ∃ Γ-timely path from q to p, then approximation of (Tpq(δ) , Tpq(δ+Γ+K)) is possible
• These results can be generalized for paths(Hence we solve our initial problem)
22/09/2010
SSS'2010 19
Approximation of Link δ-Timeliness (3/3)
• Assume processes are equipped of perfectly synchronized clocks
• Approximation algorithm of (Tpq(δ) , Tpq(δ+K)) for process q– Every K time, p send to q a message including its local
time– If a message spends more than δ time or q does not
receive message from p during δ+K, then• OutA
p ← false
– OutAp is reset to true every n time
22/09/2010
SSS'2010 20
Approximation of crashed processes
• Approximation for every correct process q of (Pp is crashed,Pp is crashed)– If p is faulty, then OutA
q is eventually forever true – If p is correct, then OutA
q is false infinitely often
• Algorithm:– OutA
p ← false– p regularly sends messages to q,– Upon receiving a message from p:
• OutAq ← false
– OutAq is reset to true every n time
22/09/2010
SSS'2010 21
Extraction of δ-Timeliness graphs
• I.e., a graph G(V,E) such that– All processes in ∏/V is crashed– E only contains δ-Timely links
• Easy: TGGi ≣⋀e Edges(G∈ i) Te(δ) ⋀ ⋀ v Nodes(G∉ i) Pv is crashed
22/09/2010
SSS'2010 22
Properties of the extracted graph (1/2)
• Proposition: If Gi is the extracted graph, then (Nodes(Gi[Correct(R)]), Nodes(Gi[Faulty(R)])) is a dicut of Gi
• (X,Y) is a dicut of G=(S,E) iff (X,Y) is a partition of S such that there is no (directed) link from Y to X
22/09/2010
Correct Faulty
SSS'2010 23
Properties of the extracted graph (2/2)
• Proposition: If there is at least one correct process and (Gi)i I∈ only contains strongly connected graphs, then the extracted graph only contains exactly all the correct processes
22/09/2010
SSS'2010 24
Extraction of δ-Timeliness graphs
• We can extract:– A tree containing at least all correct processes
whose all paths from the root are Δ-timely– A ring among all correct processes whose all links
are Δ-timely– …
22/09/2010
SSS'2010 25
Conclusion
• General framework to approximate and extract properties
• Case study: δ-Timeliness
• Perspective: approximate other properties, e.g., general timeliness
22/09/2010
SSS'2010 26
Thank you22/09/2010