CS414 - Homework #2

Due Feb. 19, 2008


(5) 1. What is PCB? Why do we need it?

(5) 2. What is meant by "atomic operation"? Why is it important in cooperating processes?

(10) 3. The following solution is provided to solve the "too-much-milk" problem. We are assuming that only reads and writes (references and assignments) are atomic operations supported. State whether or not this solution is correct, and justify your answer.

Process A:

if (No-Note) {if (No-Milk) Buy-Milk}; Leave-Note;

Process B:

if (Note) {if (No-Milk) Buy-Milk}; Remove-Note;

(5) 4. Why is the separation of mechanism and policy a desirable property?


No hand-written homework!

Pledge your homework.