next up previous
Next: Modifying and compiling Up: Lesson 3 -- Previous: The listing of

The synopsis of fourth.c

This program performs a multiplication of a 100 x 100 matrix by a vector using the ``bank queue'' paradigm.

First the master process broadcasts the content of the vector to all processes. Then the first pool_size - 1 rows of the matrix are sent to the workers. Each worker multiplies its row of the matrix by the vector and returns the result to the master. Upon having received the result the master sends the next row of the matrix to the worker until the whole matrix has already been handed out. In the latter case, the master sends a termination signal to the worker.

All communication operations are logged by the master on standard output. The workers log the communication operations on special log files which they open in /tmp.



Zdzislaw Meglicki
Tue Feb 28 15:07:51 EST 1995