3.5 World Donutination

Repeat the Time to Make the Donuts assignment, but rather than using separate processes and shared memory segments, use pthreads (and its associated functions) for a single process program.

Furthermore, you must add an additional command-line argument (at the front) called PC (a producer count) that controls the number of simultaneous producers to start.

Finally, your experiment should start with 30 rand 4 50 200 and discover the QS argument that gives 50% deadlock. Once you discover the 50% part, graph a few points (e.g., three) on each side of that point. Next, run and discuss four other configurations with 100, 150, 250, and 300 as the value of DDC using the 50% queue size.

You should turn in the same files as for Time to Make the Donuts, except the source code should be named a4.c.