Problem Set 3
Fall 2005
Due Date: Beginning of class, Friday, 7 October.
Complete the following problems from Silberschatz
- Problem 4.5 on page 147.
- Problem 4.6 on page 147.
- Problem 4.8 on page 147.
- Program a solution to the matrix multiplication problem on page 149.
Your solution must run on the linux server (IP: 147.129.16.1) using the pthread
library.
- You must hand in a well-documented hard copy of your code.
- Your program must read its data from a file. The first line of the file
will have four numbers represents the size of the two matricies. Following
lines will contain the rows of the first maxtrix followed by the rows of the
second matrix. For example, if you are multiplying a 4x3 matrix with a
3x4 matrix, the first row of the file will contain the numbers 4 3 3 4.
- You must start all children threads by passing their starting values
as parameters. Half of the children must return their results as return
values, the other half must return results by using global variables. Note
that you will not know how many threads you are creating until you read
the input file.
- You must put the source code in your home directory on the linux server.
I will compile and run your code using gcc and the pthreads library.
|
|
|
 |