OS Organization Chapter 6 Part III: Deadlock Avoidance

Home > Preview

The flashcards below were created by user geschw66 on FreezingBlue Flashcards.


  1. Deadlock Avoidance: What is the difference between deadlock avoidance and deadlock prevention?
    In deadlock prevention we constrain resource requests to prevent at least one of the four conditions of deadlock. In  deadlock avoidance the three necessary conditions are allowed but judicious choices are made to assure that the deadlock point is never reached.
  2. Deadlock Avoidance: What are the two approaches to deadlock avoidance?
    • Resource Allocation Denial
    • Process Initiation Denial
  3. Deadlock Avoidance: Describe the approach of Resource Allocation Denial.
    do not grant an incremental resource request to a process if this allocation might lead to deadlock.
  4. Deadlock Avoidance:Describe the deadlock avoidance approach of Process Initiation Denial.
    Do not start a process if its demands might lead to deadlock.
  5. Deadlock Avoidance: What is this?

    Resources = R= (R1, R2, …, Rn)
    Total amount of each resource in the system
  6. Deadlock Avoidance: What is this?

    Available = V= (V1, V2, …, Vn)
    Total amount of each resource not allocated to any process
  7. Claim = C= Image Upload
    Cij= requirement of process i for resource j
  8. Allocation = A = Image Upload
    Aij = current allocation to process i of resource j
  9. Deadlock Avoidance: Process Initiation Denial (defn)
    • (1) Refuse to start a new process if its resource requirements might lead to deadlock
    • (2) Start a new process only if:

    Image Upload
  10. Resource Allocation Denial is also referred to as:
    The Bankers Algorithm
  11. Resource Allocation or Bankers Algorithm:
    • State of the system reflects the current allocation of resources to processes
    • Safe state is one in which there is at least one sequence of resource allocations to processes that does not result in a deadlock
    • Unsafe state is a state that is not safe Analogy = banker refusing to grant a loan if funds are too low to grant more loans + uncertainty about how long a customer will take to repay
  12. Deadlock Detection: The four steps of:
    • Step 1: Mark each process that has a row in the Allocation matrix of all 0s
    • Step 2: Initialize temporary vector W to be equal to the Available vector
    • Step 3: Find index i such that process i is currently unmarked and the i throw of Q is less than or equal to W. If no such row is found, then terminate.
    • Step 4: For each row found in step 3, mark process i and add the corresponding row of the allocation matrix to W.

    At the end, unmarked processes are deadlocked
  13. Deadlock Recovery: Three strategies of:
    • 1 - Abort all deadlocked processes
    • 2 - Back up each deadlocked process to some previously defined checkpoint and restart all processes
    • 3 -Successively abort deadlocked processes until deadlock no longer exists
  14. Deadlock Recovery: Successively abort... means?
    means an order is followed:


    • (1)Least amount of CPU time consumed,
    • (2) Lowest priority,
    • (3) Least total resources allocated so far, etc.
  15. Table Summary of Deadlock Detection, Prevention and Avoidance.
    Image Upload

Card Set Information

Author:
geschw66
ID:
319832
Filename:
OS Organization Chapter 6 Part III: Deadlock Avoidance
Updated:
2016-05-09 07:02:52
Tags:
OS Operating System Computer Science
Folders:

Description:
Spring WUSTL Class 2016: Study Cards.
Show Answers:

Home > Flashcards > Print Preview