Be sure you have read chapter 1, and section 4 of chapter 6.
Turn in hardcopy answers (either handwritten or generated by your favorite word-processing or text-formatting program) to the following problems.
Hint: You may want to structure your answer in terms of two kinds of processes, a barber and customers, outlined thus:
barber:
while (true) {
get customer from waiting room
serve customer
}
customer:
if (waiting room full)
do nothing
else {
enter waiting room
wait to be served
}
Remember to specify initial value(s) for any semaphore(s) used in your solution.