Ithaca College Logo Ithaca College Home Blue Header

Ithaca College, Ithaca, New York
CS 310 heading

Due: Monday, 31 October

Project 3

References:

The Problem

Since Christmas (and Christmas break) is approaching, you are to coordinate Santa, his reindeer, and his elves to prepare for the big Christmas eve trip. In particular, you must solve the following problem in a program on the linux server using the pthread library.

Santa Claus sleeps in his shop at the North Pole and can only be awakened by either

  1. all nine reindeer being back from their vacation in the South Pacific, or
  2. by some of the elves having difficulties making toys.
To allow Santa to get some sleep, the elves can only wake him when three of them have problems. When three elves are having their problems solved, any other elves wishing to visit Santa must wait for those elves to return. If Santa wakes up to find three elves waiting at his shopÕs door, along with the last reindeer having come back from the tropics, Santa has decided that the elves can wait until after Christmas, because it is more important to get his sleigh ready. (It is assumed that the reindeer donÕt want to leave the tropics, and therefore they stay there until the last possible moment.) The last reindeer to arrive must get Santa while the others wait in a warming hut before being harnessed to the sleigh.

Requirements

Documentation

Requirements.

  1. I will compile and run your solution on the linux server. I will use gcc for the compiler.
  2. You must hand in a hard copy of all code that you use in your solution.


Revision History

Date Revision
16 September Posted Project


Last updated on 12 Nov 2005 by John Barr