CIS-4230/5230 Homework #3 (Barriers and Thread Pools)

Due: Friday, February 23, 2024

Modify the parallel version of the Gaussian elimination program in two different ways. First, use barriers to remove the excessive amount of thread creation/destruction that goes on in the program. Second, use a thread pool to do the same thing. You should have two totally independent files; do not try to mix these two versions! You can start with either your solution to Homework #2 as a base, or you can use my solution that I distributed earlier.

Note that my Spica library contains a ThreadPool module in C that you can use.

Next, evaluate the performance of the various versions. There are four versions to consider: the serial version (which you should use as your baseline), the parallel version you created in Homework #2 (or the one I provided), the barriers version, and the thread pool version. As before, measure their performance on a range of problem sizes from n=1000 to n=2000, computing the speed-up relative to the serial version in each case.

The normal expectation is that using barriers or thread pools will reduce the thread management overhead and give improved results. However, this would only be true if the thread management overhead is a significant factor in holding back the simple parallel version. What results do you see? Which works better: barriers or thread pools?

Submission

Submit the two different versions of gaussian.c (barriers and thread pools), along with a document that shows your findings. Pack all the files into a zip archive and submit that archive to Canvas.


Last Revised: 2024-02-14
© Copyright 2024 by Peter Chapin <peter.chapin@vermontstate.edu>