icdcs 2006 efficient incremental optimal chain partition of distributed program traces selma ikiz...

37
ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Upload: janis-wright

Post on 19-Jan-2018

220 views

Category:

Documents


0 download

DESCRIPTION

Software testing and debugging  Commercial software has large number of components – Verification Formal proof of correctness is not feasible Predicate detection (Runtime verification) – simulation & formal methods – Debugging Large number of states – Abstraction or grouping of states/processes

TRANSCRIPT

Page 1: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

ICDCS 2006

Efficient Incremental Optimal Chain Partition of Distributed

Program TracesSelma Ikiz

Vijay K. Garg

Parallel and Distributed Systems Laboratory

Page 2: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Outline Introduction and Motivation Problem definition Outline two previous algorithms Offline vs Incremental -> Experimental Results New Incremental algorithm Experimental Results Concluding Remarks

Page 3: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Software testing and debugging Commercial software has large number of

components– Verification

• Formal proof of correctness is not feasible• Predicate detection (Runtime verification)

– simulation & formal methods– Debugging

• Large number of states – Abstraction or grouping of states/processes

Page 4: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Distributed Computation as Partial order set Partial-order models

– Poset (X,P) :• X is a set• P is antisymmetric,

reflexive, and transitive binary relation on X

– Lamport 1978: “happened-before” relation• f1 → e3 c(f1) < c(e3)

– Fidge 1991 & Mattern 1989 : vector-clocks• f1 → e3 c(f1) < c(e3)

P1

P2

P3

(1,0,0) (2,2,0) (3,2,0)

(0,1,0) (0,2,0) (0,3,0)

(0,2,1) (3,2,2)

e1 e2 e3

f1 f2 f3

g1 g2

Page 5: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Optimal chain partition of a poset Width

– the size of the largest antichain (a subset of poset whose every distinct pair is mutually incomparable)

– A poset cannot be partition into k chains if k < width(P) [R.P. Dilworth]

Debugging– Visualization

Testing & Analyzing– Bounded sum predicates (x1+ x2+ x3 < k)– Mutual exclusion violation

Page 6: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Mutual exclusion violation example

P1

(1,0,0) (2,2,0) (3,2,0)

P2

(0,1,0) (0,3,0)

P3

(0,2,1) (3,2,2)

Critical event

C1 C2 C3

(1,0,0)

(3,2,0)

(0,2,0)

(0,3,0)(0,2,0)

(3,2,2)

Page 7: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Problem definition & Previous algorithms

Problem definition:– Given a chain partition of P, C = {C1, . . . ,CN} into N

disjoint chains, rearrange these chains into a chain partition with the fewest number of chains.

Previous algorithms that answer the question given k chains whether it is possible to partition it into k-1 chains.– Bogart and Magagnosc

• BM– Tomlinson and Garg

• TG

Page 8: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Bogart & Magagnosc

A sequence of elements a0,b0,a1,b1,…,as,bs is a reducing sequence if– a0 is the least element of

some chain,– bi is the immediate

predecessor of ai+1 in some chain,

– all bi’s are distinct,– for all i: ai > bi in the partial

order,– bs is the greatest element of

its chain.

C1 C2

(1,0,0)

(2,0,0)

(3,0,0)

(0,1,0)

(0,2,0)

(0,3,0)

(3,4,0)

(3,5,0)

C3

(0,0,1)

(0,0,2)

(0,0,3)

(0,3,7)

(0,3,8)

C4

(0,0,4)

(0,0,5)

(0,0,6)

Page 9: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Tomlinson and Garg

(1,0,0)

(2,0,0)

(3,0,0)

(0,1,0)

(0,2,0)

(0,3,0)

(3,4,0)

(3,5,0)

(0,0,1)

(0,0,2)

(0,0,3)

(0,3,7)

(0,3,8)

Output Chains

(0,0,4)

(0,0,5)

(0,0,6)

Input Chains

┴ ┴ ┴(0,0,1)

Page 10: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Tomlinson and Garg

(1,0,0)

(2,0,0)

(3,0,0)

(0,1,0)

(0,2,0)

(0,3,0)

(3,4,0)

(3,5,0)

(0,0,3)

(0,3,7)

(0,3,8)

Output Chains

(0,0,4)

(0,0,5)

(0,0,6)

Input Chains

┴ ┴

(0,0,1)

(0,0,2)

(0,0,2)

(0,0,3)

(0,0,1)

(0,3,7)

(0,3,8)

(0,1,0)

(0,2,0)

(0,3,0)

(3,4,0)

(3,5,0)

Page 11: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Tomlinson and Garg

(1,0,0)

(2,0,0)

(3,0,0)

Output Chains

(0,0,4)

(0,0,5)

(0,0,6)

Input Chains

┴ ┴

(0,0,2)

(0,0,3)

(0,0,1)

(0,3,7)

(0,3,8)

(0,2,0)

(0,3,0)

(3,4,0)

(3,5,0)

(0,1,0)

┴(0,3,0)

(0,2,0)

(0,1,0)

(3,4,0)

(3,5,0)

Page 12: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Tomlinson and Garg

(2,0,0)

(3,0,0)

Output Chains

(0,0,4)

(0,0,5)

(0,0,6)

Input Chains

(0,0,2)

(0,0,3)

(0,0,1)

(0,3,7)

(0,3,8)

(0,3,0)

(0,2,0)

(0,1,0)

(3,4,0)

(3,5,0)

(1,0,0)

(3,0,0)

(1,0,0)

(2,0,0)

Page 13: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Tomlinson and Garg

Output Chains

(0,0,4)

(0,0,5)

(0,0,6)

Input Chains

(0,0,2)

(0,0,3)

(0,0,1)

(0,3,7)

(0,3,8)

(0,3,0)

(0,2,0)

(0,1,0)

(3,4,0)

(3,5,0)

(1,0,0)

(2,0,0)

(3,0,0)

Page 14: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Tomlinson and Garg

Output Chains

(0,0,4)

(0,0,5)

(0,0,6)

Input Chains

(0,0,2)

(0,0,3)

(0,0,1)

(0,3,7)

(0,3,8)

(0,3,0)

(0,2,0)

(0,1,0)

(3,4,0)

(3,5,0)

(1,0,0)

(2,0,0)

(3,0,0)

┴ ┴ ┴

Page 15: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Offline vs Incremental

Offline – Call BM or TG algorithm

until there is no further reduction in the number of chains

Incremental (Naïve)– Place the new element

into a new chain, and call the BM or TG algorithm

Page 16: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Linear extension hypothesis [Bouchitte & Rampon]

Let f be the new event, then we assume that all the events happed before f are already arrived and processed. f

Page 17: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Memory Usage

Page 18: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Running times

Page 19: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Idea behind Chain Partitioner

New element– No effect– Updates the maximum

antichain– Expands the maximum

antichain

Given the maximum antichain,

it’s sufficient to compare the new element with the maximum antichain

Maximum antichain

Page 20: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

CP example

(1,2,1) (1,2,3)

(1,2,0) (2,3,0) (2,4,1)

(2,0,0) (3,0,0) 4,3,0)

(0,1,0)

(1,0,0)

Linearization:

(1,0,0), (0,1,0),(1,2,0),(2,0,0),(1,2,1),(2,3,0),(3,0,0),(1,2,3),(2,4,1),(4,3,0)

Page 21: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

CP example(1,2,1) (1,2,3)

(1,2,0) (2,3,0) (2,4,1)

(2,0,0) (3,0,0) 4,3,0)

(0,1,0)

(1,0,0)

(1,0,0), (0,1,0),(1,2,0),(2,0,0),(1,2,1),(2,3,0),(3,0,0),(1,2,3),(2,4,1),(4,3,0)

H0: { }

W0:{ }(1,0,0) (0,1,0)

(1,2,0)

(2,0,0)

H:{}

O:{}

Q:{}

(1,0,0) (0,1,0)

(1,2,0)

(2,0,0)

┴ ┴

┴ ┴

k = 3

CP Merge

Page 22: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

CP example(1,2,1) (1,2,3)

(1,2,0) (2,3,0) (2,4,1)

(2,0,0) (3,0,0) 4,3,0)

(0,1,0)

(1,0,0)

(1,0,0), (0,1,0),(1,2,0),(2,0,0),(1,2,1),(2,3,0),(3,0,0),(1,2,3),(2,4,1),(4,3,0)

H4: { }

W4:{ }(1,0,0) (0,1,0)

(1,2,0)

(2,0,0)

H:{}

O:{}

Q:{}

(1,0,0) (0,1,0)

(1,2,0)

(2,0,0)

┴ ┴

┴ ┴(1,0,0)

(1,2,0)

k = 3

CP Merge

Page 23: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

CP example(1,2,1) (1,2,3)

(1,2,0) (2,3,0) (2,4,1)

(2,0,0) (3,0,0) 4,3,0)

(0,1,0)

(1,0,0)

(1,0,0), (0,1,0),(1,2,0),(2,0,0),(1,2,1),(2,3,0),(3,0,0),(1,2,3),(2,4,1),(4,3,0)

H4: { }

W4:{ }(1,0,0) (0,1,0)

(1,2,0)

(2,0,0)

H:{}

O:{}

Q:{}

(0,1,0) (2,0,0)

┴ ┴

┴(1,0,0)

(1,2,0)

(0,1,0)

k = 3

CP Merge

Page 24: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

CP example(1,2,1) (1,2,3)

(1,2,0) (2,3,0) (2,4,1)

(2,0,0) (3,0,0) 4,3,0)

(0,1,0)

(1,0,0)

(1,0,0), (0,1,0),(1,2,0),(2,0,0),(1,2,1),(2,3,0),(3,0,0),(1,2,3),(2,4,1),(4,3,0)

H4: { }

W4:{ }(1,0,0) (0,1,0)

(1,2,0)

(2,0,0)

H:{}

O:{}

Q:{}

(2,0,0)

(1,0,0)

(1,2,0)

(0,1,0)

k = 3

CP Merge

Page 25: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

CP example(1,2,1) (1,2,3)

(1,2,0) (2,3,0) (2,4,1)

(2,0,0) (3,0,0) 4,3,0)

(0,1,0)

(1,0,0)

(1,0,0), (0,1,0),(1,2,0),(2,0,0),(1,2,1),(2,3,0),(3,0,0),(1,2,3),(2,4,1),(4,3,0)

H4: { }

W4:{ }(2,0,0)

(1,0,0)

(1,2,0)

(0,1,0)

(1,2,1) (2,3,0)

(3,0,0)

H:{}

O:{}

Q:{}

k = 3

(2,0,0)(1,2,0)

(1,2,1) (2,3,0)

(3,0,0)

┴ ┴

┴ ┴

CP Merge

Page 26: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

CP example(1,2,1) (1,2,3)

(1,2,0) (2,3,0) (2,4,1)

(2,0,0) (3,0,0) 4,3,0)

(0,1,0)

(1,0,0)

(1,0,0), (0,1,0),(1,2,0),(2,0,0),(1,2,1),(2,3,0),(3,0,0),(1,2,3),(2,4,1),(4,3,0)

H4: { }

W4:{ }(2,0,0)

(1,0,0)

(1,2,0)

(0,1,0)

(1,2,1) (2,3,0)

(3,0,0)

H:{}

O:{}

Q:{}

k = 3

(2,0,0)(1,2,0)

(1,2,1) (2,3,0)

(3,0,0)

┴ ┴

┴ ┴

(2,3,0)

(2,0,0)

CP Merge

Page 27: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

CP example(1,2,1) (1,2,3)

(1,2,0) (2,3,0) (2,4,1)

(2,0,0) (3,0,0) 4,3,0)

(0,1,0)

(1,0,0)

(1,0,0), (0,1,0),(1,2,0),(2,0,0),(1,2,1),(2,3,0),(3,0,0),(1,2,3),(2,4,1),(4,3,0)

H0: { }

W0:{ }(2,0,0)

(1,0,0)

(1,2,0)

(0,1,0)

(1,2,1) (2,3,0)

(3,0,0)

H:{}

O:{}

Q:{}

k = 3

(1,2,0)

(1,2,1)

(3,0,0)

┴ ┴

(2,3,0)

(2,0,0)(1,2,0)

(1,2,1)

CP Merge

Page 28: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

CP example(1,2,1) (1,2,3)

(1,2,0) (2,3,0) (2,4,1)

(2,0,0) (3,0,0) 4,3,0)

(0,1,0)

(1,0,0)

(1,0,0), (0,1,0),(1,2,0),(2,0,0),(1,2,1),(2,3,0),(3,0,0),(1,2,3),(2,4,1),(4,3,0)

H7: { }

W7:{ }

(1,0,0) (0,1,0)

H:{}

O:{}

Q:{}

k = 3(1,2,1) (3,0,0)(2,3,0)

(2,0,0) (1,2,0)

(1,2,3)(2,4,1) 4,3,0)

CP Merge

Page 29: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Running times

Page 30: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Test suites

7 new test suites are created. Each test suite contains 18 different test cases

– initial partition vary from 10 to 450 chains, – size vary from 100 to 70,000

We used a fixed vectorclock size (10) Reducing factor = (N-w)/N

– where N is the size of the initial partition, and w is the width of the poset.

Posets are randomly created according to a given width and size.

Test suites differ in their reducing factor.

Page 31: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Reducing factor effect

Page 32: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Average run time per event

Page 33: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Comparison with related work

Page 34: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Concluding Remarks

Partitioning a distributed computation– Under the linear extension hypothesis pruning the

work space (without any significant extra cost ) improves the performance of the incremental algorithm

Main limitation:– x1+ x2+ x3 < k (efficient only for small k)

A decentralized algorithm Integrating with computation slicing

Page 35: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Questions ?

Page 36: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Problem definition & Previous algorithms

Problem definition:– Given a chain partition of P, C = {C1, . . . ,CN} into N

disjoint chains, rearrange these chains into a chain partition with the fewest number of chains.

Previous algorithms that answer the question given k chains whether it is possible to partition it into k-1 chains.– Bogart and Magagnosc

• BM– Tomlinson and Garg

• TG

Page 37: ICDCS 2006 Efficient Incremental Optimal Chain Partition of Distributed Program Traces Selma Ikiz Vijay K. Garg Parallel and Distributed Systems Laboratory

Trace Model: Total Order vs Partial Order Total order: interleaving of events in a trace

– relevant tools: Temporal Rover [Drusinsky 00], Java-MaC [Kim, Kannan, Lee, Sokolsky, and Viswanathan 01], jPaX [Havelund and Rosu 01]

Partial order: Lamport’s happened-before model– e.g., jMPaX [Sen, Rosu, and Agha 03]

Total order: + low computational complexity

Partial order: + suitable for concurrent and distributed programs + encodes exponential number of total orders ) captures

bugs that may not be found with a total order