In this section of Operating System CPU Scheduling MCQs.it contain Operating System Process Management – Deadlock Prevention MCQs (Multiple Choice Questions Answers).All the MCQs (Multiple Choice Question Answers) requires in detail reading of Operating System subject as the hardness level of MCQs have been kept to advance level.

PRACTICE IT NOW TO SHARPEN YOUR CONCEPT AND KNOWLEDGE

view hide answers

1. Deadlock Prevention Scheme can applied if:

  • each of the four necessary conditions must hold
  • By ensuring that at least one of these conditions can hold
  • By ensuring that at least one of these conditions cannot hold
  • All of the above

2. For Deadlock Prevention which of the following condition Stands TRUE:
  1. The mutual exclusion condition must hold
  2. hold-and-wait condition never occurs in the system
  3. No Preemption condition does not hold
  4. Circular Wait condition never holds
 

  • 1
  • 1,2
  • 1,2,3
  • 1,2,3,4

3. In Deadlock Prevention Scheme ,The mutual exclusion condition must hold if:

  • at least one resource must be nonsharable
  • at least one resource must be sharable
  • whenever a process requests a resource, it does not hold any other resources
  • All of the above

4. In Deadlock Prevention Scheme ,To ensure that the hold-and-wait condition never occurs in the system if:

  • at least one resource must be nonsharable
  • at least one resource must be sharable
  • whenever a process requests a resource, it does not hold any other resources
  • All of the above

5. To ensure that the hold-and-wait condition never occurs in the system Which of the following protocol should be used

  • each process to request and be allocated all its resources before it begins execution. We can implement this provision by requiring that system calls requesting resources for a process precede all other system calls.
  • protocol allows a process to request resources only when it has none. A process may request some resources and use them. Before it can request any additional resources, it must release all the resources that it is currently allocated.
  • If a process is holding some resources and requests another resource that cannot be immediately allocated to it (that is, the process must wait), then all resources the process is currently holding are preempted
  • A and B Both

6. To ensure that the hold-and-wait condition never occurs in the system In Deadlock Prevention Scheme,which of the following is the major disadvantages of the protocol used.
  1. Swapping
  2. resource utilization may be low,
  3. starvation
  4. page fault
 

  • 1,2
  • 1,2,3
  • 2,3
  • 2,3,4

7. The third necessary condition for deadlocks is that there be no preemption of resources that have already been allocated. To ensure that this condition does not hold, Which of the following protocol should be used.

  • each process to request and be allocated all its resources before it begins execution. We can implement this provision by requiring that system calls requesting resources for a process precede all other system calls.
  • protocol allows a process to request resources only when it has none. A process may request some resources and use them. Before it can request any additional resources, it must release all the resources that it is currently allocated.
  • If a process is holding some resources and requests another resource that cannot be immediately allocated to it (that is, the process must wait), then all resources the process is currently holding are preempted
  • All of the above

8. If a process is holding some resources and requests another resource that cannot be immediately allocated to it (that is, the process must wait), then all resources the process is currently holding are preempted.This protocol is often applied to  resources like
  1. CPU register
  2. memory space
  3. mutex locks
  4. semaphores
 

  • 1 and 2
  • 3 and 4
  • 1,2,3
  • 2,3,4

9. The fourth and final condition for deadlocks is the circular-wait condition. One way to ensure that this condition never holds .Which of the following protocol should be used.
  1. a process requesting an instance of resource type Rj must have released any resources Ri such that F(Ri) ≥ F(Rj).
  2. protocol allows a process to request resources only when it has none. A process may request some resources and use them. Before it can request any additional resources, it must release all the resources that it is currently allocated.
  3. If a process is holding some resources and requests another resource that cannot be immediately allocated to it (that is, the process must wait), then all resources the process is currently holding are preempted
  4. Each process can request resources only in an increasing order of enumeration. That is, a process can initially request any number of instances of a resource type —say, Ri. After that, the process can request instances of resource type Rj if and only if F(Rj) > F(Ri).
 

  • 1,2
  • 1,3
  • 1,4
  • 3,4

10. Prevent deadlocks by limiting how requests can be made. The limits ensure that at least one of the necessary conditions for deadlock cannot occur. Possible side effects of preventing deadlocks by this method are:
  1. Low device utilization
  2. Reduced system throughput.
  3. Starvation
  4. Page fault
 

  • 1,2
  • 1, 2, 3
  • 1, 2, 4
  • All of the above
Share with : Share on Linkedin Share on Twitter Share on WhatsApp Share on Facebook