CS 3733 Operating Systems, Fall 1999 Assignment 4


Warning: This is not for the current semester.


Due Thursday, November 18, 1999

This is a short assignment. Note the due date. This assignment will overlap with two other assignments.


In this assignment you will be using the Producer-Consumer Simulator to explore problems that arise when synchronization is not handled correctly. You can read about using the simulator by looking at the users guide.

You have several options for running the simulator.

You will be running the simulator in the default configuration in which the average number of cycles in the producer and consumer loops is about 100. You will need to be able to chnage the quantum and the number of runs.

Create log files with all of the info you gather. Some of the runs you make may take a long time (depending on the speed of the hardware). You do not have to have everything in the same log file.

Start with a quantum of 25 and make 100 runs, stopping until an internal inconsistency occurs. Record the average number of cycles.

Now do the same thing with a quantum of 50, 100, 200, 400, and 800 cycles. Make a table (by hand) of the average number of cycles until internal inconsistency versus the quantum. Draw a rough (by hand) graph of this with the quantum on the x-axis. Can you draw a conclusion? What do you think the average would be when the quantum is 1600? Do an experiment and see if you are correct. Describe your results. Can you explain the result?

We will now explore external inconsistency.

Run with quantums of 25, 50 and 100 until an external inconsistency occurs. (You may have to reduce the number of runs unless you are running on a very fast machine.) Report your results. What conclusions do you draw from this? What do you think would happen with quantums of 200, 400, 800, and 1600?

Hand in your log files and the tables and graphs you created by hand.