CPSC 390 Project 5: Distributed Processing Assignment - Prof. James F. Nystrom, Study Guides, Projects, Research of Computer Science

A computer science assignment for a course named cpsc 390, with a focus on distributed processing using message passing, rpc, and rendezvvous in the sr language. Students are required to complete tasks such as creating sr programs for various exercises, modifying existing modules, and submitting their programs for evaluation.

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 02/24/2010

koofers-user-yws
koofers-user-yws 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CPSC 390 Project 5
Fall 2009
19 November 2009
Distributed Processing
ASSIGNED: 19 November 2009
DUE: 10 December 2009 (by the end of class.)
VALUE: 60 points
Overview: This Program Set provides exercises in the mechanisms of distributed program-
ming (using message passing, RPC and rendezvous) in the SR language. Also important
here is your ability to design and program to specifications, so solve the correct problems!
Tasks:
1. (10 points) Create a SR program for the task described in Exercise 7.1 of the class
text. For your array of Merge processes, use n= 15. Also:
Drive the “‘leafs” of the merge tree with messages sent from a Main process. Each
input stream should send 8 numbers each, followed by EOS.
Receive the output of the merge tree “root” in the Main process, and print it to
the standard output.
2. (10 points) Create a SR program for the task described in Exercise 7.3(a) of the class
text. Use n= 128, and use the SR random(...) function for the generation of values
sent to the first filter process.
3. (20 points) (Adapted from Exercise 7.20(a) of the class text.) Create a SR program
for two of the three programs in §7.4 (of the class text) for exchanging values. (Here
you pick which two of the communication structures in Figure 7.14 that you want to
implement.) Also:
Seed all programs with the same seed value (so that you can obtain the same
sequence of pseudo-random numbers).
Have the number of processes, n, sent as a command-line argument. Each process
should call int(random(...)) to obtain a local value.
Use the SR age() command to print the total time taken by each program to
complete the problem.
1
pf2

Partial preview of the text

Download CPSC 390 Project 5: Distributed Processing Assignment - Prof. James F. Nystrom and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

CPSC 390 Project 5

Fall 2009

19 November 2009

Distributed Processing

ASSIGNED: 19 November 2009 DUE: 10 December 2009 (by the end of class.) VALUE: 60 points

Overview: This Program Set provides exercises in the mechanisms of distributed program- ming (using message passing, RPC and rendezvous) in the SR language. Also important here is your ability to design and program to specifications, so solve the correct problems!

Tasks:

  1. (10 points) Create a SR program for the task described in Exercise 7.1 of the class text. For your array of Merge processes, use n = 15. Also: - Drive the “‘leafs” of the merge tree with messages sent from a Main process. Each input stream should send 8 numbers each, followed by EOS. - Receive the output of the merge tree “root” in the Main process, and print it to the standard output.
  2. (10 points) Create a SR program for the task described in Exercise 7.3(a) of the class text. Use n = 128, and use the SR random(...) function for the generation of values sent to the first filter process.
  3. (20 points) (Adapted from Exercise 7.20(a) of the class text.) Create a SR program for two of the three programs in §7.4 (of the class text) for exchanging values. (Here you pick which two of the communication structures in Figure 7.14 that you want to implement.) Also: - Seed all programs with the same seed value (so that you can obtain the same sequence of pseudo-random numbers). - Have the number of processes, n, sent as a command-line argument. Each process should call int(random(...)) to obtain a local value. - Use the SR age() command to print the total time taken by each program to complete the problem.
  1. (10 points) Modify the RPC-based Merge module as described in Exercise 8.4 of the class text. Create a SR program with an array of n Merge modules (each implemented as a SR resource of course). Also: - Drive the “‘leafs” of the merge tree with calls from a Main process. Each input stream should send 8 numbers each, followed by EOS. - Service the output of the merge tree “root” with a procedure in the Main process, and print it to the standard output.
  2. (10 points) Create a SR resource for the module described in Exercise 8.9(b) of the class text. Create a SR program which drives this resource using m readers and n writers. (Both m and n should be command-line arguments.) Use random napping to delay both readers and writers at appropriate locations in your program.

Submit the following:

  1. A copy of your programs from Tasks 1 - 5.
  2. Place a copy of each program you write into a folder called CPSC390 Your Name. After all the programs have been placed in this folder, right-click on the folder and Send To a Compressed (zipped) folder. Email the zipped folder as an attachment to [email protected] with the Subject: CPSC390 Set 5.