进程同步
摘要:生产者消费问题 信号量 semaphore full=0,empty=n; semaphore mutex = 1; item buf[n]; int in=0,out=0; produce(){ whiel(1){ wait(empty); wait(mutex); buf[in]=nextp;
阅读全文
posted @ 2019-08-05 22:06
posted @ 2019-08-05 22:06