Comp111 -- Midterm Exam Review 1
Midterm Exam Mon Nov 6, 2006 - open book and notes
- Stallings chapters 1-6, with emphasis on 4-6.
- Assignments 1-4.
- Lectures 1-12.
All review questions in the book are fair game, as well
as questions similar to assigned or auxiliary problems. The exam
is open book and notes.
- Explain exactly why monitors are preferable to semaphores, with examples.
- Compare overhead of the banker's algorithm with overhead of
deadlock detection and kill. In which situations is each superior?
- Consider the following resource allocation graph.
Is the system deadlocked? If so, which processes are involved?
- Suppose for the banker's algorithm described
in class, we have the following scheme:
r1 r2 r3 r4 r1 r2 r3 r4
process 1 2 5 3 2 1 0 3 2
process 2 1 5 1 1 1 1 0 0
process 3 3 3 3 3 3 3 3 3
and suppose that the total of available resources
r1 r2 r3 r4
12 12 7 9
Is this a safe state? Why or why not?
- What is the impact upon deadlock if one forces a set of otherwise
unconstrained processes to allocate one resource unit at a time, even
if they need a large number of resource units?