云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 操作系统教程第5版部分习题(含答案)答案

操作系统教程第5版部分习题(含答案)答案

  • 62 次阅读
  • 3 次下载
  • 2025/5/4 4:36:55

31、答:

semaphore wait,mutex1,mutex2; mutex1=mutex2=1;wait=1; int counter1,counter2; count1=count2=0; Cobegin {

Process p1 {

P(mutex1); counter1++; if (counter1==1) then P(wait); V(mutex1); 过独木桥; P(mutex1); counter1--;

if (counter1==0) then V(wait); V(mutex1); }

Process p2 {

P(mutex2); Counter2++;

if (counter2==1) then P(wait); V(mutex2); 过独木桥; P(mutex2); counter2--;

if (counter2==0) then V(wait); V(mutex2); } } coend 50、答: 答:semaphore mutex1,mutex2; semaphore empty,full,count;

mutex1=mutex2=1;count=3;empty=10;full=0; cobegin

process youngmonki(i=1,2…) {

While(true){

P(empty);

P(count); P(mutex1); 从井中取水; V(mutex1);

P(mutex2); 倒入水缸; V(mutex2); V(count); V(full); } }

process oldmonki(i=1,2…) {

while(true){

P(full); coend

P(count); P(mutex2); 从缸中取水; V(mutex2); V(count); V(empty); } }

第四章: 一、

1、试述存储管理的基本功能。 答:

(1) 存储分配; (2) 地址映射; (3) 存储保护; (4) 存储共享; (5) 存储扩充。

4、何谓地址转换(重定位)?哪些方法可以实现地址转换? 答: 逻辑地址转换为物理地址的过程称为地址转换(重定位)。 (1) 静态地址重定位; (2) 动态地址重定位; (3) 运行时链接地址重定位。

18、试述实现虚拟存储器的基本原理。有哪几种实现方法? 答:

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

31、答: semaphore wait,mutex1,mutex2; mutex1=mutex2=1;wait=1; int counter1,counter2; count1=count2=0; Cobegin { Process p1 { P(mutex1); counter1++; if (counter1==1) then P(wait); V(mutex1); 过独木桥; P(mutex1); counter1--; if (counter1==0) then V(wait); V(mutex1); } Process p2 { P(mutex2); Counter2++; if (counter2==1) then P(wait); V(mutex2)

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com