操作系统概念ch07-new.ppt

  1. 1、本文档共63页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
操作系统概念ch07-new

April 12, 2010 End of Chapter 7 打印机 不可共享访问 * * 不可抢占资源. 指不可能在不引起不良后果的情况下从拥有它的进程中直接抢走供其它进程使用的资源。如打印机等。 Wang Fengyu Page * Deadlock Prevention: Circular Wait (cont’d) Why it works suppose the circular wait consists of processes P1, P2, ..., Pn, P1 suppose P(i) is waiting on a resource held by P(i+1) of rank R(j) P(i+1) must have been granted all resources it needs of rank R(j) it must therefore be waiting for a resource of rank ?R(j) + 1 since a cycle of strictly increasing ranks cannot exist, there can exist no such cycle. Two related points an equivalent strategy is one where a process, when it requests a resource of a particular rank, releases all those with a higher rank typical rank orders are based on natural usage e.g., since storage devices are used “before” printers, they get smaller ranks Wang Fengyu Page * Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Wang Fengyu Page * Deadlock Avoidance Deadlock occurs because processes are waiting on each other to release resources Main idea of deadlock avoidance: before allocating request, check if system will enter a deadlock state F( resources available, resources allocated, future requests/releases ) if no: grant the request if yes: block the process request additional information about how resources are to be requested How can we find out if a system will enter a deadlock state? Wang Fengyu Page * Deadlock Avoidance: Notion of a Safe State A system is in a safe state if there exists a safe sequence A sequence P1, P2, …, Pn is a safe sequence for the current allocation if, for each Pi, the resources that Pi can still request can be satisfied by the currently available resources plus resources held by all the Pj, for ji P3, P2, P1 is a safe sequence P3’s future request can be satisfied because R3 is available P2’s future request can be satisfied by P3 yieldin

文档评论(0)

shuwkb + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档