- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Lecture 13Chapter 7 Deadlocks.ppt
* * * * * Principles of Computer Operating Systems Modified from Silberschatz, Galvin and Gagne Lecture 13Chapter 7: Deadlocks Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Chapter Objectives To develop a description of deadlocks, which prevent sets of concurrent processes from completing their tasks To present a number of different methods for preventing or avoiding deadlocks in a computer system The Deadlock Problem A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set Example System has 2 disk drives P1 and P2 each hold one disk drive and each needs another one Example semaphores A and B, initialized to 1 P0 P1 wait (A); wait(B) wait (B); wait(A) Bridge Crossing Example Traffic only in one direction Each section of a bridge can be viewed as a resource If a deadlock occurs, it can be resolved if one car backs up preempt resources and rollback Several cars may have to be backed up if a deadlock occurs Starvation is possible Note : Most OSes do not prevent or deal with deadlocks Illustration of a deadlock A deadlock is a permanent blocking of a set of threads a deadlock can happen while threads/processes are competing for system resources or communicating with each other Tanenbaum, A. S. (2001) Modern Operating Systems (2nd Edition). Deadlock Principles Happy scheduling 1 Illustration of a deadlock — scheduling path 1 ? Q executes everything before P can ever get A when P is ready, resources A and B are free and P can proceed Process Q ... Get B ... Get A ... Release B ... Release A ... A required B required B required A required Process P ... Get A ... Get B ... Release A ... Release B ... Deadlock Principles Happy scheduling 2 Illustration of a deadlock — scheduling path 2 ? Q gets B and A, then P is scheduled; P wants A but is b
您可能关注的文档
- CORPORATE GOVERNANCE.ppt
- COSOSIMO Workshop Outbrief14 March 2006.ppt
- CPEEE 428, CPE 528 Session #13.ppt
- CPSC 614 Computer Architecture Lec 18 – Storage.ppt
- Creative Problem SolvingChapter 13.ppt
- Cryptography and Network SecurityChapter 16.ppt
- CS155a E-Commerce.ppt
- CS510 Concurrent Systems Class 13.ppt
- CS533 Concepts of Operating SystemsClass 14.ppt
- CSE 160 – Lecture 16.ppt
- Lecture 13Examples of Memory Management.ppt
- Lecture 13Heteroskedasticity.ppt
- Lecture 13Mobile Data Services inWireless Environments.ppt
- Lecture 13Relational Decomposition and Relational Algebra.ppt
- Lecture 14 chi-square test, P-value.ppt
- Lecture 14 Setting Complaints.ppt
- Lecture 14 Thur., Feb. 26.ppt
- Lecture 14 VHDL Modeling of Sequential Machines.ppt
- Lecture 14-15 Planetary magnetospheres.ppt
- Lecture 14Heteroskedasticityand Serial Correlation.ppt
文档评论(0)