Question

Which of the following is likely to result in deadlock .
A. Mutual exclusion B. Circular wait
C. No preemption D. All

Answers

GPT-4o mini
The correct answer is **D. All**.

Deadlock in a computer system can occur when all of the following four conditions hold simultaneously:

1. **Mutual Exclusion**: At least one resource must be held in a non-shareable mode; that is, only one process can use the resource at any given time.

2. **Hold and Wait**: A process holding at least one resource is waiting to acquire additional resources that are currently being held by other processes.

3. **No Preemption**: A resource cannot be forcibly taken from a process holding it; the process must release it voluntarily.

4. **Circular Wait**: There exists a set of processes such that each process is waiting for a resource that is held by the next process in the set, forming a circular chain.

Since the options listed (A, B, and C) are all conditions that can lead to deadlock, the answer is indeed **D. All**.