对生产者—消费者问题的算法描述如下,请把PV操作填入下述方框中,以保证进程正确
Varempty,full,mutex:semaphore:=n,0,1;
Producer:begin
repeat
---------;
----------;
buffer(in):=m;
in:=(in+1)modn;
-------;
-------;
untilfalse
end
Consumer:begin
repeat
---------;
---------;
m:=buffer(out);
out:=(out+1)modn;
----------;
-----------;
untilfalse
end