Operating System Questions and Answers – Deadlock Detection

This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on “Deadlock Detection”.

1. 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
View Answer

Answer: a
Explanation: None.

2. 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
View Answer

Answer: a
Explanation: None.

3. 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
View Answer

Answer: b
Explanation: None.
advertisement
advertisement

4. If deadlocks occur frequently, the detection algorithm must be invoked ________
a) rarely
b) frequently
c) rarely & frequently
d) none of the mentioned
View Answer

Answer: b
Explanation: None.

5. 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
View Answer

Answer: c
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. 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
View Answer

Answer: b
Explanation: None.

7. 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
View Answer

Answer: a
Explanation: None.
advertisement

8. 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
View Answer

Answer: a
Explanation: None.

9. 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
View Answer

Answer: a
Explanation: None.
advertisement

10. ‘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
View Answer

Answer: a
Explanation: None.

Sanfoundry Global Education & Learning Series – Operating System.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.