Assignment 2

This is mainly an exercise in performance measurement. Each of the following steps has many possible variations; you are free to choose any of them.
  1. Think of some general kind of application that may benefit by using read-write locks around some sort of collection.
  2. Create a wrapper class for an associated collection class.
  3. Create a simulation of the RW collection usage with this class. For example, it may involve pure reader vs writer threads, or threads that perform reads and writes with varying probablities.
  4. Measure the elapsed time for you application using 2, 4, 8, 16 threads using ReentrantReadWriteLocks.
  5. Remeasure using the WriterPreference locks discussed in class.
  6. Remeasure using any third implementation (we will sketch out several in class).
  7. Remeasure using a concurrent j.u.c collection, if applicable.
  8. Plot your results as a set of graphs and place on a web page.

Doug Lea
Last modified: Thu Oct 18 09:20:41 EDT 2007