comp30112 concurrency
play

COMP30112: Concurrency Introduction to Course & Introduction to - PowerPoint PPT Presentation

Topic 1: Introduction Topic 2: Modelling Processes with FSP - I COMP30112: Concurrency Introduction to Course & Introduction to FSP Howard Barringer Room KB2.20: email: Howard.Barringer@manchester.ac.uk February 2009 Topic 1: Introduction


  1. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I COMP30112: Concurrency Introduction to Course & Introduction to FSP Howard Barringer Room KB2.20: email: Howard.Barringer@manchester.ac.uk February 2009

  2. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Acknowledgement The course material is largely based on that of: Concurrency: State Models and Java Programs Profs Jeff Magee and Jeff Kramer of Imperial College, Dept of Computing, London.

  3. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Acknowledgement The course material is largely based on that of: Concurrency: State Models and Java Programs Profs Jeff Magee and Jeff Kramer of Imperial College, Dept of Computing, London. Many thanks to all concerned.

  4. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Contents Topic 1: Introduction General Background On Concurrency Examples Implementation Topic 2: Modelling Processes with FSP - I Labelled Transition Systems FSP: Basic Elements Summary

  5. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Outline Topic 1: Introduction General Background On Concurrency Examples Implementation Topic 2: Modelling Processes with FSP - I Labelled Transition Systems FSP: Basic Elements Summary

  6. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Course Structure and Topics Lectures Topic 1 Introduction and Overview 5 FSP: Modelling Processes 5 Properties: Safety, liveness 2 Process Equality 2 Java Threads 6 Concurrency Patterns: Mutual Exclusion Monitors+Semaphores Producers/Consumers Readers/Writers GUIs Termination 1 Revision

  7. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I General Comments • Some concepts familiar from COMP20051 and COMP20081 • We follow much of Magee and Kramer, but more on modelling • Java ≃ COMP20051 • Java used to illustrate — BUT this is NOT a programming course

  8. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Supporting and Background Material Books Jeff Magee and Jeff Kramer. Concurrency: State Models and Java Programs. 2nd Edition, Wiley, 2006. L. Aceto, A Ing´ olfsd´ ottir, K. Larsen and J Srba. Reactive Systems: Modelling, Specification and Verification. Cambridge University Press, 2007. R. Milner. Communication and Concurrency. Prentice-Hall, 1989. C.A.R. Hoare. Communicating Sequential Processes. Prentice-Hall, 1985. LTSA: Magee and Kramer’s modelling and analysis tool (associated with book) Exercises: offline and in lectures Lecture Slides: hardcopy and PDF Notes on FSP

  9. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Assessment Two-hour examination

  10. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Outline Topic 1: Introduction General Background On Concurrency Examples Implementation Topic 2: Modelling Processes with FSP - I Labelled Transition Systems FSP: Basic Elements Summary

  11. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I What is Concurrency? A set of sequential programs executed in abstract parallelism

  12. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I What is Concurrency? A set of sequential programs executed in abstract parallelism • thread [of control] • multi-threading • light-weight threads

  13. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I What is Concurrency? A set of sequential programs executed in abstract parallelism • thread [of control] • multi-threading • light-weight threads • parallel processing

  14. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I What is Concurrency? A set of sequential programs executed in abstract parallelism • thread [of control] • multi-threading • light-weight threads • parallel processing • multi-processing • multi-tasking

  15. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I What is Concurrency? A set of sequential programs executed in abstract parallelism • thread [of control] • shared memory • multi-threading • protected work-space • light-weight threads • parallel processing • multi-processing • multi-tasking

  16. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I What is Concurrency? A set of sequential programs executed in abstract parallelism • thread [of control] • shared memory • multi-threading • protected work-space • light-weight threads • parallel processing • message-passing • multi-processing (synchronous or • multi-tasking asynchronous)

  17. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why use Concurrency?

  18. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why use Concurrency? • many processes often closely models application

  19. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why use Concurrency? • many processes often closely models application • sometimes closely fits intuition, a good abstraction

  20. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why use Concurrency? • many processes often closely models application • sometimes closely fits intuition, a good abstraction • performance issues

  21. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why use Concurrency? • many processes often closely models application • sometimes closely fits intuition, a good abstraction • performance issues • increased responsiveness and throughput (esp. GUIs)

  22. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard?

  23. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard? • algorithm development

  24. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard? • algorithm development • efficiency and performance

  25. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard? • algorithm development • efficiency and performance • simulation and testing: NON DETERMINISM

  26. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard? • algorithm development • efficiency and performance • simulation and testing: NON DETERMINISM • analysis of properties: deadlock, livelock, fairness, liveness, etc.

  27. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard? • algorithm development • efficiency and performance • simulation and testing: NON DETERMINISM • analysis of properties: deadlock, livelock, fairness, liveness, etc. We will consider: Modelling, Analysis and Implementation (in Java)

  28. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Outline Topic 1: Introduction General Background On Concurrency Examples Implementation Topic 2: Modelling Processes with FSP - I Labelled Transition Systems FSP: Basic Elements Summary

  29. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Example: Mutual Exclusion Design a basic control protocol to ensure two processes never execute some “critical” region of program together. Is it OK?

  30. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Example: The Firing Squad Synchronisation Problem • On the command “FIRE”, the chain of control units must mutually synchronise to fire each gun simultaneously. • The control units must be identical and work for any size chain of artillery.

  31. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Example: The Firing Squad Synchronisation Problem • On the command “FIRE”, the chain of control units must mutually synchronise to fire each gun simultaneously. • The control units must be identical and work for any size chain of artillery.

  32. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Example: The Firing Squad Synchronisation Problem • On the command “FIRE”, the chain of control units must mutually synchronise to fire each gun simultaneously. • The control units must be identical and work for any size chain of artillery.

  33. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Modelling Concurrency

  34. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Modelling Concurrency • a ‘simplified’ representation of the real world?

  35. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Modelling Concurrency • a ‘simplified’ representation of the real world? • modelling before implementing

  36. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Modelling Concurrency • a ‘simplified’ representation of the real world? • modelling before implementing • model captures interesting aspects: concurrency • animation • analysis

  37. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Modelling Concurrency • a ‘simplified’ representation of the real world? • modelling before implementing • model captures interesting aspects: concurrency • animation • analysis • Model Description Language: FSP ( Finite State Processes ) • Models: LTS ( Labelled Transition Systems )

  38. Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Example: Cruise Control System • Does it do what we expect? Is it safe?

Recommend


More recommend