操作系统原理培训课件.ppt

5、典型同步问题 singal(full); } Void get(item nexc){ while(count==0){wait(full);} nextc=buffer[out]; out=(out+1)%N; count--; 5、典型同步问题 singal(empty); } { In=out=count=0;empty=N;full=0; } 5、典型同步问题 void producer(){ while(true){ nextp=produce(); put(nextp); } } 5、典型同步问题 void comsumer(){ while(true){ get(nextc); comsum(nextc);

文档评论(0)

1亿VIP精品文档

相关文档