定义如下:
Swait(S1,S2, ... ,Sn)
if Si>=1 and ... and Sn>=1 then
for i:=1 to n do
Si:=Si-1;
endfor
else
place the process in the waiting queue associated with the first Si found with Si<1,and set the | | program count of this process to the beginning of Swait operation | endif
Ssignal(S1,S2, ... ,Sn)
for i:=1 to n do
Si:=Si+1;
Remove all the process waiting in the queue associated with Si into the ready queue. | endfor;
这里的红字部分是什么意思????????????? |