* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Aug16_2010 - Computer Science
Structured programming wikipedia , lookup
Logic programming wikipedia , lookup
C Sharp (programming language) wikipedia , lookup
Java performance wikipedia , lookup
Go (programming language) wikipedia , lookup
Join-pattern wikipedia , lookup
Operational transformation wikipedia , lookup
CSCI 6900: Design, Implementation, and Verification of Concurrent Software Eileen Kraemer August 16th, 2010 The University of Georgia 1 My background… at UGA since 1998 except for a one-year sabbatical at Michigan State (2007-2008) dept. head since July of 2008 professor at Washington University in St. Louis (1995-1998) grad student in the College of Computing at Georgia Tech (19891995) worked in industry (banking software) and taught part-time at (Oglethorpe University) (1986-1989) taught high school science (Biology, Chemistry, Physics), while attending Polytechnic University (Farmingdale, NY and Brooklyn, NY) for MS in CS (1980-1985) undergrad degree in Biology, Hofstra University, Hempstead, NY (1976-1980) 2 My research interests Concurrent Software <> Cognitive Psychology Designing, implementing and debugging concurrent software are difficult tasks. How do people think about concurrent systems and software? What do they find difficult? What is easy? What strategies do expert/ successful programmers employ? Can these strategies be successfully taught to and used by less experience / less successful programmers? 3 Concurrent Software <> Cognitive Psychology, cont’d. What types of tools and techniques can be developed to help people be more successful in: specifying concurrent software? modeling concurrent software? implementing concurrent software? testing concurrent software? debugging concurrent software? 4 Other research interests & projects Smartphone Intervention for Pediatric Transplant patients Evaluation of web site effectiveness User interfaces for biological databases 5 About the course … Mondays, 2:30 – 3:20 in Boyd 306 Student presentations Tues/Thurs: 2:00 -3:15 in Dawson 379 EK will lecture &/or demo Course website: www.cs.uga.edu/~eileen/6900 Details to appear soon 6 What you will be expected to do Read papers (10-20) Present papers (1- 2) Read textbook Design concurrent software Use and create models of concurrent software (FSP, etc.) Implement concurrent software (Java, C++/Pthreads/Ace wrappers) Verify concurrent software download & install LTSA tool and demo programs Install and use other software, as needed 7 Book Concurrency: State Models & Java Programs, 2nd Edition Jeff Magee & Jeff Kramer WILEY 8 The textbook has a website: www.doc.ic.ac.uk/~jnm/book/ 9 Concurrency State Models and Java Programs Jeff Magee and Jeff Kramer 10 What is a Concurrent Program? A sequential program has a single thread of control. A concurrent program has multiple threads of control allowing it perform multiple computations in parallel and to control multiple external activities that occur at the same time. 11 Concurrent and Distributed Software? Interacting, concurrent software components of a system: single machine -> shared memory interactions multiple machines -> network interactions 12 Why Concurrent Programming? Performance gain from multiprocessing hardware parallelism. Increased application throughput an I/O call need only block one thread. Increased application responsiveness high priority thread for user requests. More appropriate structure for programs that interact with the environment, control multiple activities and handle multiple events. 13 Do I need to know about concurrent programming? Concurrency is widespread but error prone. Therac - 25 computerised radiation therapy machine Concurrent programming errors contributed to accidents causing deaths and serious injuries. Mars Rover Problems with interaction between concurrent tasks caused periodic software resets reducing availability for exploration. 14 a Cruise Control System When the car ignition is switched on and the on button is pressed, the current speed is recorded and the system is enabled: it maintains the speed of the car at the recorded setting. buttons Is the system safe? Pressing the brake, accelerator or off button disables the system. Pressing resume re-enables the system. Would testing be sufficient to discover all errors? 15 models A model is a simplified representation of the real world. Engineers use models to gain confidence in the adequacy and validity of a proposed design. focus on an aspect of interest - concurrency animate model to visualise a behaviour mechanical verification of properties (safety & progress) Models are described using state machines, known as Labelled Transition Systems LTS. These are described textually as finite state processes (FSP) and displayed and analysed by the LTSA analysis tool. 16 modeling the Cruise Control System LTSA Animator to step through system actions and events. eng ineOn 0 1 eng ineOff speed LTS of the process that monitors speed. Later chapters will explain how to construct models such as this so as to perform animation and verification. 17 programming practice in Java Java is widely available, generally accepted and portable provides sound set of concurrency features Hence Java is used for all the illustrative examples, the demonstrations and the exercises. Later chapters will explain how to construct Java programs such as the Cruise Control System. “Toy” problems are also used as they exemplify particular aspects of concurrent programming problems! 18 course objective This course is intended to provide a sound understanding of the concepts, models and practice involved in designing concurrent software. The emphasis on principles and concepts provides a thorough understanding of both the problems and the solution techniques. Modeling provides insight into concurrent behavior and aids reasoning about particular designs. Concurrent programming in Java provides the programming practice and experience. 19 Course Outline 2. Processes and Threads 3. Concurrent Execution 4. Shared Objects & Interference 5. Monitors & Condition Synchronization 6. Deadlock 7. Safety and Liveness Properties 8. Model-based Design Advanced topics … 9. Dynamic systems The main basic Concepts Models Practice 12. Timed Systems 10. Message Passing 13. Program Verification 11. Concurrent Software Architectures 14. Logical Properties 20 Summary Concepts we adopt a model-based approach for the design and construction of concurrent programs Models we use finite state models to represent concurrent behavior. Practice we use Java for constructing concurrent programs. Examples are used to illustrate the concepts, models and demonstration programs. 21