CSC254 - Project 2
Synchonization and Deadlock

Assigned October 23rd 2 p.m.
Due November 8th 2 p.m.


Overview

Description

This project will make use of two classes we have seen before in the Java API:

Also use the Utilities.java class, it contains methods which simplify the processes of talking to the user in Java and allows easy Thread sleeping.

Part 1

Do Exploration Project 4.2 from the book on page 119. You must hand in the answers to the questions in parts a and b, as well as your modified Philosopher.java program for part b.

Part 2

Do Programming Project 4.5 from the book on page 118. You will need to write three classes besides implementing the BoundedBuffer.java program from Figure 4.17, as detailed below.

Coding

As a user, let the program run for at least one minute, recording the output from BoundedBuffer when the threads are waiting. Test out your BufferAccess program with varying values for P, C and lambda, with lambda between 2 and 20. Report on your results and the effect of different inputs on the waiting of your Producers and Consumers.

What to Hand In

Log in to the cs.centenary.edu server. Create a subdirectory from your csc254 directory called project2 and make it read, write and execute privileges for only the owner (chmod 700).

You must hand in your files for:

along with the provided file:
© Mark Goadrich 2007, Centenary College of Louisiana