sem is a 2-part project for an operating system class to demonstrate different solutions to the producer-consumer problem. Options for number of producers and consumers, or buffer size is specified as program arguments.
Part 1 uses semaphores to communicate between threads. Part 2 uses a monitor to do so.