Assignment 2

Implement your algorithm in Java

Implement your concurrent algorithm in Java. You should also implement a sequential version or a coarse grained locking version of your algorithm for comparison purposes.

Test your algorithm

Test your algorithm.

Write a report

Write a report. You may start your report with briefly reviewing your algorithm. In the report, also discuss your implementation. For example, describe how the problem was broken down into classes, discuss the relationship amongst classes, motivate the choice of the key data structures used, but most importantly discuss those parts related to concurrency, like where you use synchronized or volatile, classes of the concurrency packages used, threads, etc. Also describe your tests and the results you obtained. Refrain from including large chunks of code. You may include small snippets.

The report should be roughly between 3 and 8 pages. These bounds are not absolute (but one page is definitely not enough and 20 pages is too much).

As the audience of your report, consider your fellow students in the course. myassignment2.pdf contains a sample.

You may want to try the package Listings for typesetting code.

Email your code

Email your code to the instructor.