Question 2 -- 10 points
Part 1 (6 points)
State the four necessary conditions for deadlock, and common ways (citing
specific examples) in which
each can be bypassed for deadlock prevention.
Part 2 (4 points)
Define the concept of ``safe states'' and state how they are
used in deadlock avoidance.