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.
- Think of some general kind of application that may benefit
by using read-write locks around some sort of collection.
- Create a wrapper class for an associated collection class.
- 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.
- Measure the elapsed time for you application using 2, 4, 8, 16
threads using ReentrantReadWriteLocks.
- Remeasure using the WriterPreference locks discussed in class.
- Remeasure using any third implementation (we will sketch out
several in class).
- Remeasure using a concurrent j.u.c collection, if applicable.
- 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