communication invariance based reduction
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 PresentationTRANSCRIPT
Communication Invariance Based Reduction
GUO Huayang
Overview
• Motivation
• Related work
• Redundancy analysis
MC in distributed system
• Nondeterministic bugs
Thread 1lock(cs)
x = 0unlock(cs)
print(x)
Thread 2lock(cs)
x = 1unlock(cs)
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
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)
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
......
1,000×1,000 = 1,000,000
......
confirm
Process 0 Process 1
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
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
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
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
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!
State Space Summary
Method State Size Level
Naive ≈ N!
POR ≈ 2N
CIBR ≈ N
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
Advantages
• Communication invariance based reduction – A more significant and primary reduction method
– Compatible with POR and State Caching
Thanks.Questions are welcome.
HIERARCHICAL MODEL CHECKING
Framework
• Produce all possible message interfaces
• Examine executions may leads to one message interface in a single process
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
Advantages
• Extend model checkers to large scale systems
• Compatible with existent reduction methods
...... ......
Process 0 Process 1
T possible execsS possible execs
Global Message Interface
S + T ?S × T ?
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