皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【单选题】
进程P0和P1的共享变量定义及其初值为: boolean flag[2]; int turn = 0; flag[0] = FALSE; flag[1] = FA LSE; 若进程P0和P1访问临界资源的类C伪代码实现如下。 void P0( ) { // 进程 P0 while(TRUE) { flag[0]=TRUE; turn=1; while(flag[1]&&(turn==1)); 临界区; flag[0]=FALSE; } } void P1( ) { // 进程 P1 while(TRUE) { flag[1]=TRUE; turn=0; while(flag[0]&&(turn==0)); 临界区; flag[1]=FALSE; } } 则并发执行进程P0和P1时产生的情形是( )。
A.
不能保证进程互斥进入临界区,会出现“饥饿” 现象
B.
不能保证进程互斥进入临界区,不会出现“饥饿”现象
C.
能保证进程互斥进入临界区,会出现“ 饥饿”现象
D.
能保证进程互斥进入临界区,不会出现“饥饿” 现象
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【简答题】Sentence Paraphrase 2 If you are too much in a hurry, or too arrogantly proud of your own limitations, to accept as a gift to your humanity some pieces of minds of Aristotle, or Chaucer, or Einstein, ...
【简答题】That ridiculous idea was put forward by his brother.
【单选题】猜破斯芬克斯之谜的是
A.
埃斯库罗斯
B.
阿里斯托芬
C.
俄狄浦斯
D.
奥迪修斯
【单选题】Personally, I feel that the idea of moving is ridiculous.
A.
interrupting
B.
Pring interrupting
C.
offering an opinion
【单选题】A new idea is first condemned as ridiculous, ___ dismissed as trivial, until finally it becomes what everybody knows. (William James)
A.
after that
B.
then
C.
and then
D.
later
【简答题】Paraphrase the following sentences Fame turns all the lights on and while it gives power and reputation, it takes the you out of you: you must be what the public thinks you are, not what you really ar...
【简答题】The idea that we all have a sixth sense is not as ridiculous as is sometimes made out.
【简答题】互联网 人 常挂在 嘴边的 BAT 通常是 指
【判断题】. 常用防冻液的冰点为-36°C左右,沸点为108°C左右。
A.
正确
B.
错误
【单选题】She thought his idea was so ridiculous that it was ______________.
A.
unattractive
B.
insane
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题