Var empty1,empty2,full1,full2:semaphore:=1,1,0,0;� begin� parbegin� process1: begin� repeat� 从磁盘读一个记录; P(empty1);� 将记录存入缓冲区1;� V(full1);� until false;� end process 2: begin� repeat� P(full1);� 从缓冲区1取出纪录; V(empty1); P(empty2);� 将记录存入缓冲区2;� V(full2);� until false;� end�process 3: begin� repeat� P(full2);� 从缓冲区2取出纪录;� V(empty2);� 打印记录;� until false;� end� parend
温馨提示:答案为网友推荐,仅供参考