Operating System

106503
Back to Operating System

Module 4: Deadlocks

  1. Q1f. Which technique allows the operating system to examine the resource allocation state dynamically to ensure no deadlock occurs? (i) Deadlock detection (ii) Deadlock recovery (iii) Deadlock avoidance (iv) Deadlock ignoring20252m

    Module 4: Deadlocks

    Which technique allows the operating system to examine the resource allocation state dynamically to ensure no deadlock occurs?

    (i) Deadlock detection
    (ii) Deadlock recovery
    (iii) Deadlock avoidance
    (iv) Deadlock ignoring

    View this question on its own page →
  2. Q1g. With a single resource, deadlock occurs (i) if there are more than two processes competing for that resource (ii) if there are only two processes competing for that resource (iii) if there is a single process competing for that resource (iv) none of these20232m

    Module 4: Deadlocks

    With a single resource, deadlock occurs
    (i) if there are more than two processes competing for that resource
    (ii) if there are only two processes competing for that resource
    (iii) if there is a single process competing for that resource
    (iv) none of these

    View this question on its own page →
  3. Q1g. Which of the following approach require knowledge of the system's state in advance. (i) Deadlock detection (ii) Deadlock prevention (iii) Deadlock avoidance (iv) None of these20222m

    Module 4: Deadlocks

    Which of the following approach require knowledge of the system's state in advance.

    (i) Deadlock detection
    (ii) Deadlock prevention
    (iii) Deadlock avoidance
    (iv) None of these

    View this question on its own page →
  4. Q1h. Which of the following conditions is required for deadlock to be possible? (i) Mutual exclusion (ii) A process may hold allocated resources while awaiting assignment of other resources (iii) No resource can be forcibly removed from a process holding it (iv) All of the above20192m

    Module 4: Deadlocks

    Which of the following conditions is required for deadlock to be possible?

    (i) Mutual exclusion
    (ii) A process may hold allocated resources while awaiting assignment of other resources
    (iii) No resource can be forcibly removed from a process holding it
    (iv) All of the above

    View this question on its own page →
  5. Q1i. Which one of the following is the deadlock avoidance algorithm? (i) Banker's algorithm (ii) Round-robin algorithm (iii) Elevator algorithm (iv) Karn's algorithm20192m

    Module 4: Deadlocks

    Which one of the following is the deadlock avoidance algorithm?

    (i) Banker's algorithm
    (ii) Round-robin algorithm
    (iii) Elevator algorithm
    (iv) Karn's algorithm

    View this question on its own page →
  6. Q1j. A computer system has 6 tape drives, with *n* processes competing for them. Each process may need 2 tape drives. The maximum value of *n* for which the system is guaranteed to be deadlock free is (i) 6 (ii) 5 (iii) 4 (iv) 320232m

    Module 4: Deadlocks

    A computer system has 6 tape drives, with n processes competing for them. Each process may need 2 tape drives. The maximum value of n for which the system is guaranteed to be deadlock free is
    (i) 6
    (ii) 5
    (iii) 4
    (iv) 3

    View this question on its own page →
  7. Q3b. Justify the following statement: "Cycle in resource allocation graph does not always imply the occurrence of deadlock".20234m

    Module 4: Deadlocks

    Justify the following statement: "Cycle in resource allocation graph does not always imply the occurrence of deadlock".

    View this question on its own page →
  8. Q4b. Consider a system with five processes P0 through P4 and four resources type A, B, C and D. Using the Banker's algorithm answer that the system is in a safe state? | Process | Allocation (A B C D) | Max (A B C D) | Available (A B C D) | | :--- | :---: | :---: | :---: | | P0 | 0 0 1 2 | 0 0 1 2 | 1 5 2 0 | | P1 | 1 0 0 0 | 1 7 5 0 | | | P2 | 1 3 5 4 | 2 3 5 6 | | | P3 | 0 6 3 2 | 0 6 5 2 | | | P4 | 0 0 1 4 | 0 6 5 6 | |20257m

    Module 4: Deadlocks

    Consider a system with five processes P0 through P4 and four resources type A, B, C and D. Using the Banker's algorithm answer that the system is in a safe state?

    Process Allocation (A B C D) Max (A B C D) Available (A B C D)
    P0 0 0 1 2 0 0 1 2 1 5 2 0
    P1 1 0 0 0 1 7 5 0
    P2 1 3 5 4 2 3 5 6
    P3 0 6 3 2 0 6 5 2
    P4 0 0 1 4 0 6 5 6
    View this question on its own page →
  9. Q4b. A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column 'alloc' denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete execution. Find the process that will finish first and last. | | alloc<br>X Y Z | Request<br>X Y Z | |---|---|---| | P0 | 1 2 1 | 1 0 3 | | P1 | 2 0 1 | 0 1 2 | | P2 | 2 2 1 | 1 2 0 |20227m

    Module 4: Deadlocks

    A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column 'alloc' denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete execution. Find the process that will finish first and last.

    alloc<br>X Y Z Request<br>X Y Z
    P0 1 2 1 1 0 3
    P1 2 0 1 0 1 2
    P2 2 2 1 1 2 0
    View this question on its own page →
  10. Q5a. Explain the core principle behind Deadlock Avoidance. Draw a Resource-allocation graph with a cycle but no deadlock.20247m

    Module 4: Deadlocks

    Explain the core principle behind Deadlock Avoidance. Draw a Resource-allocation graph with a cycle but no deadlock.

    View this question on its own page →
  11. Q5b. Consider a system with five processes P0 through P4 and four resources type A, B, C and D. Using the Banker's algorithm answer that the system is in a safe state? | | Allocation | Max | Available | | :--- | :--- | :--- | :--- | | | A B C D | A B C D | A B C D | | P0 | 0 0 1 2 | 0 0 1 2 | 1 5 2 0 | | P1 | 1 0 0 0 | 1 7 5 0 | | | P2 | 1 3 5 4 | 2 3 5 6 | | | P3 | 0 6 3 2 | 0 6 5 2 | | | P4 | 0 0 1 4 | 0 6 5 6 | |20247m

    Module 4: Deadlocks

    Consider a system with five processes P0 through P4 and four resources type A, B, C and D. Using the Banker's algorithm answer that the system is in a safe state?

    Allocation Max Available
    A B C D A B C D A B C D
    P0 0 0 1 2 0 0 1 2 1 5 2 0
    P1 1 0 0 0 1 7 5 0
    P2 1 3 5 4 2 3 5 6
    P3 0 6 3 2 0 6 5 2
    P4 0 0 1 4 0 6 5 6
    View this question on its own page →
  12. Q6a. For a deadlock to occur, each of the necessary conditions must hold. By ensuring that at least one of these conditions cannot hold, we can prevent the occurrence of a deadlock. Give one approach individually to prevent each of these necessary conditions.20237m

    Module 4: Deadlocks

    For a deadlock to occur, each of the necessary conditions must hold. By ensuring that at least one of these conditions cannot hold, we can prevent the occurrence of a deadlock. Give one approach individually to prevent each of these necessary conditions.

    View this question on its own page →
  13. Q6a. Write necessary conditions that must hold simultaneously to arise deadlock situation. Briefly explain different deadlock handling mechanisms.20227m

    Module 4: Deadlocks

    Write necessary conditions that must hold simultaneously to arise deadlock situation. Briefly explain different deadlock handling mechanisms.

    View this question on its own page →
  14. Q6b. Consider a system with five processes P0 through P4 and have three resource types A, B, C. Resource type A has ten instances, resource type B has five instances, and resource type C has seven instances. Suppose that the following snapshot represents the current state of the system: | | Allocation | Max | Available | | :--- | :---: | :---: | :---: | | | A B C | A B C | A B C | | P0 | 0 1 0 | 7 5 3 | 3 3 2 | | P1 | 2 0 0 | 3 2 2 | | | P2 | 3 0 2 | 9 0 2 | | | P3 | 2 1 1 | 2 2 2 | | | P4 | 0 0 2 | 4 3 3 | | The system is currently in safe state. Suppose now that P1 requests additional resources as (A=1, B=0, C=2). Is this request can be immediately granted? Justify your answer.20237m

    Module 4: Deadlocks

    Consider a system with five processes P0 through P4 and have three resource types A, B, C. Resource type A has ten instances, resource type B has five instances, and resource type C has seven instances. Suppose that the following snapshot represents the current state of the system:

    Allocation Max Available
    A B C A B C A B C
    P0 0 1 0 7 5 3 3 3 2
    P1 2 0 0 3 2 2
    P2 3 0 2 9 0 2
    P3 2 1 1 2 2 2
    P4 0 0 2 4 3 3

    The system is currently in safe state. Suppose now that P1 requests additional resources as (A=1, B=0, C=2). Is this request can be immediately granted? Justify your answer.

    View this question on its own page →
  15. Q8. Define deadlock. List four necessary conditions for occurrence of deadlock. A system contains six units of resource, and *n* processes that use the resource. What is the maximum value of *n* for which the system will be deadlock free if the maximum requirement of each process is 3?201914m

    Module 4: Deadlocks

    Define deadlock. List four necessary conditions for occurrence of deadlock.

    A system contains six units of resource, and n processes that use the resource. What is the maximum value of n for which the system will be deadlock free if the maximum requirement of each process is 3?

    View this question on its own page →
  16. Q8a. Discuss deadlock recovery techniques. Explain process termination and resource preemption methods used for recovery from deadlock.20257m

    Module 4: Deadlocks

    Discuss deadlock recovery techniques. Explain process termination and resource preemption methods used for recovery from deadlock.

    View this question on its own page →
  17. Q9a. Write short notes on: Banker's Algorithm20227m

    Module 4: Deadlocks

    Write short notes on: Banker's Algorithm

    View this question on its own page →