Review Concurency 互斥/ Mutua| Exclusion 同步/ Synchronization . Implementation 软件方法: Dekker算法(两个进程(线程)实现互斥) 硬件方法:关中断、特殊指令 ·OS/开发语言所提供的机制 Semaphore · Monitor MessagePassing
Review • Concurerncy: • 互斥/Mutual Exclusion • 同步/Synchronization • Implementation • 软件方法:Dekker算法(两个进程(线程)实现互斥) • 硬件方法:关中断、特殊指令 • OS/开发语言所提供的机制 • Semaphore • Monitor • MessagePassing • ... 2
Chap6 Concurrency: Deadlock&Starvation .6.1 Principles of deadlock 6.2 Deadlock prevention 6 3 Deadlock avoidance 6.4 Deadlock detection 6.5 An Integrated Deadlock Strategy 6.6 Dining Philosophers Problem .6.7 Summary
Chap6 Concurrency: Deadlock&Starvation • 6.1 Principles of Deadlock • 6.2 Deadlock Prevention • 6.3 Deadlock Avoidance • 6.4 Deadlock Detection • 6.5 An Integrated Deadlock Strategy • 6.6 Dining Philosophers Problem • 6.7 Summary 3
6.1 Principles of Deadlock ·6.1.0 Intro 6.1.1 Reusable resources 6.1.2 Consumable resources 6. 1.3 Resource Allocation Graphs 6.1. 4 The Conditions for deadlock
6.1 Principles of Deadlock • 6.1.0 Intro • 6.1.1 Reusable Resources • 6.1.2 Consumable Resources • 6.1.3 Resource Allocation Graphs • 6.1.4 The Conditions for Deadlock 4
6.1.0 Intro(1/6) Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate with each other No efficient solution Involve conflicting (冲突) needs for resources by two or more processes
6.1.0 Intro(1/6) • Deadlock • Permanent blocking of a set of processes that either compete for system resources or communicate with each other • No efficient solution • Involve conflicting(冲突) needs for resources by two or more processes 5
61.0 Intro(2/6) cb曰曰 后曰图 EA o E s4d (a) Deadlock possible (b) Deadlock Figure 6.1 Illustration of Deadlock
6.1.0 Intro(2/6) 6