CS 4960-01 Homework 3

Due: Monday, September 15th, 2008 10:45am

Submit one text file on a CADE machine using

handin cs4960-01 hw3 <file>

In this homework, you sketch parallel programs using the book's Peril-L notation. Hand in a singe file that contains all four pseudo-programs.

Use an underscore prefix and suffix as an underline. For example, use _array_ to mean array.

Part 1

Implement an array reversal using n threads to reverse an array of n elements.

Part 2

Implement an array reversal using t threads to reverse an array of n elements (where, as always, t will be much less than n).

Part 3

Compute the average of an array of numbers, and then count the number of values in the array that are greater than the average. Use t threads to convert an array of n elements.

Part 4

Implement the program from HW1 and HW2 in Peril-L. Assume that convert and deconvert are defined. Unlike the previous homeworks, your implementation should work for t threads instead of just two.


Last update: Monday, December 1st, 2008
mflatt@cs.utah.edu