1. INTRODUCTION:
The programming project is an important aspect of the course since
it will give students the opportunity to immediately apply the techniques
being taught. This project is intended to reinforce the concepts learned
in chapters 6, 7, and 8. From these chapters, you should have learned the
concept of process management of an operating system. A goal of process
management is to allow cooperating processes (or threads) to share a logical
address space. However, concurrent access to shared data may result in
data inconsistency and other issues such as deadlocks and starvations.
Your assignment is to study a mechanism that ensures data consistency allowing
concurrently execution of cooperating processes or threads.
You may choose to work on any classical (well-known) problems discussed in
section 7.6, problems 7.10, 7.11, or any other synchronization problems that you
have known, or from your own discovery when using synchronization tools, e.g.,
semaphores, monitor, Java synchronization, etc.
2. ASSIGNMENT DESCRIPTION:
Your assignment is to (1) describe a problem mentioned above, (2) propose a
solution, and then (3) implement the solution in a computer programming language
on an operating system. Since this semester we have a "very diverse
computer science background" class, you may choose any programming language
or any operating system. You must arrange enough time and instructions to
the instructor or T.A. to examine your work if the chosen operating system is
not a UNIX or Windows system. There is a "default" project for
you to choose if you would not like to create your own project. Refer to
this http link for the default project: http://classweb.gmu.edu/tnguy1/cs571s01/defaultproject1.htm.
For more information on threads and Java thread, please follow this link: http://www.ibiblio.org/javafaq/course/week11/index.html
3.
DELIVERABLES:
The deliverables should include a hard copy final report and a floppy disk
(in Windows format) containing the final report, your program code and
instructions for the instructor or T.A. to install and test your program.
The final report should follow this outline:
4. DUE DATE:
Thursday, March 30, 2001. Please submit your project to the T.A.
DEFAULT PROGRAMMING PROJECT #1 :
The purpose of this project is to give you some practical experience
in the use of synchronization primitive.
ADVANCE PREPARATION:
You should complete the following steps before working on this project:
The producer is to generate the sequence of items 1, 2, ... , 100, and
insert them into the buffer by this schedule:
5:delay(15):10:delay(15):15:delay(15):20:delay(15):50
Where the numbers indicate how many items are inserted into the buffer
and the delays are in seconds.
The consumer is to consume items according to the following schedule:
delay(15):5:delay(15):20:delay(15):15:delay(15):60
The producer completes when all 100 items have been inserted into the buffer. The consumer completes when it has made 100 retrievals and printed them. The Producer-Consumer (PC) system completes when both P and C complete.