Comp 430 Project #3: Dining Philosophers Android App
Tentative Due Date: Friday Week 8
Purpose
The goal of this project is to create an app that implements a solution to the Dining
Philosopher's Problem that ensures mutual exclusion and avoids deadlock.
To document this, your program should produce a trace or log of all
events as they occur, including when the various philosophers request
forks (state that they are hungry), when they acquire forks, when they
eat, when they think, and so on. When the program is finished, it
should produce a summary of how long each philosopher spent thinking,
hungry (but not eating), and eating.
Some things to think about:
- Users should be allowed to click on philosophers to indicate when
they want to start eating.
- When a user clicks on a philosopher, should they be allowed to wait
to eat (stay hungry) if they cannot immediately eat, or should they just
return to thinking?
- What type of messages do you want to send (or toast) to the user when the
philosopher starts/stops eating, or can't eat?
- Do you want to let the user click on a philosopher to stop eating,
or should they enter in a specified amount of time to eat when they
click to let the user start eating?
- How will you indicate different states (thinking, eating, hungry) of
your philosophers?
- Which strategy will your app use for solving the Dining
Philosopher's Problem? Will you implement several strategies and let
the use pick one?
Documentation
Your program should be well-documented including the same kinds of
comments we have required for other projects at K College.
You should also create well-formatted external documentation that
describes the Dining Philosopher's Problem, the approach(es) you took to
implementing it, and whether and how your solution addresses each of the
classic issues of cooperating processes (e.g., mutual exclusion,
deadlock). (This could go in the README.)
Variations
If you have an idea for a variation on this project, please run it by
your instructor first.
Handing In
Your submission should take the form of a single tarred directory as described
below. That directory should contain:
- All files for your project.
- A plain text README file documenting your project. This
file should include your name(s), a short description of the project,
instructions for running the project, a description of any known bugs,
and anything else I need to know to evaluate your submission.
Creating a tar file: To create a single .tar file
that includes your text file and files for your programming project,
move all of the files you plan to submit into a directory that includes
your name, such as pcutter_pp3. Then, in the directory above
pcutter_pp3, I would type:
tar -cvf pcutter_pp3.tar pcutter_pp3/
This page is maintained by Pam Cutter pcutter{at}kzoo{dot}edu.