[an error occurred while processing this directive]

Lab 2

CS 5631, Spring 2004
Due Tuesday, February 10 (20 points)

Introduction

For this lab, you will write a Queue class and test it in two ways. The code for testing your Queue class will be provided.

This lab will introduce you to problems that arise when multiple processes attempt to simultaneously work with shared data. You will first develop and test your Queue class, using a single process for testing. You should be able to get testing to show correct first-in-first-out behavior for the Queue. A simple modification to the tester will make two processes access the Queue. Then you will see problems.

For this lab, you will not have to fix the problems that arise with multiple processes. You will have several later labs that address solutions to this type of problem. For now, you just need to undersand the nature of the problem.

Developing and Testing the Queue Class

An outline of your code development is shown below. Follow the links for details on individual steps.

  1. Step 1 - Write a queue class and test it with a single process tester.

  2. Step 2 - Modify the test to use multiple processes.

What to Turn in

When you have completed the assignment, make a typescript with the items listed below.

In addition, you should turn in a brief (a paragraph or two) report discussing why the testing fails in a multiprocess environment. [an error occurred while processing this directive]