操作系统第2章-习题.ppt
《操作系统第2章-习题.ppt》由会员分享,可在线阅读,更多相关《操作系统第2章-习题.ppt(8页珍藏版)》请在装配图网上搜索。
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 signal 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 beginparbeginproducer 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- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 操作系统 习题
装配图网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文