《操做系统教程》第5版-Chapter3-2-同步通讯与死锁-核心PV题

生产者-消费者问题算法   semaphore mutex=1; semaphore empty=n; semaphore full=0; producer(){ while(1){ produce item; P(empty); P(mutex); add item to buffer; V(mutex);
相关文章
相关标签/搜索