In this section of Operating System CPU Scheduling MCQs.it contain Operating System Process Management – Deadlock Avoidance 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. An alternative method for avoiding deadlocks is

  • by limiting how requests can be made.
  • to require additional information about how resources are to be requested
  • a and b
  • None of the above

2. avoiding deadlocks is to require additional information about how resources are to be requested .In order to  avoid a possible future deadlock which of the following information is required?

  • Each request requires that in making this decision the system consider the resources currently available
  • the resources currently allocated to each process
  • the future requests and releases of each process.
  • All of the above

3. avoiding deadlocks ,The simplest and most useful model requires that each process declare the ____ of resources of each type that it may need

  • Minimum Number
  • maximum number
  • Average Number
  • None of the above

4. A deadlock-avoidance algorithm dynamically examines the ____ to ensure that a circular-wait condition can never exist.

  • resource-allocation state
  • resource-available state
  • resource-Utilization state
  • All of the above

5. In A deadlock-avoidance algorithm The resource allocation state is defined by

  • the number of available resources
  • the allocated resources
  • the maximum demands of the processes
  • all of the above

6. In A deadlock-avoidance algorithm A state is safe if

  • there exists a safe sequence
  • the system can allocate resources to each process (up to its maximum) in some order and still avoid a deadlock
  • A and B both
  • None of the above

7. consider a system with twelve magnetic tape drives and three processes: P0, P1, and P2. Process P0 requires ten tape drives, process P1 may need as many as four tape drives, and process P2 may need up to nine tape drives. Suppose that, at time t0, process P0 is holding five tape drives, process P1 is holding two tape drives, and process P2 is holding two tape drives. (Thus, there are three free tape drives.)    
Maximum Needs Current Needs
P0   10                               5
P1   4                                2
P2   9                                2
At time t0, Which of the following sequence is a safe sequence ?

  • P0, P1, P2
  • P1, P0, P2
  • P2, P0, P1
  • P1, P2, P0

8. Which of the following stands true for Resource-allocation graph for deadlock avoidance.

  • An algorithm for detecting a cycle in this graph requires an order of n^2 operations, where n is the number of processes in the system
  • If no cycle exists, then the allocation of the resource will leave the system in a safe state.
  • If a cycle is found, then the allocation will put the system in an unsafe state
  • All of the above

9. The resource-allocation-graph algorithm is not applicable to___

  • a resource allocation system with single instances of each resource type
  • a resource allocation system with multiple instances of each resource type
  • a resource allocation system with Single and multiple instances of each resource type
  • All of the above

10. which of the following statement is True for Banker algorithm for deadlock-avoidance.

  • When a new process enters the system, it must declare the maximum number of instances of each resource type that it may need. This number may not exceed the total number of resources in the system
  • It 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

11. Which of the following data structures  must be maintained to implement the banker’s algorithm , where n is the number of processes in the system and m is the number of resource types:
  1. A vector of length m indicates the number of available resources of each type. If Available[j] equals k, then k instances of resource type Rj are available.
  2. An n × m matrix defines the maximum demand of each process. If Max[i][j] equals k, then process Pi may request at most k instances of resource type Rj
  3. An n × m matrix defines the number of resources of each type currently allocated to each process. If Allocation[i][j] equals k, then process Pi is currently allocated k instances of resource type Rj.
  4. An n × m matrix indicates the remaining resource need of each process. If Need[i][j] equals k, then process Pi may need k more instances of resource type Rj to complete its task. Note that Need[i][j] equals Max[i][j] − Allocation[i][j].

  • 1
  • 1,2
  • 1,2,3
  • 1,2,3,4
Share with : Share on Linkedin Share on Twitter Share on WhatsApp Share on Facebook