- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
操作系统第六章课件概要1
6.1 Resources Resources (资源):需要排他性使用的对象。资源可以是硬件设备或是一组信息(一个排他使用的表格、数据库中的一条记录等)。 某些类型的资源会有若干个相同的实例。 6.1.1 Preemptable and Nonpreemptable Resources 资源的分类,是否可剥夺: Preemptable Resource(可抢占资源): it can be taken away from the process owning it with no ill effects. 可抢占资源:可以从拥有它的进程中剥夺而不会产生任何副作用的资源。 Example: Memory, CPU,…… 6.1.1 Preemptable and Nonpreemptable Resources Nonpreemptable Resource(不可抢占资源): it cannot be taken away from its current owner without causing the computation to fail. 不可抢占资源:无法在不引起相关计算失败的情况下把它从主进程处剥夺的资源。 Example: CD recorder,…… Deadlocks involve nonpreemptable resources. Preemptable and Nonpreemptable Resources Sequence of events required to use a resource: Request the resource. 请求资源:若请求不能立即满足,则等待; Use the resource. 使用资源:获得资源后,使用; Release the resource. 释放资源:使用完毕,将资源归还系统。 Assume: when a process is denied a resource request, it is put to sleep. 6.1.2 Resource Acquisition资源获取 One way of allowing user management of resources is to associate a semaphore with each resource. 哪个实例存在死锁的可能? Resource Acquisition Consider a situation with two processes, A and B, and two resources. 6.2 Introduction To Deadlocks Deadlock can be defined formally as follows: A set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause. 在一个进程集合中,若每个进程都在等待某些事件(指:释放资源)的发生,而这些事件又必须由这个进程集合中的其它进程来产生,则该进程集合处于死锁状态。 6.2.1 Conditions for Resource Deadlocks Mutual exclusion condition (互斥条件). Each resource is either currently assigned to exactly one process or is available. Hold and wait condition (占有与等待条件). Process currently holding resources that were granted earlier can request new resources. No preemption condition (不可抢占条件). Resources previously granted cannot be forcibly taken away from a process. They must be explicitly released by the process holding them. Circular wait condition (循环等待条件). There must be a circular chain of two or more processes, each of which is waiting for a resource held by the next member of the c
您可能关注的文档
最近下载
- 辽宁省社区工作者招聘笔试真题.pdf VIP
- 2_H3G-TA硬件安装调试手册(CM-02N)B2版(对外公开)华塑电池巡检仪.pdf VIP
- 超实用高考英语复习:阅读理解话题分类专练 文娱与体(含答案).docx VIP
- 民航法律法规教案【参考】.doc VIP
- 实验室生物安全管理手册(2025版).pdf VIP
- 名著导读(朝花夕拾).ppt VIP
- 民航法律法规与实务(全套课件).ppt
- 服装包装、配送、检验、验收及售后服务方案.docx VIP
- 高中英语人教版选择性必修第一册词汇表单词英译汉默写.docx VIP
- 2025年辽宁省锦州市北镇市观音阁街道招聘社区工作者考前自测高频考点模拟试题含答案解析.docx VIP
文档评论(0)