Laboratory Exercises For Computer Science 295

Labs 3-4: Resources and Capabilities

Labs 3-4: Resources and Capabilities

Goals: This lab continues to explore mechanisms and models for parallel processing in SR.

Steps for this Lab:

  1. Review Program 2.13 in Hartley's text. This program is available as file ~walker/parallel/sr/book/Program_2.13
    Copy this program to your account, giving it the new name lab3a.sr
    Compile and run the program.
    Explain how the program works:

  2. Copy ~walker/parallel/sr/book/Program_2.15 to your account as lab3b.sr.
    Compile and run the program and explain how it works:

  3. Copy ~walker/parallel/sr/examples/matrix3 to your account as matrix3
    (This is the compiled form of ~walker/parallel/sr/examples/matrix3.sr .)
    Using the submit command, record the output of the command matrix3 3 4 5

  4. Copy ~walker/parallel/sr/examples/matrix4.sr to your account as matrix4.sr

  5. Review the version of your fractals program that defines a separate process for a block of rows. Rewrite this version so that the results array is stored as a separate global resource, and so that the process construct is moved to a separate resource. Then use a create statement to create separate threads to do this work.

Work to be turned in:

For Lab 3:

For Lab 4:


This document is available on the World Wide Web as

http://www.math.grin.edu/~walker/courses/295/lab3.html

created February 3, 1997
last revised February 5, 1997