Operating System MCQ and Answers – Deadlock Detection

These Operating System MCQ and Answers – Deadlock Detection are asked in various examinations including BCA, MCA, GATE, and other tests. The questions based on the below Operating System MCQ and Answers – Deadlock Detection test your basic knowledge of MCQs on the topic of Operating Systems and the level of comprehension and grasp that you hold.

Operating System MCQ and Answers – Deadlock Detection

1. If deadlocks occur frequently, the detection algorithm must be invoked ________

a) rarely

b) frequently

c) rarely & frequently

d) none of the mentioned

Answer: b

2. What is the disadvantage of invoking the detection algorithm for every request?

a) overhead of the detection algorithm due to consumption of memory

b) excessive time consumed in the request to be allocated memory

c) considerable overhead in computation time

d) all of the mentioned

Answer: c

3. A deadlock eventually cripples system throughput and will cause the CPU utilization to ______

a) increase

b) drop

c) stay still

d) none of the mentioned

Answer: b

4. Every time a request for allocation cannot be granted immediately, the detection algorithm is invoked. This will help identify ____________

a) the set of processes that have been deadlocked

b) the set of processes in the deadlock queue

c) the specific process that caused the deadlock

d) all of the mentioned

Answer: a

5. A computer system has 6 tape drives, with ‘n’ processes competing for them. Each process may need 3 tape drives. The maximum value of ‘n’ for which the system is guaranteed to be deadlock free is?

a) 2

b) 3

c) 4

d) 1

Answer: a

6. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock ____________

a) can never occur

b) may occur

c) has to occur

d) none of the mentioned

Answer: a

7. ‘m’ processes share ‘n’ resources of the same type. The maximum need of each process doesn’t exceed ‘n’ and the sum of all their maximum needs is always less than m+n. In this setup, deadlock ____________

a) can never occur

b) may occur

c) has to occur

d) none of the mentioned

Answer: a

8. The wait-for graph is a deadlock detection algorithm that is applicable when ____________

a) all resources have a single instance

b) all resources have multiple instances

c) all resources have a single 7 multiple instances

d) all of the mentioned

Answer: a

9. An edge from process Pi to Pj in a wait for graph indicates that ____________

a) Pi is waiting for Pj to release a resource that Pi needs

b) Pj is waiting for Pi to release a resource that Pj needs

c) Pi is waiting for Pj to leave the system

d) Pj is waiting for Pi to leave the system

Answer: a

10. If the wait for graph contains a cycle ____________

a) then a deadlock does not exist

b) then a deadlock exists

c) then the system is in a safe state

d) either deadlock exists or system is in a safe state

Answer: b

Comments