{"repository":{"description":"A barbershop consists of a waiting room with N chairs and the barber room containing the barber chairs. If there are no customers to be served, the barber goes to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer leaves the shop (without waiting for service). If the barber is busy but chairs are available, then the customer sits in one of the free chairs. If the barber is asleep, the customer wakes up the barber.  Each customer and barber are different threads. Semaphores are used. Priority amongst customers is also incorporated. Let us say that there are two groups: staff and student. A waiting student customer has priority over the waiting staff customer (because the students are supposed to be busy !!!). Therefore, a barber attends to the waiting student customer after finishing the work on present customer. The program runs both with priority and without priority. In priority approach starvation is avoided by enforcing the condition of “each staff can allow maximum of 5 students to overtake”. ","stargazers":0,"language":"C","owner":"venkatesh5789","has_wiki":true,"pushed_at":"2013-01-20T11:18:04-08:00","forks":0,"has_issues":true,"fork":false,"size":108,"open_issues":0,"has_downloads":true,"created_at":"2013-01-20T10:46:20-08:00","watchers":0,"private":false},"actor_attributes":{"type":"User","email":"da39a3ee5e6b4b0d3255bfef95601890afd80709"},"url":"https://github.com/venkatesh5789/sleepingbarbers/compare/master"}