问题 单项选择题

读者写者问题的解决方案如下所示。 Begin ; read_count:=read_count+1; if read_count=1 then P(write); ; 读文件; ; read_count:=read_count-1; if read_count=0 then V(write); ; End; 假设信号量mutex表示对read_count共享变量所关注的互斥区进行互斥,那以,①、②、③和④处应该填写的语句是

A.P(mute、P(mute、V(mute、V(mute

B.P(mute、V(mute、P(mute、V(mute

C.V(mute、V(mute、P(mute、P(mute

D.V(mute、P(mute、V(mute、P(mute

答案

参考答案:B

问答题 简答题
多项选择题