题目内容
下面是一个并发进程的程序代码,正确的说法是()。
semaphore x1=x2=y=1;
int c1:c2=0:
cobegin
procedure P1 procedure P2
P(x1); P(x2);
if(cl=1)P(y); if(c2=1)P(y);
V(x1); V(x2);
computer(A); computer(B);
P(x1); P(x2);
if(--c1=0)V(y); if(--c2=0)V(y);
V(x1); V(x2);
end end
coend
查看答案
搜索结果不匹配?点我反馈