SDSU CS 662: Theory of Parallel Algorithms
Sample SR Exam

[To Course Home Page]
San Diego State University -- This page last updated March 21, 1995

The following SR exam was given in CS 520 offered in 1992. CS 520 has a different focus than CS 662.

1) Explain the operation of SR's "if" statement. How does the "if" statement in SR differ from "if" statements in other languages?

2) a)What is the difference between a reply and a return in an SR proc?

b) What is the difference between a procedure and a proc in SR?
3) Give two major differences between arrays and/or array operations in C++ and SR.

4) a) What are all the options for parameter passing in SR procedures? That is give the names used in SR for the parameter passing options and what they mean.

b) What complication does concurrent/parallel processing introduce in parameter passing?

5) a) What is the purpose of semaphores?

b) Explain how semaphores operate. Illustrate with an example.

c) Show how semaphores can be implemented with send/receive pairs.

6) a) Show how to send asynchronous messages between two processes in SR. Give an example.

b) Modify your example in a) to achieve a rendezvous between two processes in SR.

7) Explain the function or role of the following items in SR.
a) cap

b) op

c) resource

d) global

e) vm

8) Constants can be implemented in one of two basic ways.
a) What are the two basic ways in which a language can implement constants.

b) Give a test program that would determine which way a language implemented constants. Explain how the program would determine how constants were implemented.