
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Spring 2009
This assignment is yet another “classic” operating systems programming task dealing with process synchro- nization, supported by a smattering of exercises.
We are still very much within chapter 6 of SGG.
Implement a solution to the dining philosophers problem using the POSIX API. The bounded buffer code given out in class may be used as a ba- sis for your solution. Make sure to include well-placed output statements to report what’s happening in your program and the state of things at any given time — that’s how we’ll know whether your solution is working. Commit your code to /homework/cmsi387/dp.
Do the following exercises from SGG: 6.9 and 6.27. Hint: The answer to 6.27 can be found in one of the “classic papers” given out in class. Plus, name two things (for a total of four observa- tions) that may happen in incorrect critical section solutions to the dining philosophers and sleeping barber (SGG Exercise 6.39) problems. Submit your answers on hardcopy.
You will get extra credit if you also implement a solution to the sleeping barber problem (SGG Ex- ercise 6.39). Commit this to /homework/cmsi387/sb.