CS 110, Architecture and Operating Systems
Dining Philosophers Project
Version 1.00
Due March 1, 2002, at 9 PM
30 Points for Basic Project
10 Points for Demo

Introduction

You are to implement a robust solution to the Dining Philosophers problem. Your solution is to work in the following way:

While Dining Philosophers is a neat problem, as written no one knows what the heck is going on. Thus you MUST have another process, the waiter, who monitors the philosophers' table. Because he wants to get a good tip, every 2 seconds the Waiter looks at the table and determines what is going on. He prints this data in a horizontal ``Santillo'' format:

Termination

When all the philosophers are done eating the Waiter prints out one more time and the program dies.

Input Parameters

There are 4 parameters to the program (in order). If all parameters are omitted, default values must be used.

These parameters are provided as command line parameters and you will get ALL or NONE but you must check for valid values (i.e., all values must be positive).

Implementation Notes:

Stuff You Need to Turn In or Submit:

What to Turn In:

Where to Turn In:

To the plastic bin outside Geoff's office. Be sure to use the bin marked "homework," not the one marked "abstracts."

What to Submit:

Your full implementation, all the commented code of your running implementation, and your Makefile (yes, this is more than the hard copy that you turn in). We should be able to build and test your program from what you submit.

References:

Notes:

If you decide to NOT implement shared memory with a dynamically sized array, then use a maximum size of 10 philosophers, but expect to lose 4 points. You MUST also indicate this choice in the documentation comments at the front of your program.

We reserve the right to change the problem statement when someone demonstrates the ambiguity of said problem statement.

As usual, if your program was invoked incorrectly (wrong number of arguments, invalid arguments, etc.) then it should produce a usage message on cerr and exit with nonzero status. The usage message should also specify the defaults for all parameters.

Last modified February 24, 2002 by geoff@cs.hmc.edu