Chapter 5 Mutual Exclusion and Synchronization 5.1 Principles of Concurrency ·5.2 Mutua|EXc| usion 5.3 Semaphores ·54 Monitors 5.5 Message Passing 5.6 Readers /writers problem .5. Summary
2 Chapter 5 Mutual Exclusion and Synchronization • 5.1 Principles of Concurrency • 5.2 Mutual Exclusion • 5.3 Semaphores • 5.4 Monitors • 5.5 Message Passing • 5.6 Readers/Writers Problem • 5.7 Summary
5.1 Principles of Concurrency .5.1.0 What is concurrency .5.1.1 A Simple example ·5.1.2 Race condition 5.1.3 Operating System Concerns 5.1. 4 Process Interaction 5.1.5 Requirements for Mutual Exclusion
5.1 Principles of Concurrency • 5.1.0 What is concurrency • 5.1.1 A Simple Example • 5.1.2 Race Condition • 5.1.3 Operating System Concerns • 5.1.4 Process Interaction • 5.1.5 Requirements for Mutual Exclusion 3
5.1.0 What is concurrency (1/5) Operating System design is concerned with the management of processes and threads Multiprogramming multiple processes within a uniprocessor system Multiprocessing multiple processes within a multiprocessor Distributed processing multiple processes within distributed computer systems, such as clusters
5.1.0 What is concurrency(1/5) • Operating System design is concerned with the management of processes and threads: • Multiprogramming • multiple processes within a uniprocessor system • Multiprocessing • multiple processes within a multiprocessor • Distributed Processing • multiple processes within distributed computer systems, such as clusters 4
5.1.0 What is concurrency (2/5) Concurrency The execution of two or more process simultaneously
5.1.0 What is concurrency(2/5) • Concurrency • The execution of two or more process simultaneously. 5
5.1.0 What is concurrency (3/5) Concurrent and Parallel Programming Concurren Twe Queues C~c-q「a 吴吴吴天是奚呈玉玉 uu.cs Coe -fece Facties 長菜王玉王买买是 天天吴头天玉 Concurrent: 2 queues and 1 coffee machine Parallel: 2 queues and 2 coffee machines
5.1.0 What is concurrency(3/5) • Concurrent and Parallel Programming • Concurrent: 2 queues and 1 coffee machine • Parallel: 2 queues and 2 coffee machines 6