皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
桌子上有一个可以装N个水果的果盘,爸爸往盘子中放水果(苹果或桔子),儿子从盘子中拿桔子,女儿从盘子中拿苹果,同一时间只能有一个人对水果盘进行操作。 现在有3个进程,dad,daughter,son,使用信号量empty=N,orange=0,apple=0,mutex=1 请用wait(empty), signal(empty) ,wait(orange) 等语句填空; 不要填分号,只填信号量操作即可 Dad(){ while(1){ [填空1] [填空2] //果盘互斥 将水果放入盘子; [填空3] if(放入的是桔子) [填空4] ; else [填空5] ; } } Son(){ while(1){ [填空6] ; [填空7] ; 从盘子中取桔子; [填空8]; [填空9] ; 吃桔子 } } Daughter(){ while(1){ [填空10] ; [填空11]; 从盘子中取苹果; [填空12]; [填空13]; 吃苹果 } }
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【多选题】下列论述正确的是( )。
A.
上极限偏差等于上极限尺寸减公称尺寸
B.
配合是指公称尺寸相同的、相互结合的孔和轴公差带之间的关系。
C.
测量公称尺寸为20mm,公差为0.021mm的零件,其实际尺寸为20.012mm,则该零件尺寸合格。
D.
间隙配合中孔的公称尺寸大于轴的公称尺寸。
【判断题】1993年国家旅游部门在广泛征求意见后,将“马踏飞燕”确定为中国旅游业的标识。P11
A.
正确
B.
错误
【单选题】34( ) 年国家旅游部门在广泛征求意见后,将“马踏飞燕”确定为中国旅游业的标识。
A.
1980
B.
1983
C.
1985
D.
1987
【单选题】()年国家旅游部门在广泛征求意见后,将“马踏飞燕”确定为中国旅游业的标识
A.
1980
B.
1983
C.
1985
D.
1987
【多选题】Location problems are, in general, very difficult problems. The complexity increases with
A.
the number of customers
B.
the number of products
C.
the number of potential locations for warehouses
D.
the number of warehouses located
【单选题】The general then added, "The only reasonable solution to the sort of problems caused by the current unstable political situation is one of diplomacy and economic measures and not the use of military f...
A.
economic and diplomatic action
B.
diplomatic and economic action if military force fails
C.
only diplomatic action
D.
military actions in response to political problems
【单选题】配合是指 相同的、相互结合的孔和轴公差带之间的关系。
A.
公称尺寸
B.
极限尺寸
C.
作用尺寸
D.
实体尺寸
【判断题】1985 年国家旅游部门在广泛征求意见后,将“马踏飞燕”确定为中国旅游业的标志。
A.
正确
B.
错误
【单选题】配合是指 相同的、相互结合的孔和轴公差带之间的关系。
A.
极限尺寸
B.
作用尺寸
C.
公称尺寸
D.
实体尺寸
【单选题】The general manager thought of______ problems before he made the final decision.
A.
a good many
B.
a great deal of
C.
lots
D.
a plenty
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题