Homework 12: Parallel Programming

For some of you, this will be an introduction to the parallel world that many think is the future of programming. For the rest, this may be second nature.

This is a very basic task to whet your appetite. You must write a program that does the following:

In other words, you will create a pipeline of N threads. The main thread will feed in numbers to the first thread; it will add 1 to each number and pass them to the second thread; it will add 2 to each number and pass them on, and so on, until the last thread gets the final sums and displays them.

You can use this as an excuse to check out the parallel programming features in your favorite programming language, or you can give it a try in some of the following languages that have parallel programming features:

Bring your solution to our March meeting.

Feel free to discuss the problem or any other topics you are interested in on our mailing list (accessible via our Meetup Group).

Provided Solutions

Frank W.

Kris W.

Bill R.