557 words - 3 pages

Exercises

1. Compare the processors’ access to printers and other I/O devices for the

master/slave and the symmetric multiprocessing configurations. Give a real-life

example where the master/slave configuration might be preferred.

2. Compare the processors’ access to main memory for the loosely coupled

configuration and the symmetric multiprocessing configurations. Give a

real-life example where the symmetric configuration might be preferred.

3. Describe the programmer’s role when implementing explicit parallelism.

4. Describe the programmer’s role when implementing implicit parallelism.

5. What steps does a well-designed multiprocessing system follow when it detects

that a processor is failing? What is the central goal of most multiprocessing

systems?

6. Give an example from real life of busy ...view middle of the document...

To do so,

break down the equation into the correct order of operations with one

calculation per step. Show the formula for each step.

b. Find the value of G: if A = 5, B = 10, C = 3, D = 8, and E = 5.

11. Consider this formula:

G = D + (A + C2) * E / (D + B)3

a. Show the order that a processor would follow to calculate G. To do so,

break down the equation into the correct order of operations with one

calculation per step. Show the formula for each step.

b. Find the value of G: if A = 5, B = 10, C = 3, D = 8, and E = 5.

199

Exercises

12. Rewrite each of the following arithmetic expressions to take advantage of

concurrent processing and then code each. Use the terms COBEGIN and

COEND to delimit the sections of concurrent code.

a. A+B*R*Z – N*M+C2

b. (X*(Y*Z*W*R)+M+N+P)

c. ((J+K*L*M*N)*I)

13. Rewrite each of the following expressions for concurrent processing and then

code each one. Use the terms COBEGIN and COEND to delimit the sections of

concurrent code. Identify which expressions, if any, might NOT run faster in

a concurrent processing environment.

a. H2*(O*(N+T))

b. X*(Y*Z*W*R)

c. M*T* R

Advanced Exercises

14. Use the test and increment (P and V) semaphore operations to simulate the

traffic flow at the intersection of two one-way streets. The following rules

should be satisfied:

• Only one car can be crossing at any given time.

• A car should be allowed to cross the intersection only if there are no cars

coming from the other street.

• When cars are coming from both streets, they should take turns to prevent

indefinite postponements in either street.

15. Compare and contrast the critical region and working set.

16. Consider the following program segments for two different processes (P1, P2)

executing concurrently and where B and A are not shared variables, but x

starts at 0 and is a shared variable.

Processor #1: Processor #2:

for(a = 1; a

Beat writer's block and start your paper with the best examples