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 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.
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.
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
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
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
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
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
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Assessment Two-hour examination
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
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I What is Concurrency? A set of sequential programs executed in abstract parallelism
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
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
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
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
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)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why use Concurrency?
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why use Concurrency? • many processes often closely models application
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
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
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)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard?
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard? • algorithm development
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard? • algorithm development • efficiency and performance
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Why is concurrency hard? • algorithm development • efficiency and performance • simulation and testing: NON DETERMINISM
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.
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)
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
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?
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.
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.
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.
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Modelling Concurrency
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Modelling Concurrency • a ‘simplified’ representation of the real world?
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I Modelling Concurrency • a ‘simplified’ representation of the real world? • modelling before implementing
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
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 )
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