-操作系统精髓与设计原理(第五版)+课后题答案1(6)

2021-02-21 08:23

-操作系统精髓与设计原理(第五版)+课后题答案1

CHAPTER 6

CONCURRENCY: DEADLOCK AND

STARVATION

Review Questions

6.2 Mutual exclusion. Only one process may use a resource at a time. Hold

and wait. A process may hold allocated resources while awaiting assignment of others. No preemption. No resource can be forcibly removed from a process holding it.

6.3 The above three conditions, plus: Circular wait. A closed chain of

processes exists, such that each process holds at least one resource needed by the next process in the chain.

Problems

6.4 a. 0 0 0 0 0 7 5 0 6 6 2 2 2 0 0 2 0 3 2 0 b. to d. Running the banker's algorithm, we see processes can finish

in the order p1, p4, p5, p2, p3.

e. Change available to (2,0,0,0) and p3's row of "still needs" to (6,5,2,2).

Now p1, p4, p5 can finish, but with available now (4,6,9,8) neither p2 nor p3's "still needs" can be satisfied. So it is not safe to grant p3's request.

6.5 1. W = (2 1 0 0) 2. Mark P3; W = (2 1 0 0) + (0 1 2 0) = (2 2 2 0) 3. Mark P2; W = (2 2 2 0) + (2 0 0 1) = (4 2 2 1) 4. Mark P1; no deadlock detected


-操作系统精髓与设计原理(第五版)+课后题答案1(6).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:五金材料备品件项目可行性报告(2013年发改委评审通过案例范文)-

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: