CS 110, Architecture and Operating Systems
Due May 3, 2002, 9 P.M.
This is a modification of
the solution to
the Basic Barbershop project
in that you are to now use Solaris or POSIX threads instead of
You also must synchronize using
mutexes and condition variables (no semaphores are allowed).
There are no changes to how the barbershop operates
from the description of the Basic Barbershop project.
Thus, this is really just a straight conversion.
What to Submit:
- Submit the code using
- Include a README file that
describes your implementation,
including your use of threads, mutexes,
and condition variables.
Be sure to address the following issues:
Your README needs to be complete and detailed!!!
- How you used thread features to handle any semaphore activity,
e.g., counting semaphores.
- Comparison of the ease of programming the Basic
Barbershop project and the Threads Barber Shop Project.
- How you used system resources, and how your program
performs (look at the following tools):
- A script of a test run using the input files
- You must specify
-lpthread as the last thing on your link
line (the ``
g++ -o foo ...'' or your program won't
work right. If you forget to do this step, you won't get any
compilation errors, but you will get mysterious failures at run
- See page 107 of the first reference below for a discussion of
libraries and header files.
Last modified April 23, 2002 by email@example.com
- In the terminal room there are copies of a Solaris threads manual.
(look at chapters 2 and 3, it is all there)
- The usual obtuse Solaris man pages for
- Chapter 3, UNIX Network Programming, W. Richard
Stevens. On reserve in the library.
- If you find other good references, please let me know.