← Back to Subject
Operating System • MCQ • Deadlock
Most Important 30 Objective Question - Deadlock
Q1. Deadlock is a situation where:

A) Processes execute faster
B) Processes wait forever for resources
C) CPU becomes faster
D) Memory increases

Answer: B

Explanation: Deadlock occurs when processes wait indefinitely for resources held by each other.

Q2. Deadlock mainly occurs due to:

A) Excess CPU speed
B) Improper resource allocation
C) More RAM
D) Fast disk access

Answer: B

Explanation: Deadlock happens when resources are allocated in such a way that processes block each other.

Q3. Which of the following is necessary for deadlock?

A) Mutual Exclusion
B) Multiprogramming
C) Paging
D) Scheduling

Answer: A

Explanation: Mutual exclusion is one of the four necessary conditions for deadlock.

Q4. Which is NOT a deadlock condition?

A) Mutual Exclusion
B) Hold and Wait
C) Preemption
D) Circular Wait

Answer: C

Explanation: No Preemption is a deadlock condition, but Preemption itself is not.

Q5. Hold and Wait means:

A) Process holds resources and waits for more
B) Process releases all resources
C) CPU remains idle
D) Memory is shared equally

Answer: A

Explanation: In Hold and Wait, a process keeps allocated resources while waiting for additional ones.

Q6. Circular Wait means:

A) Processes form a circular chain waiting for resources
B) CPU moves in circle
C) Memory rotates
D) Disk rotates

Answer: A

Explanation: Circular wait occurs when each process waits for a resource held by the next process.

Q7. No Preemption means:

A) Resource cannot be forcibly taken away
B) CPU can interrupt anytime
C) Process runs faster
D) Memory is deleted

Answer: A

Explanation: No preemption means resources cannot be taken forcibly; they must be released voluntarily.

Q8. Deadlock Prevention works by:

A) Ignoring deadlock
B) Breaking at least one necessary condition
C) Increasing RAM
D) Increasing CPU speed

Answer: B

Explanation: Deadlock prevention ensures that at least one necessary condition never occurs.

Q9. Deadlock Avoidance requires:

A) Future resource request information
B) Extra CPU
C) Large hard disk
D) Compiler

Answer: A

Explanation: Deadlock avoidance needs advance knowledge of maximum resource needs.

Q10. Banker’s Algorithm is used for:

A) Deadlock Avoidance
B) CPU Scheduling
C) File Allocation
D) Paging

Answer: A

Explanation: Banker’s Algorithm checks whether allocating resources keeps the system in a safe state.

Q11. A safe state means:

A) No deadlock possibility
B) CPU is free
C) No process exists
D) Disk is empty

Answer: A

Explanation: In a safe state, the system can allocate resources without leading to deadlock.

Q12. Unsafe state means:

A) Deadlock has definitely occurred
B) Deadlock may occur
C) No scheduling
D) Memory failure

Answer: B

Explanation: Unsafe state means deadlock is possible in the future.

Q13. Resource Allocation Graph is used for:

A) Deadlock representation
B) File system
C) Scheduling
D) Paging

Answer: A

Explanation: It is used to represent processes, resources, and their allocation/request relationships.

Q14. Circle in Resource Allocation Graph indicates:

A) Safe state
B) Deadlock possibility
C) CPU failure
D) File corruption

Answer: B

Explanation: A cycle in the graph may indicate deadlock (especially with single resource instances).

Q15. Deadlock Detection is used when:

A) Deadlock is allowed to occur
B) Deadlock is prevented
C) No process runs
D) Only one process exists

Answer: A

Explanation: Detection allows deadlock to happen first and then identifies it.

Q16. Recovery from deadlock can be done by:

A) Process termination
B) Resource preemption
C) Both A and B
D) File deletion

Answer: C

Explanation: Deadlock recovery is done either by terminating processes or preempting resources.

Q17. Starvation means:

A) Process waits indefinitely
B) CPU stops
C) Memory crash
D) Disk failure

Answer: A

Explanation: Starvation happens when a process never gets the required resources or CPU time.

Q18. Which algorithm checks system safety?

A) Safety Algorithm
B) FCFS
C) LRU
D) FIFO

Answer: A

Explanation: Safety Algorithm checks whether the system is in a safe state.

Q19. Deadlock Avoidance is better than Prevention because:

A) It is more flexible
B) It uses no memory
C) It removes CPU
D) It ignores resources

Answer: A

Explanation: Avoidance is more flexible because it allows resource allocation while ensuring safety.

Q20. Multiple instances of resources are handled by:

A) Banker’s Algorithm
B) Peterson’s Solution
C) FCFS
D) Round Robin

Answer: A

Explanation: Banker’s Algorithm is suitable for multiple instances of resources.

Q21. Which of the following helps in deadlock prevention?

A) Request all resources at once
B) Allow circular wait
C) No scheduling
D) Increase file size

Answer: A

Explanation: Requesting all resources at once removes Hold and Wait condition.

Q22. Which condition is easiest to remove?

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

Answer: C

Explanation: Circular wait can be removed by assigning resource ordering.

Q23. If one necessary condition is removed:

A) Deadlock cannot occur
B) CPU fails
C) Memory doubles
D) Scheduling stops

Answer: A

Explanation: All four conditions are necessary, so removing one prevents deadlock.

Q24. Ostrich Algorithm means:

A) Preventing deadlock
B) Ignoring deadlock problem
C) Solving deadlock
D) Detecting deadlock

Answer: B

Explanation: Ostrich Algorithm simply ignores deadlock if it is rare and not serious.

Q25. Deadlock is common in:

A) Resource sharing systems
B) Single process systems
C) No resource systems
D) Offline computers

Answer: A

Explanation: Deadlock commonly occurs when multiple processes share limited resources.

Q26. Wait-for Graph is used when:

A) Single instance of each resource exists
B) Multiple CPU exists
C) Paging happens
D) Disk scheduling runs

Answer: A

Explanation: Wait-for Graph is a simplified graph used for deadlock detection with single resource instances.

Q27. In Banker’s Algorithm, Available means:

A) Free resources
B) Used resources
C) Requested resources
D) Deleted resources

Answer: A

Explanation: Available represents the number of free resources currently available.

Q28. In Banker’s Algorithm, Need means:

A) Maximum – Allocation
B) Allocation – Maximum
C) Available + Allocation
D) Total resources

Answer: A

Explanation: Need = Maximum resources required – Currently allocated resources.

Q29. Process termination in recovery may cause:

A) Loss of work
B) More CPU speed
C) More memory
D) Faster scheduling

Answer: A

Explanation: Terminating a process may lose completed work and system progress.

Q30. Deadlock is best avoided by:

A) Proper resource allocation
B) Deleting files
C) Increasing monitor size
D) Turning off CPU

Answer: A

Explanation: Proper resource allocation policies help avoid deadlock situations.
Google AdSense Ad Placement Here 📢