Top Classical OS Problems

1) Sleeping Barber Problem
"The barber shop has a barber, a barber chair, and n chairs for waiting customers. If there are no customer, the barber sit down in the barber chair and falls asleep. When a customer arrives, he/she wakes up the sleeping barber. If a customer arrives while the barber is cutting customer's hair, he/she sit down and wait if there are any empty chairs for waiting customers. If there are no empty chairs, the customer must give up and leave the shop."

2) Dining Philosopers problem
"There are N philosphers sitting around a circular table eating spaghetti and discussing philosphy. The problem is that each philosopher needs 2 forks to eat, and there are only N forks, one between each 2 philosophers. Algorithm should insures that no philosopher starves and the maximum number of philosophers can eat at once."

3) Drinking Philosopers problem
"In the drinking philosophers problem, for each process there is a maximum set of resources that it can request, and each time a process wishes to do some work, it may request an arbitrary subset of its maximum set."

4) Dining Cryptographers Problem
" Three cryptographers are sitting down to dinner at their favorite three-star restaurant. Their waiter informs them that arrangements have been made with the maitre d'hotel for the bill to be paid anonymously. One of the cryptographers might be paying for the dinner, or it might have been NSA (U.S. National Security Agency). The three cryptographers respect each other's right to make an anonymous payment, but they wonder if NSA is paying. They resolve their uncertainty fairly by solving this problem"

5) Cigarette Smokers Problem
"Consider a system with three smoker processes and one agent process. Each smoker continuously rolls a cigarette and then smokes it. But to roll and smoke a cigarette, the smoker needs three ingredients: tobacco, paper, and matches. One of the smoker processes has paper, another has tobacco, and the third has matches. The agent has an infinite supply of all three materials. The agent places two of the ingredients on the table. The smoker who has the remaining ingredient then makes and smokes a cigarette, signaling the agent on completion. The agent then puts out another two of the three ingredients, and the cycle repeats. Write a program to synchronize the agent and the smokers"