13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Exercises 1453. What is a one-process deadlock? Why does this situation not cause any problemsto the resource manager?4. Under the hierarchical resource allocation policy, suppose that a process is holdinga resource of level 3 and finds it needs to acquire a resource of level 2. Is there anyway it can do this?5. Let’s number all the chopsticks in the dining philosophers problem and require thateach philosopher request an even-numbered chopstick before an odd-numberedchopstick. Will this allocation strategy work? Is it a form of a well-known strategy?6. Assume that there are two classes of resources. For the following resourceallocationstate, tell which, if any, of the processes are deadlocked.1 2ProcessHolding Request Holding Request A 3 1 4 5 B 2 3 3 6 C 4 2 2 0Unallocated 2 37. Assume that there are two classes of resources. For the following resourceallocationstate, tell which, if any, of the processes are deadlocked.1 2processHolding Request Holding Request A 3 7 4 5 B 2 3 3 6 C 4 2 2 0Unallocated 2 38. Draw the resource graphs for the situations in exercises 6 and 7.9. Construct an unsafe resource-allocation state in which there are three processes,there is one class of resource with four resources, and each process has a claim ofthree resources.10. Construct an unsafe resource-allocation state in which there are three processes,there is one class of resource with four resources, and each process has a claim oftwo resources.11. Which of the following events can lead from a safe state to an unsafe state? Whichcan lead from a deadlock-free state to a deadlocked state?(a) A process makes a request within its claim.(b) A process makes a request beyond its claim.(c) A request within the claim is satisfied.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!