56
A Distributed Abstraction Algorithm for Online Predicate Detection Himanshu Chauhan 1 Vijay K. Garg 1 Aravind Natarajan 2 Neeraj Mittal 2 1 Parallel & Distributed Systems Lab, Department of Electrical & Computer Engineering University of Texas at Austin 2 Department of Computer Science, University of Texas at Dallas

A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

A Distributed Abstraction Algorithm for OnlinePredicate Detection

Himanshu Chauhan 1 Vijay K. Garg 1 Aravind Natarajan 2

Neeraj Mittal 2

1Parallel & Distributed Systems Lab,Department of Electrical & Computer Engineering

University of Texas at Austin

2Department of Computer Science,University of Texas at Dallas

Page 2: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Outline

1 Introduction

2 Background

3 Abstraction - Computational Slicing

4 Distributed Online Slicing

5 Conclusion

Himanshu (UT Austin) Distributed Online Abstraction 1 / 34

Page 3: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Motivation & Problem Definition

Why Online Predicate Detection?

Large Parallel Computations

Non-terminating executions, e.g. server farmsDebugging, Runtime validation

Himanshu (UT Austin) Distributed Online Abstraction 2 / 34

Page 4: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Motivation & Problem Definition

Other Applications

General predicate detection algorithms, such as Cooper-Marzullo[1991]

Perform abstraction with respect to simpler predicateDetect remaining conjunct in the abstracted structureReduced complexity by using abstraction based detection

Himanshu (UT Austin) Distributed Online Abstraction 3 / 34

Page 5: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Motivation & Problem Definition

Predicate Detection in Distributed Computations

Find all global states in a computation that satisfy a predicate

a

1

b

2

c

−1

d

0

e

0

f

2

g

1

h

3

u

4

v

1

w

2

x

4

P1

P2

P3

x1

x2

x3

Predicate (x1 ∗ x2 + x3 < 5) ∧ (x1 ≥ 1) ∧ (x3 ≤ 3): O(k3) steps

O(kn) complexity for n processes, and k events per process

Compute intensive for large computations

Himanshu (UT Austin) Distributed Online Abstraction 4 / 34

Page 6: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Motivation & Problem Definition

Exploiting Predicate Structure Using Abstractions

Predicate (x1 ∗ x2 + x3 < 5)∧ (x1 ≥ 1) ∧ (x3 ≤ 3)

a

1

b

2

c

−1

d

0

e

0

f

2

g

1

h

3

u

4

v

1

w

2

x

4

P1

P2

P3

x1

x2

x3

(a) Original Computation

a, e, f , u, v b

w g

(b) Slice w.r.t.(x1 ≥ 1) ∧ (x3 ≤ 3)

Himanshu (UT Austin) Distributed Online Abstraction 5 / 34

Page 7: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Motivation & Problem Definition

Paper Focus

Offline and Online algorithms for abstracting computations for regularpredicates exist [Mittal et al. 01 & Sen et al. 03]

This paper: Efficient distributed online algorithm to abstract acomputation with respect to regular predicates.

Himanshu (UT Austin) Distributed Online Abstraction 6 / 34

Page 8: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Model

System Model

Asynchronous message passing

n reliable processes

FIFO, loss-less channels

Denote a distributed computation with (E ,→)

E : Set of all events in the computation→: happened-before relation [Lamport 78]

Himanshu (UT Austin) Distributed Online Abstraction 7 / 34

Page 9: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Consistent Cuts

Consistent Cut: Possible global state of the system during its execution.

Himanshu (UT Austin) Distributed Online Abstraction 8 / 34

Page 10: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Consistent Cuts

Consistent Cut: Possible global state of the system during its execution.

Formally:

Given a distributed computation (E ,→), a subset of events C ⊆ E is aconsistent cut if C contains an event e only if it contains all events thathappened-before e.

e ∈ C ∧ f → e ⇒ f ∈ C

Himanshu (UT Austin) Distributed Online Abstraction 8 / 34

Page 11: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Consistent Cuts

Consistent Cut: Possible global state of the system during its execution.

i.e. if a message receipt event has happened, the corresponding messagesend event must have happened.

Himanshu (UT Austin) Distributed Online Abstraction 8 / 34

Page 12: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Consistent Cuts

Consistent Cut: Possible global state of the system during its execution.

For conciseness, we represent a consistent cut by its maximum elementson each process.

a b c

e f g

P1

P2

{} X

{a} X

[b, e] X[c , e] X

[a, f ] X

Use vector clocks for checking consistency/finding causual dependency

Himanshu (UT Austin) Distributed Online Abstraction 8 / 34

Page 13: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Lattice of Consistent Cuts

Set of all consistent cuts of a computation (E ,→), forms a lattice underthe relation ⊆. [Mattern 89]

Himanshu (UT Austin) Distributed Online Abstraction 9 / 34

Page 14: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Lattice of Consistent Cuts

a b c

e f g

P1

P2{}

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

Computation and its Lattice of Consistent Cuts

Himanshu (UT Austin) Distributed Online Abstraction 9 / 34

Page 15: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Regular Predicates

A predicate is regular if for any two consistent cuts C and D that satisfythe predicate, the consistent cuts given by (C ∪ D) and (C ∩ D) alsosatisfy the predicate.

a b c

e f g

P1

P2

Himanshu (UT Austin) Distributed Online Abstraction 10 / 34

Page 16: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Regular Predicates

A predicate is regular if for any two consistent cuts C and D that satisfythe predicate, the consistent cuts given by (C ∪ D) and (C ∩ D) alsosatisfy the predicate.

a b c

e f g

P1

P2

Himanshu (UT Austin) Distributed Online Abstraction 10 / 34

Page 17: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Regular Predicates

A predicate is regular if for any two consistent cuts C and D that satisfythe predicate, the consistent cuts given by (C ∪ D) and (C ∩ D) alsosatisfy the predicate.

a b c

e f g

P1

P2

{b, g} ∩ {c , f } = {b, f },{b, g} ∪ {c , f } = {c, g}

Himanshu (UT Austin) Distributed Online Abstraction 10 / 34

Page 18: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Regular Predicates - Examples

Local Predicates

Conjunctive Predicates − conjunctions of local predicates

Monotonic Channel Predicates

All channels are empty/fullThere are at most m messages in transit from Pi to Pj

Not Regular: There are even number of messages in a channel

Himanshu (UT Austin) Distributed Online Abstraction 11 / 34

Page 19: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Regular Predicates - Examples

Local Predicates

Conjunctive Predicates − conjunctions of local predicates

Monotonic Channel Predicates

All channels are empty/fullThere are at most m messages in transit from Pi to Pj

Not Regular: There are even number of messages in a channel

Himanshu (UT Austin) Distributed Online Abstraction 11 / 34

Page 20: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Regular Predicates

Predicate: “all channels are empty”

a b c

e f g

P1

P2{}

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

Himanshu (UT Austin) Distributed Online Abstraction 12 / 34

Page 21: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Consistent Cuts and Lattices, Regular Predicates

Regular Predicates

Predicate: “all channels are empty”

a b c

e f g

P1

P2{}

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

Himanshu (UT Austin) Distributed Online Abstraction 12 / 34

Page 22: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

Why use Abstractions?

Goal: Find all global states that satisfy a given predicate.

Key Benefit of Abstraction

When B is regular: we can “get away” with only enumerating cuts thatsatisfy B, and are not joins of other consistent cuts.

Due to Birkhoff’s Representation Theorem for Lattices [Birkhoff 37]

Himanshu (UT Austin) Distributed Online Abstraction 13 / 34

Page 23: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

Abstractions for Regular Predicates

Slice: A subset of the set of all global states of a computation thatsatisfies the predicate.

Himanshu (UT Austin) Distributed Online Abstraction 14 / 34

Page 24: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

Abstractions for Regular Predicates

Slice: A subset of the set of all global states of a computation thatsatisfies the predicate.

start

end Consistent Cuts

Satisfying B

Slice for B

Himanshu (UT Austin) Distributed Online Abstraction 14 / 34

Page 25: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

Abstractions for Regular Predicates

Slice: A subset of the set of all global states of a computation thatsatisfies the predicate.

Himanshu (UT Austin) Distributed Online Abstraction 14 / 34

Page 26: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

Abstractions for Regular Predicates

Slice: A subset of the set of all global states of a computation thatsatisfies the predicate.

a b c

e f g

P1

P2 {}

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

{a} {e}

{b, f }

{c , f } {b, g}

B: “all channels are empty”

Himanshu (UT Austin) Distributed Online Abstraction 14 / 34

Page 27: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

How do we do that?

Exploit JB(e)

Himanshu (UT Austin) Distributed Online Abstraction 15 / 34

Page 28: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

How do we do that?

Given a predicate B, and event e in a computation

JB(e): The least consistent cut that satisfies B and contains e.

Himanshu (UT Austin) Distributed Online Abstraction 15 / 34

Page 29: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

How do we do that?

Given a predicate B, and event e in a computation

JB(e): The least consistent cut that satisfies B and contains e.

a b c

e f g

P1

P2 {}

Not in Slice

In Slice

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

B: “all channels are empty”

Himanshu (UT Austin) Distributed Online Abstraction 15 / 34

Page 30: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

How do we do that?

Given a predicate B, and event e in a computation

JB(e): The least consistent cut that satisfies B and contains e.

a b c

e f g

P1

P2 {}

Not in Slice

In Slice

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

B: “all channels are empty”

Himanshu (UT Austin) Distributed Online Abstraction 15 / 34

Page 31: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

How do we do that?

Given a predicate B, and event e in a computation

JB(e): The least consistent cut that satisfies B and contains e.

a b c

e f g

P1

P2 {}

Not in Slice

In Slice

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

B: “all channels are empty”

Himanshu (UT Austin) Distributed Online Abstraction 15 / 34

Page 32: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

How do we do that?

Given a predicate B, and event e in a computation

JB(e): The least consistent cut that satisfies B and contains e.

a b c

e f g

P1

P2 {}

Not in Slice

In Slice

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

B: “all channels are empty”

Himanshu (UT Austin) Distributed Online Abstraction 15 / 34

Page 33: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

How do we do that?

Given a predicate B, and event e in a computation

JB(e): The least consistent cut that satisfies B and contains e.

a b c

e f g

P1

P2 {}

Not in Slice

In Slice

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

B: “all channels are empty”

Himanshu (UT Austin) Distributed Online Abstraction 15 / 34

Page 34: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

How do we do that?

Given a predicate B, and event e in a computation

JB(e): The least consistent cut that satisfies B and contains e.

a b c

e f g

P1

P2 {}

Not in Slice

In Slice

{a} {e}

{b} {a, e}

{c} {b, e}

{c , e} {b, f }

{c , f } {b, g}

{c , g}

B: “all channels are empty”

Himanshu (UT Austin) Distributed Online Abstraction 15 / 34

Page 35: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

Slice for Regular Predicates

For a computation (E ,→), and regular predicate B

Slice for B is defined as:

JB = {JB(e) | e ∈ E}

Himanshu (UT Austin) Distributed Online Abstraction 16 / 34

Page 36: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

Bored with definitions?

Enough with the definitions

Enough with notation

Just tell us the crux of it

Himanshu (UT Austin) Distributed Online Abstraction 17 / 34

Page 37: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Abstractions of Computations - Slicing

Bored with definitions?

It comes down to a two line pseudo-code

foreach event e in computation:

find the least consistent cut that satisfies Band includes e

Himanshu (UT Austin) Distributed Online Abstraction 17 / 34

Page 38: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Slicing Algorithm

Centralized Online Slicing

One process acts as the central slicer - CS

Each process Pi sends details (state/vector clock etc.) of relevantevents to CS

[Mittal et al. 07]

Himanshu (UT Austin) Distributed Online Abstraction 18 / 34

Page 39: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

Challenges

Simple decomposition of centralized algorithm into n independentexecutions is inefficient

Results in large number of redundant communications

Multiple computations lead to identical results

Himanshu (UT Austin) Distributed Online Abstraction 19 / 34

Page 40: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

Distributed Online Slicing

Each process Pi has an additional slicer thread Si

Pi sends details (state/vector clock etc.) of relevant events locally toSi

Himanshu (UT Austin) Distributed Online Abstraction 20 / 34

Page 41: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

Distributed Algorithm at Si

Each slicer, Si , has a token, Ti , that computes JB(e) where e ∈ Ei

Tokens are sent to other slicers to progress on JB(e)

For each event make use of:

e → f ⇒ JB(e) ⊆ JB(f )

Himanshu (UT Austin) Distributed Online Abstraction 21 / 34

Page 42: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

Distributed Algorithm at Si

B = “all channels are empty”

T1 @ S1 T2 @ S2

e P1.1 P2.1

cut [1, 0] [0, 1]

dependency [1, 0] [0, 1]

cut consistent? X Xsatisfies B? X Xoutput cut? X Xwait for P1.2 P2.2

Himanshu (UT Austin) Distributed Online Abstraction 21 / 34

Page 43: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

What happens in non-trivial cases?

B= “all channels are empty”

Suppose, P1 just reported its 2nd event toS1

T1 @ S1

e P1.2

cut [2, 0]

dependency [2, 0]

cut consistent? Xsatisfies B? X

wait for P2.1

send T1 to S2

Himanshu (UT Austin) Distributed Online Abstraction 22 / 34

Page 44: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

What happens in non-trivial cases?

B= “all channels are empty”

1 2

1

P1

P2

S1T1

S2T2

Suppose, P1 just reported its 2nd event toS1

T1 @ S1

e P1.2

cut [2, 0]

dependency [2, 0]

cut consistent? Xsatisfies B? X

wait for P2.1

send T1 to S2

Himanshu (UT Austin) Distributed Online Abstraction 22 / 34

Page 45: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

What happens in non-trivial cases?

B= “all channels are empty”

1 2

1

P1

P2

S1T1

S2T2

Suppose, P1 just reported its 2nd event toS1

T1 @ S1

e P1.2

cut [2, 0]

dependency [2, 0]

cut consistent? Xsatisfies B? X

wait for P2.1

send T1 to S2

Himanshu (UT Austin) Distributed Online Abstraction 22 / 34

Page 46: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

S2 receives T1

Regular predicate structure

Exact knowledge of which event to wait for

Which states to evaluate predicate on

1 2

1 2

P1

P2

S1

T1

wait for P2.1

S2

Himanshu (UT Austin) Distributed Online Abstraction 23 / 34

Page 47: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

S2 receives T1

Regular predicate structure

Exact knowledge of which event to wait for

Which states to evaluate predicate on

1 2

1 2

P1

P2

S1

T1

wait for P2.1

S2

B would not be even evaluated on any state unless S2 is told about amessage ‘receipt’

Himanshu (UT Austin) Distributed Online Abstraction 23 / 34

Page 48: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

S2 receives T1

Regular predicate structure

Exact knowledge of which event to wait for

Which states to evaluate predicate on

1 2

1 2

P1

P2

S1

T1

wait for P2.1

S2

B would not be even evaluated on any state unless S2 is told about amessage ‘receipt’T1 would wait at S2 till P2.2 is reported

Himanshu (UT Austin) Distributed Online Abstraction 23 / 34

Page 49: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Basic Algorithm

P2.2 is reported to S2

After P2.2 is reported to S2

1 2

1 2

P1

P2

S1

T1 T2S2

T1 @ S2 T2 @ S2

e P1.2 P2.2

cut [2, 2] [2, 2]

dependency [2, 2] [2, 2]

cut consistent? X Xsatisfies B? X Xoutput cut? X Xwait for P1.3 P2.3

S2 sends T1 back to S1

Himanshu (UT Austin) Distributed Online Abstraction 24 / 34

Page 50: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Optimizations

Optimizations - I

a b c

e f g

P1

P2

S1T1

computing for b

S2T2 computing for f

Send only if needed - ie. before sending your token to Sk , check if youhave token Tk containing the required information.

Himanshu (UT Austin) Distributed Online Abstraction 25 / 34

Page 51: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Optimizations

Optimizations - I

a b c

e f g

P1

P2

S1

T1computing for bS2

T2

computing for f

Send only if needed - ie. before sending your token to Sk , check if youhave token Tk containing the required information.

Himanshu (UT Austin) Distributed Online Abstraction 25 / 34

Page 52: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Optimizations

Optimizations - II

Stall computations that would lead to duplicate computations

a b c

e f g

P1

P2

S1T1

computing for b

S2T2 computing for f

Allow only one computation to progress if there is a possibility ofduplicates (see paper for details)

Himanshu (UT Austin) Distributed Online Abstraction 26 / 34

Page 53: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Optimizations

Optimizations - II

Stall computations that would lead to duplicate computations

a b c

e f g

P1

P2

S1T1

computing for b

S2T2 computing for f

Allow only one computation to progress if there is a possibility ofduplicates (see paper for details)

Himanshu (UT Austin) Distributed Online Abstraction 26 / 34

Page 54: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Comparison with Centralized Approach

Distributed vs Centralized

n: # of processes, |S |: # bits required to store state data|E |: # of events in computation |Ei |: # of events on process Pi

Centralized Distributed

Work/Process O(n2|E |) O(n|E |)Space/Process O(|E |.|S |) O(|Ei |.|S |)

O(n) savings in work per processO(n) savings in storage space per process

For conjunctive predicates:The optimized version has O(n) savings in message load per process

Himanshu (UT Austin) Distributed Online Abstraction 27 / 34

Page 55: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Questions

Questions?

Thanks!

Himanshu (UT Austin) Distributed Online Abstraction 28 / 34

Page 56: A Distributed Abstraction Algorithm for Online Predicate Detectionusers.ece.utexas.edu/~garg/pdslab/himanshu/slides/srds13.pdf · 2016-03-09 · A Distributed Abstraction Algorithm

Introduction Background Abstraction - Computational Slicing Distributed Online Slicing Conclusion

Questions

Future Work

Even with optimizations, there can be degenerate cases with O(|E |)messages on a single process

Is there a distributed algorithm that guarantees reduced messages (byO(n)) per process?

Total work performed is still O(n|E |)

Is there a distributed algorithm that reduces this bound?

Himanshu (UT Austin) Distributed Online Abstraction 29 / 34