Homework 2 UCR CS122B Winter 2002 Prof. F. Vahid Due Tuesday 1/29/02 at beginning of lecture 1. Consider ESD Fig 1.12(a). (a) Explain whether shared memory or message passing is better for this example, and illustrate why. (b) Assume memory access is an indivisible operation. Assuming shared memory, explain whether or not mutexes are necessary. 2. Consider ESD Fig 1.12(b). (a) Using the most appropriate communication mechanism, model the task communication. (b) Show whether or not deadlock may occur. 3. Look at ESD Fig 1.9. (a) Explain whether or not this is an instance of the consumer-producer problem. (b) Choose the best communication model and explain your choice. Show how to implement the communication using psuedo-code. 4. ESD 8.6 (ordered and two-phase locking) 5. ESD 8.7 (send/receive implementation) 6. ESD 8.9 (scheduling)