What are the four requirements for a deadlock?

  1. What is the formal definition of the deadlock?
  2. What are the four requirements for a deadlock?
  3. Suppose that a resource allocation graph contains a cycle. Does this mean there is a deadlock?
  4. Suppose that a resource allocation graph does not contain a cycle. Does this mean there is no deadlock?
  5. Consider a system with processes P1 and P2 and resources R1, R2, R3 (where each resource has a single instance). Draw a resource allocation graph for each of the following steps in the sequence and answer the following questions:
    1. Process P2 requests resource R1
    2. Process P1 is granted access to R1
    3. Processes both P1 and P2 claim both resources R2 and R3
  6. Consider a three process system in which processes may request any of 12 drives. Suppose the allocation state given below. Show that the allocation state is unsafe. Will this system deadlock?

 

  Allocation Max Need Available
P0 5 10 5 12
P1 2 4 2  
P2 3 9 6