操作系统第2章-习题PPT课件

上传人:资****亨 文档编号:130546832 上传时间:2020-04-28 格式:PPT 页数:9 大小:384KB
返回 下载 相关 举报
操作系统第2章-习题PPT课件_第1页
第1页 / 共9页
操作系统第2章-习题PPT课件_第2页
第2页 / 共9页
操作系统第2章-习题PPT课件_第3页
第3页 / 共9页
操作系统第2章-习题PPT课件_第4页
第4页 / 共9页
操作系统第2章-习题PPT课件_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《操作系统第2章-习题PPT课件》由会员分享,可在线阅读,更多相关《操作系统第2章-习题PPT课件(9页珍藏版)》请在金锄头文库上搜索。

1、 2 试画出下面四条语句的前趋图 S1 a x yS2 b z 1S3 c a bS4 w c 1 图2 2题四条语句的前趋关系 26 试修改下面生产者 消费者问题解法中的错误 Varmutex empty full semaphore 1 n 0 buffer array 0 n 1 ofitem in out integer 0 0 beginparbeginproducer beginrepeat produceranitemnextp wait mutex wait empty wait full wait mutex buffer in nextp in in 1modn signa

2、l mutex signal full untilfalse end consumer beginrepeatwait mutex wait full wait empty wait mutex nextc buffer out out out 1 out out 1 modn signal mutex signal empty consumertheiteminnextc untilfalse endparendend Varmutex empty full semaphore 1 n 0 buffer array 0 n 1 ofitem in out integer 0 0 beginp

3、arbeginproducer beginrepeat produceranitemnextp wait empty wait mutex buffer in nextp in in 1 modn signal mutex signal full untilfalse end consumer beginrepeatwait full wait mutex nextc buffer out out out 1 modn signal mutex signal empty consumertheiteminnextc untilfalse endparendend 27哲学家进餐问题 1 Varchopstick array 0 4 ofsemaphore 感谢亲观看此幻灯片 此课件部分内容来源于网络 如有侵权请及时联系我们删除 谢谢配合

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号