Important Operating System Deadlock MCQ Questions with Answers (Set 2) | IBPS, GATE

This set of Operating System Deadlock MCQ questions focuses on advanced concepts including Banker’s Algorithm, safe states, deadlock recovery, resource allocation graphs, and starvation. These questions are designed for competitive exams like IBPS IT Officer, GATE, and other technical exams.

Looking for basics? Solve Deadlock MCQ Set 1 before attempting this advanced set.

Difficulty: Medium to Hard

Total Questions: 15


Operating System Deadlock MCQs

Q1. What is the main disadvantage of invoking the deadlock detection algorithm for every resource request?

A. It causes data inconsistency
B. Excessive time consumed and overhead in computation
C. It leads to priority inversion
D. It prevents the use of semaphores

View Answer & Explanation

Answer: B

Explanation: Running deadlock detection frequently adds significant computational overhead, reducing system performance.


Q2. In the Banker’s Algorithm, which is calculated to determine if a state is safe?

A. Available + Allocation
B. Max – Allocation (Need)
C. Max + Available
D. Need + Allocation

View Answer & Explanation

Answer: B

Explanation: The Need matrix (Max – Allocation) is used to check if processes can complete safely.


Q3. Which method of deadlock recovery is most drastic?

A. Preempt resources from processes
B. Rollback process
C. Abort all deadlocked processes
D. Wait for resolution

View Answer & Explanation

Answer: C

Explanation: Aborting all processes immediately resolves deadlock but wastes maximum work.


Q4. If 3 processes each need 2 units of a resource, minimum resources to avoid deadlock?

A. 3
B. 4
C. 5
D. 6

View Answer & Explanation

Answer: B

Explanation: Using formula Σ(Need – 1) + 1 = (2-1)*3 +1 = 4.


Q5. When recovering using resource preemption, what must be handled?

A. Selecting a victim
B. Rollback
C. Starvation
D. All of the mentioned

View Answer & Explanation

Answer: D

Explanation: Recovery requires handling victim selection, rollback, and starvation issues.


Q6. Deadlock avoidance requires:

A. Number of processes
B. Maximum resource requirements in advance
C. High-speed CPU
D. Infinite memory

View Answer & Explanation

Answer: B

Explanation: Algorithms like Banker’s require knowledge of maximum resource demand.


Q7. Requesting all resources initially attacks which condition?

A. Mutual Exclusion
B. Hold and Wait
C. No Preemption
D. Circular Wait

View Answer & Explanation

Answer: B

Explanation: Eliminates the possibility of holding resources while waiting.


Q8. In multiple-instance systems, a cycle in RAG indicates:

A. Definite deadlock
B. Possible deadlock
C. Safe state
D. No deadlock

View Answer & Explanation

Answer: B

Explanation: Cycle is necessary but not sufficient for deadlock.


Q9. Why is Banker’s Algorithm rarely used?

A. Incorrect logic
B. Requires known max resource needs
C. Works only for single CPU
D. Causes memory leaks

View Answer & Explanation

Answer: B

Explanation: Real systems cannot predict maximum resource usage accurately.


Q10. Safe sequence means:

A. List of processes
B. Order allowing all processes to finish safely
C. Arrival order
D. Priority order

View Answer & Explanation

Answer: B

Explanation: A safe sequence ensures no deadlock occurs.


Q11. Deadlock Prevention vs Avoidance:

A. Prevention is more restrictive
B. Avoidance is more restrictive
C. Both same
D. Neither affects performance

View Answer & Explanation

Answer: A

Explanation: Prevention imposes strict conditions, reducing flexibility.


Q12. Process waiting indefinitely is:

A. Deadlock
B. Starvation
C. Mutual Exclusion
D. Paging

View Answer & Explanation

Answer: B

Explanation: Starvation occurs when a process is never allocated resources.


Q13. Allowing OS to take resources breaks:

A. Hold and Wait
B. Circular Wait
C. No Preemption
D. Mutual Exclusion

View Answer & Explanation

Answer: C

Explanation: Preemption breaks the no-preemption condition.


Q14. Match the Following:

Inconsistency — (a) requires unsafe state recognition
Deadlock avoidance — (b) mismatched messaging

View Answer & Explanation

Answer: 1-(b), 2-(a)

Explanation: Inconsistency involves incorrect messaging, while avoidance involves unsafe state detection.


Q15. Preventing Circular Wait is done by:

A. Using one resource
B. Allowing simultaneous access
C. Total ordering of resources
D. Killing processes

View Answer & Explanation

Answer: C

Explanation: Resource ordering prevents cyclic dependency.


Conclusion

This advanced set of Deadlock MCQs strengthens understanding of deadlock avoidance, detection, recovery techniques, and system safety. These concepts are crucial for scoring well in IBPS IT Officer and GATE examinations.

For detailed theory and understanding of the concepts, refer to Operating Systems Deadlock Concepts

Leave a Reply

Your email address will not be published. Required fields are marked *