communication invariance based reduction

22
Communication Invariance Based Reduction GUO Huayang

Upload: lorin

Post on 15-Feb-2016

54 views

Category:

Documents


0 download

DESCRIPTION

Communication Invariance Based Reduction. GUO Huayang. Overview. Motivation Related work Redundancy analysis. MC in distributed system. Nondeterministic bugs. Thread 1 lock( cs ) x = 0 unlock( cs ) print(x). Thread 2 lock( cs ) x = 1 unlock( cs ). Related work. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Communication  Invariance Based Reduction

Communication Invariance Based Reduction

GUO Huayang

Page 2: Communication  Invariance Based Reduction

Overview

• Motivation

• Related work

• Redundancy analysis

Page 3: Communication  Invariance Based Reduction

MC in distributed system

• Nondeterministic bugs

Thread 1lock(cs)

x = 0unlock(cs)

print(x)

Thread 2lock(cs)

x = 1unlock(cs)

Page 4: Communication  Invariance Based Reduction

Related work

• POR (Partial Order Reduction)– Take meaning of dependency relations– Improvement of basic idea

• State Cachingx = x + 1y = y + 1

y = y + 1x = x + 1

Page 5: Communication  Invariance Based Reduction

Related work

• POR (Partial Order Reduction)– Take meaning of dependency relations– Improvement of basic idea

• State Cachingx = x + 1y = y + 1

y = y + 1x = x + 1

x(2), y(1)

x(3), y(2) x(3), y(2)

Page 6: Communication  Invariance Based Reduction

Related work

• POR + State Caching– Fix false dependency relation– Avoid state machine cycle

• Large scale systemx = x + 2x = x * 2

x = x * 2x = x + 2

Page 7: Communication  Invariance Based Reduction

......

1,000×1,000 = 1,000,000

......

confirm

Process 0 Process 1

Page 8: Communication  Invariance Based Reduction

Dining Philosophers Problem

2

4

1

3

Execution1. P1 take right chopstick2. P1 take left chopstick3. P1 have dinner4. P1 put down chopsticks5. P3 take right chopstick6. P3 take left chopstick7. P3 have dinner8. P3 put down chopsticks9. P2 take right chopstick10. P2 take left chopstick11. P2 have dinner12. P2 put down chopsticks13. P4 take right chopstick14. P4 take left chopstick15. P4 have dinner16. P4 put down chopsticks

Page 9: Communication  Invariance Based Reduction

DeadlockExecution1. P1 take right chopstick2. P3 take right chopstick3. P2 take right chopstick4. P4 take right chopstick5. Deadlock and starve to death !

2

4

1

3

Page 10: Communication  Invariance Based Reduction

Naive EnumerationExecution1. P1 take right chopstick2. P1 take left chopstick3. P3 take right chopstick4. P1 have dinner5. P4 take right chopstick6. P1 put down chopsticks7. P2 take right chopstick8. ……

2

4

1

3

Page 11: Communication  Invariance Based Reduction

Partial Order ReductionDependency relations• Taking left/right• Taking right happens first

2

4

1

3

Left

Right Left

Right

Left

Right Left

Right

2n – 1 = 24 – 1 = 15

Page 12: Communication  Invariance Based Reduction

Communication Invariance Based Reduction

In philosopher 1’s view1. Take right. Succeed!2. Take left. Succeed?3. Have dinner. Succeed!4. Put down. Succeed!

1 Left

Right

Only 2 scenarios!

Page 13: Communication  Invariance Based Reduction

State Space Summary

Method State Size Level

Naive ≈ N!

POR ≈ 2N

CIBR ≈ N

Page 14: Communication  Invariance Based Reduction

RSL experiments

• RSL experiment analysis– 3 replicas (20 different message interfaces)

20,000 executions explored by DPOR400 necessary executions for a process

– 2 replicas (100 different message interfaces)20,000 executions explored by DPOR2,500 necessary executions for a process

Page 15: Communication  Invariance Based Reduction

Advantages

• Communication invariance based reduction – A more significant and primary reduction method

– Compatible with POR and State Caching

Page 16: Communication  Invariance Based Reduction

Thanks.Questions are welcome.

Page 17: Communication  Invariance Based Reduction

HIERARCHICAL MODEL CHECKING

Page 18: Communication  Invariance Based Reduction

Framework

• Produce all possible message interfaces

• Examine executions may leads to one message interface in a single process

Page 19: Communication  Invariance Based Reduction

Algorithm Design

• Algorithm flow1. Initialize mi_set by a random execution2. while some mi are not explored, for all process

a. update the process with mib. commit all new message interfaces to mi_set, which

the process may produce with mi

Page 20: Communication  Invariance Based Reduction

Advantages

• Extend model checkers to large scale systems

• Compatible with existent reduction methods

Page 21: Communication  Invariance Based Reduction

...... ......

Process 0 Process 1

T possible execsS possible execs

Global Message Interface

S + T ?S × T ?

Page 22: Communication  Invariance Based Reduction

Global/Process Execution

• Process 1 • Process 2

Thread 1lock(cs)

x = 0unlock(cs)

send x to p2

Thread 2lock(cs)

x = 1unlock(cs)

Thread 3recv y from p1

lock(cs’)y = y + 2

unlock(cs’)print(y)

Thread 4lock(cs’)y = y * 2

unlock(cs’)

Global executionT1 lock T2 lock T1 send (x = 1) T3 recv (y = 1) …

Process 2’s executionT3 recv (y = 1) T3 lock T3 print T4 lock