d e p a r t m e n t o f c o m p u t e r s c i e n c e university of copenhagen Exception Handling and Checkpointing in CSP Mads Ohm Larsen Copenhagen University: Department of Computer Science Communicating Process Architectures 2012 Slide 1/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 2/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation 2 Back to Basics Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 2/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation 2 Back to Basics 3 Supervisor Paradigm Poison Retirement Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 2/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation 2 Back to Basics 3 Supervisor Paradigm Poison Retirement 4 Exception Handling Fail-stop Retire-like Fail-stop Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 2/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation 2 Back to Basics 3 Supervisor Paradigm Poison Retirement 4 Exception Handling Fail-stop Retire-like Fail-stop 5 Checkpointing Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 2/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation 2 Back to Basics 3 Supervisor Paradigm Poison Retirement 4 Exception Handling Fail-stop Retire-like Fail-stop 5 Checkpointing 6 Conclusions Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 2/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation 2 Back to Basics 3 Supervisor Paradigm Poison Retirement 4 Exception Handling Fail-stop Retire-like Fail-stop 5 Checkpointing 6 Conclusions 7 Work Left to be Done Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 2/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation 2 Back to Basics 3 Supervisor Paradigm Poison Retirement 4 Exception Handling Fail-stop Retire-like Fail-stop 5 Checkpointing 6 Conclusions 7 Work Left to be Done Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 3/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Motivation Why Should We Care? • Reliable software is able to handle exceptions. Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 4/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Motivation Why Should We Care? • Reliable software is able to handle exceptions. • Most programming languages today can handle exceptions Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 4/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Motivation Why Should We Care? • Reliable software is able to handle exceptions. • Most programming languages today can handle exceptions internally. Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 4/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Motivation Why Should We Care? • Reliable software is able to handle exceptions. • Most programming languages today can handle exceptions internally. • Using CSP we should be able to let other processes handle an exception. Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 4/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation 2 Back to Basics 3 Supervisor Paradigm Poison Retirement 4 Exception Handling Fail-stop Retire-like Fail-stop 5 Checkpointing 6 Conclusions 7 Work Left to be Done Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 5/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Back to Basics What is Communication? • A communication is an event done by two or more processes in parallel. Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 6/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Back to Basics What is Communication? • A communication is an event done by two or more processes in parallel. One-to-one P = c ! x → P ′ Q = c ? x → Q ′ ( x ) O 2 O = P || Q Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 6/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Back to Basics What is Communication? • A communication is an event done by two or more processes in parallel. One-to-one P = c ! x → P ′ c Q P Q = c ? x → Q ′ ( x ) O 2 O = P || Q Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 6/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Back to Basics What is Communication? • Any-to-any channels can be “created” with the use of the interleaving operator. Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 7/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Back to Basics What is Communication? • Any-to-any channels can be “created” with the use of the interleaving operator. Any-to-any P i = c ! x → P ′ i Q j = c ? x → Q ′ j ( x ) � � � � A 2 A = ||| || ||| P i Q j i ∈ 1 .. n j ∈ 1 .. m Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 7/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Back to Basics What is Communication? • Any-to-any channels can be “created” with the use of the interleaving operator. Any-to-any P 1 Q 1 P i = c ! x → P ′ c i P 2 Q 2 Q j = c ? x → Q ′ j ( x ) � � � � A 2 A = ||| || ||| P i Q j P n Q m i ∈ 1 .. n j ∈ 1 .. m Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 7/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Outline 1 Motivation 2 Back to Basics 3 Supervisor Paradigm Poison Retirement 4 Exception Handling Fail-stop Retire-like Fail-stop 5 Checkpointing 6 Conclusions 7 Work Left to be Done Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 8/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Supervisor Paradigm Meet the Supervisor • A supervisor overlooks the channel. Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 9/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Supervisor Paradigm Meet the Supervisor • A supervisor overlooks the channel. • It controls which communication events are allowed, by engaging in them. Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 9/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Supervisor Paradigm Meet the Supervisor • A supervisor overlooks the channel. • It controls which communication events are allowed, by engaging in them. S ok P Q c Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 9/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Supervisor Paradigm Meet the Supervisor S ok P 1 Q 1 P 2 Q 2 c P n Q m Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 10/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Supervisor Paradigm Meet the Supervisor • Let us look at the supervisor process. Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 11/45
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f c o m p u t e r s c i e n c e Supervisor Paradigm Meet the Supervisor • Let us look at the supervisor process. Supervisor � � S ok = d : { c . m | m ∈ α c } → S ok • Right now this allows for all communication, when run in parallel Mads Ohm Larsen — Exception Handling and Checkpointing in CSP — CPA 2012 Slide 11/45
Recommend
More recommend