Operating System » Deadlock Prevention
The number of resources requested by a process ____________

A. Must always be less than the total number of resources available in the system
B. Must always be equal to the total number of resources available in the system
C. Must not exceed the total number of resources available in the system
D. Must exceed the total number of resources available in the system

The request and release of resources are ___________

A. Command line statements
B. Interrupts
C. System calls
D. Special programs

What are Multithreaded programs?

A. Lesser prone to deadlocks
B. More prone to deadlocks
C. Not at all prone to deadlocks
D. None of the mentioned

Explanation: Multiple threads can compete for shared resources.

For a deadlock to arise, which of the following conditions must hold simultaneously?

A. Mutual exclusion
B. No preemption
C. Hold and wait
D. All of the mentioned

For Mutual exclusion to prevail in the system ____________

A. At least one resource must be held in a non sharable mode
B. The processor must be a uniprocessor rather than a multiprocessor
C. There must be at least one resource in a sharable mode
D. All of the mentioned

Explanation: If another process requests that resource (non – shareable resource), the requesting process must be delayed until the resource has been released.

For a Hold and wait condition to prevail ____________

A. A process must be not be holding a resource, but waiting for one to be freed, and then request to acquire it
B. A process must be holding at least one resource and waiting to acquire additional resources that are being held by other processes
C. A process must hold at least one resource and not be waiting to acquire additional resources
D. None of the mentioned

Deadlock prevention is a set of methods ____________

A. To ensure that at least one of the necessary conditions cannot hold
B. To ensure that all of the necessary conditions do not hold
C. To decide if the requested resources for a process have to be given or not
D. To recover from a deadlock

For non sharable resources like a printer, mutual exclusion ____________

A. Must exist
B. Must not exist
C. May exist
D. None of the mentioned

Explanation: A printer cannot be simultaneously shared by several processes.

For sharable resources, mutual exclusion ____________

A. Is required
B. Is not required
C. May be or may not be required
D. None of the mentioned

Explanation: They do not require mutually exclusive access, and hence cannot be involved in a deadlock.

To ensure that the hold and wait condition never occurs in the system, it must be ensured that ____________

A. Whenever a resource is requested by a process, it is not holding any other resources
B. Each process must request and be allocated all its resources before it begins its execution
C. A process can request resources only when it has none
D. All of the mentioned

Explanation: c – A process may request some resources and use them. Before it can can request any additional resources, however it must release all the resources that it is currently allocated.