Programming Assignment -- CS 7820
The following resources will help you learn the basics of Pthreads/MPI/TM
programming. After experimenting with the toy example programs,
create a non-trivial multi-threaded application with shared-memory
(using Pthreads). This is due on Friday March 7th, 2008.
Keep the following guidelines in mind when creating your
application:
- The application must be at least 400-500 lines of code (semi-colons).
- Try to solve a "real" problem, i.e., it should not be contrived and
should perform a meaningful task.
- Don't just perform a computation over an array of data that is
distributed across threads. Try to have a good mix of shared and private
data per thread, some interesting data structures (preferably with pointers),
critical sections, barriers, etc. (You need not have all of the above.)
- The number of threads must be passed as an argument to the program. If
you can, show some execution time results to demonstrate how your application
scales as the threads/cores/dataset-sizes increase.
- With the help of pthread_mutex_trylock, keep track of the percentage of
successful lock acquires
(you may have to take the average of multiple runs to draw reasonable
conclusions).
Based on this, identify if there are any obvious
bottlenecks in your application.
What you need to submit back to me (email me the tarball if that is most
convenient): the C programs (appropriately titled and commented), a
README file that provides details on the application, how to run it, and
any analysis that you may have carried out.
Resources:
Optional reading:
Spr 2007 Assignment