文件名称:daima
介绍说明--下载内容均来自于网络,请自行研究使用
睡眠理发师问题源码,理发店有一位理发师,一把理发椅和n把用来等候理发的椅子。如果没有顾客,则理发师在理发椅上睡觉,顾客理来时,如理发师闲则理发,否则如有空椅则坐等,没有空椅则离开,编写程序实现理发师和顾客程序,实现进程控制,要求不能出现竞争。-This is a classic problem of IPC, there is a barber barber shop, a barber chair and n barber chair waiting to be used. If there is no customer, the barber in the barber chair to sleep, to manage the customer, such as when the barber barber idle, otherwise as empty chairs are waiting, you leave no empty chairs, barbers and customers realize programming procedures to achieve process control requirements can not compete.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
daima.cpp