四川大学:《操作系统 Operating System》课程教学资源(PPT课件讲稿)Chapter 6 Concurrency - Deadlock(死锁)and Starvation(饥饿)

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

61.0 Intro(3/6) rogress Release 绕 and Release Required et⊥ 3 B deadlock inevitable Required Get B 4 Fatal Region P has a, Q has B Deadlock!! Progress Get A Get B Release A Release B of p both Pand Q want resource A S=both Pand Q want resource B Required deadlock-inevitable region B Required possible progress path of P and Q Horizontal portion of path indicates Pis executing and Q is waiting Vertical portion of path indicates Pis executing and Q is waiting Figure 6.2 Example of Deadlock
6.1.0 Intro(3/6) 7 Fatal Region P has A, Q has B Deadlock!!

61.0 Intro(4/6) Progress f Q Release Release Required Get A and Required Get B Progress Geta Release A Get B Release B =both P Q want resource A A Required B Required both P and Q want resource B possible progress path of P and Q Horizontal portion of path indicates P is executing and Q is waiting Vertical portion of path indicates P is executing and Q is waiting Figure 6.3 Example of No Deadlock [BACO03]
6.1.0 Intro(4/6) 8

6.1.0 Intro(5/6) Resources categories(资源的分类) Reusable resources(可重用资源) Consumable resources(可消费资源)
6.1.0 Intro(5/6) • Resources Categories(资源的分类) • Reusable Resources(可重用资源) • Consumable Resources(可消费资源) 9

6.1.0 Intro(6/6) System Model Process must request a resource before using Process must release the resource when done Deadlock A set of processes is in a deadlock state when every process in the set is waiting for an event that can only be caused by another process in the set
6.1.0 Intro(6/6) • System Model • Process must request a resource before using • Process must release the resource when done • Deadlock • A set of processes is in a deadlock state when every process in the set is waiting for an event that can only be caused by another process in the set. 10

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 11
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《操作系统》课程教学资源(PPT课件讲稿)实时调度 Real-Time Scheduling.ppt
- 白城师范学院:《数据库系统概论 An Introduction to Database System》课程教学资源(PPT课件讲稿)第二章 关系数据库(2.1-2.3).ppt
- 《计算机算法设计与分析》课程教学资源(PPT课件)第8章回溯法.ppt
- 清华大学出版社:《计算机应用基础实例教程》课程教学资源(PPT课件讲稿,第二版,共七章,主编:吴霞,制作:李晓新).ppt
- 中国科学技术大学:《计算机体系结构》课程教学资源(PPT课件讲稿)绪论、第1章 量化设计与分析基础(主讲:周学海).ppt
- 北京大学:烟花算法的变异算子(PPT讲稿)Mutation Operators of Fireworks Algorithm.pptx
- Introduction to Text Mining 文本挖掘.pptx
- 《Managing XML and Semistructured Data》教学资源(PPT课件讲稿)Part 04 Compressing XML Data.ppt
- 《JAVA面向对象入门技术》教程教学资源(PPT课件讲稿)第二章 Java语言基础.ppt
- 北京大学:《项目成本管理》课程教学资源(PPT课件讲稿)项目范围计划(主讲:周立新).ppt
- 山东大学:《网站设计与建设》课程教学资源(PPT课件讲稿)第三部分 网站设计技术 第20章 MySQL数据库.ppt
- 程序设计工具(PPT课件讲稿)Software Program Tool.ppt
- 《Java Web应用开发技术与案例教程》教学资源(PPT讲稿)第7章 Java Web常用开发模式与案例.ppt
- 《面向对象程序设计》课程教学大纲(适用专业:信息与计算科学).pdf
- 《编译技术》课程教学资源(PPT课件讲稿)第六章 运行时存储空间的组织和管理.ppt
- 沈阳理工大学:《计算机网络》课程教学资源(PPT课件讲稿)第2章 IP技术.ppt
- 香港科技大学:Record Linkage for Big Data.pptx
- 中国科技大学计算机系:《黑客反向工程》课程教学资源(PPT课件讲稿)黑客反向工程导论(陈凯明).ppt
- 《单片机应用技术》课程PPT教学课件(C语言版)第10章 单片机测控接口.ppt
- 《计算机操作系统》课程教学资源(PPT课件讲稿)第四章 存储器管理.ppt
- 《网络搜索和挖掘关键技术 Web Search and Mining》课程教学资源(PPT讲稿)Lecture 12 Language Models.ppt
- Progress of Concurrent Objects with Partial Methods.pptx
- 《编译原理与技术》课程教学资源(PPT课件讲稿)代码优化.ppt
- 《单片机应用技术》课程PPT教学课件(C语言版)第3章 MCS-51指令系统及汇编程序设计.ppt
- 《数据结构》课程教学资源(PPT课件讲稿)第八章 图.ppt
- 同济大学:《大数据分析与数据挖掘 Big Data Analysis and Mining》课程教学资源(PPT课件讲稿)Platforms for Big Data Mining(主讲:饶卫雄).ppt
- 《计算机网络》课程教学资源(PPT讲稿)网络安全(访问控制、加密、防火墙).ppt
- 水平集方法与图像分割 Level set method and image segmentation.pptx
- 北京师范大学:《计算机文化基础》课程教学资源(PPT课件讲稿)08 网页制作基础知识(赵国庆).ppt
- 《C语言程序设计》课程教学资源(PPT讲稿)第1章 程序设计和C语言.pptx
- 《计算机组装与维护》课程教学资源(PPT课件讲稿)第十一章 计算机数据恢复技术.ppt
- 贵州大学:计算机应用基础(PPT课件讲稿)计算机基础知识.pdf
- 《计算导论与程序设计》课程教学资源(PPT课件讲稿)Chap 5 函数.ppt
- 《计算机网络 Computer Networking》课程教学资源(PPT课件讲稿)Chapter 08 Network Security.ppt
- 《计算机网络与通信》课程教学资源(PPT课件)Chapter 8 传输层.ppt
- 《数据结构与算法分析》课程教学资源(PPT讲稿)Lists, Stacks and Queues.ppt
- 沈阳理工大学:《Visual Basic 6.0程序设计》课程教学资源(PPT课件讲稿)第三章 VB基本语言.ppt
- 南京大学:《计算机网络 Computer Networks》课程教学资源(PPT课件讲稿)简介、第一章 引论(谭晓阳).ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)第一章 绪论(主讲:陈香兰).ppt
- 西华大学:《电子商务概论》课程教学资源(PPT课件讲稿)第4章 电子商务的安全问题.ppt