CS 102 (Spring 2003)
Lab 3: Threads, Race Conditions, and Atomicity


Author: Ron K. Cytron
Lab Assigned Design Due
(In class)
10 AM
Implement
(In Lab)
Wednesday
Demo
(In Lab)
Wednesday
Lab Due
(In lab)
Wednesday
4 Feb 5 Feb 12 Feb 12 Feb

Overview

In this lab you will consider a class with two instance variables. The invariant for that class is as follows:

The sum of the instance variables should equal 1
This class has a method that exchanges the values of the instance variables, but the exchange is not performed in a thread-safe manner. Your job will be to introduce exclusion such that the class becomes thread-safe.

[[[ Download PC zip ]]]
Zip includes: Before starting:

Helpful resources:

What to do.

Notes:

What to turn in (after demo in your lab section)



Last modified 15:43:08 CDT 28 April 2003 by Ron K. Cytron