Engr 664: Theory of Concurrent Programming
Fall Semester 1999

Assignment #3
Due Tuesday, 28 September 1999


This exercise may be done individually or in groups of two people.

Do one of the following:

You will be given instructions later on how to submit your programs.


Problem: Late Evening Study Session

A group of computer science graduate students is studying late one evening at a professor's house. The students are drinking iced tea from a large pitcher that holds several glasses of tea. The professor, who had stayed up late the night before preparing another one of his brilliant lectures, is napping in a chair. When a student wants to drink, he or she fills a glass from the pitcher, unless it is empty. If the pitcher is empty, the student waits until the professor wakes up and refills the pitcher. The behaviors of the students and the professor are specified by the following FSP processes:

    STUDENT   = (fillglass   -> study -> STUDENT).

    PROFESSOR = (fillpitcher -> nap -> PROFESSOR).

Model the behavior of the PITCHER as an FSP process and then implement it a s Java monitor.


UP to ENGR 664 assignments document?


Copyright © 1999, H. Conrad Cunningham
Last modified: Thu Oct 28 09:48:35 1999