文件名称:bb
介绍说明--下载内容均来自于网络,请自行研究使用
(1)一个理发店接待室有n张椅子,工作室有1张椅子;
(2)没有顾客时,理发师睡觉;
(3)第一个顾客来到时,必须将理发师唤醒;
(4)顾客来时如果还有空座的话,他就坐在一个座位上等待;
(5)如果顾客来时没有空座位了,他就离开,不理发了;
(6)当理发师处理完所有顾客,而又没有新顾客来时,他又开始睡觉。
用条件变量实现(3张椅子)
-(1) a barber shop in the reception room with n chairs, the studio has a chair (2) no customers, the barber sleep (3) The first customer arrives, the barber must wake up (4) When customers come to, then if there is room, he sat on a seat to wait (5) If the customer does not come empty seats, and he left, not a haircut (6) When the barber finished with all customers, and and no new customers come, he began to sleep. With the condition variable implementation (three chairs)
(2)没有顾客时,理发师睡觉;
(3)第一个顾客来到时,必须将理发师唤醒;
(4)顾客来时如果还有空座的话,他就坐在一个座位上等待;
(5)如果顾客来时没有空座位了,他就离开,不理发了;
(6)当理发师处理完所有顾客,而又没有新顾客来时,他又开始睡觉。
用条件变量实现(3张椅子)
-(1) a barber shop in the reception room with n chairs, the studio has a chair (2) no customers, the barber sleep (3) The first customer arrives, the barber must wake up (4) When customers come to, then if there is room, he sat on a seat to wait (5) If the customer does not come empty seats, and he left, not a haircut (6) When the barber finished with all customers, and and no new customers come, he began to sleep. With the condition variable implementation (three chairs)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
bb.c