πŸŽ“ BookMCQ
← Back to 7. Deadlocks

πŸ“ Mutual Exclusion Deadlock Prevention (44 MCQs)

πŸ“– From Operating System β€’ 7. Deadlocks β€’ 44 questions available

What is Mutual Exclusion Deadlock Prevention?

Definition:
This prevention technique attempts to negate the mutual exclusion condition by making resources sharable rather than exclusive.

Example:
Read-only files can be shared among multiple processes {P1,P2,...}\{P_1, P_2, ...\} simultaneously, but printers inherently require mutual exclusion and cannot be prevented this way.

Reason:
While effective for sharable resources, this method is impractical for most physical devices that fundamentally require exclusive access, limiting its universal applicability.

6
Easy
23
Medium
15
Hard

πŸ“ All Mutual Exclusion Deadlock Prevention MCQs

Q1. What does the mutual exclusion condition require for a resource to potentially be involved in a deadlock?

A.The resource must be sharable
B.The resource must be nonsharable βœ…
C.The resource must be preemptable
D.The resource must be a logical resource
πŸ’‘ Difficulty: easy | βœ… Correct: B

πŸ“– Explanation: The mutual exclusion condition states that at least one resource must be held in a nonsharable mode. This means that only one process at a time can use the resource, which is a prerequisite for a deadlock to occur involving that resource.

Q2. Which type of resource cannot be involved in a deadlock?

A.Nonsharable resources
B.Sharable resources βœ…
C.Physical resources
D.Logical resources
πŸ’‘ Difficulty: easy | βœ… Correct: B

πŸ“– Explanation: Sharable resources do not require mutually exclusive access. Since processes do not have to wait for them, they cannot create the circular wait condition that is necessary for a deadlock. This makes them inherently safe from deadlock involvement.

Q3. What is a key characteristic of a sharable resource in the context of deadlocks?

A.It requires mutual exclusion
B.It can only be used by one process at a time
C.It does not require mutually exclusive access βœ…
D.It is always a physical resource
πŸ’‘ Difficulty: medium | βœ… Correct: C

πŸ“– Explanation: Sharable resources, by definition, can be accessed by multiple processes simultaneously without conflict. This means no process ever needs to wait for the resource, which eliminates the possibility of it being part of a deadlock cycle.

Q4. Why is a read-only file considered a good example of a sharable resource?

A.It requires exclusive access
B.Several processes can be granted simultaneous access to it βœ…
C.It is always stored in memory
D.It cannot be accessed by multiple processes
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: A read-only file can be opened and read by multiple processes at the same time without any conflicts. Because the data is not being modified, there is no need for exclusive access. This allows concurrent access and prevents any process from waiting for the file.

Q5. If a process requests access to a sharable resource, what is the typical outcome?

A.The process must wait until the resource is released
B.The process is granted immediate access without waiting βœ…
C.The process is terminated
D.The process is placed in a deadlock state
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: For a sharable resource, multiple processes can use it concurrently. Therefore, a process making a request for such a resource will generally not be blocked. It can proceed without waiting, as there is no exclusive holder to contend with.

Q6. Why can't deadlocks be prevented simply by denying the mutual-exclusion condition?

A.Because mutual exclusion is not a necessary condition
B.Because some resources are intrinsically nonsharable βœ…
C.Because all resources can be made sharable
D.Because mutual exclusion is the only condition that matters
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: The text explicitly states that we cannot prevent deadlocks by denying the mutual-exclusion condition because some resources are intrinsically nonsharable. For example, a mutex lock, by its very nature, cannot be shared among several processes simultaneously. It is not a design choice but a fundamental property of the resource.

Q7. What is an example of a resource that is intrinsically nonsharable?

A.A read-only file
B.A shared memory segment
C.A mutex lock βœ…
D.A global variable
πŸ’‘ Difficulty: medium | βœ… Correct: C

πŸ“– Explanation: A mutex lock is specifically designed to provide exclusive access. It is used to protect critical sections and by definition can only be held by one process or thread at a time. It is a classic example of a resource that is inherently nonsharable and thus cannot be made sharable to prevent deadlocks.

Q8. What is the relationship between mutual exclusion and deadlock prevention?

A.Prevention is achieved by ensuring mutual exclusion always holds
B.Prevention is achieved by eliminating mutual exclusion for all resources
C.Mutual exclusion is a necessary condition, but it cannot always be eliminated for deadlock prevention βœ…
D.Mutual exclusion has no role in deadlock prevention
πŸ’‘ Difficulty: hard | βœ… Correct: C

πŸ“– Explanation: The mutual exclusion condition is necessary for deadlocks. However, preventing deadlocks by breaking this condition is often impossible because many resources (like printers, mutexes) are nonsharable by their very nature. Therefore, deadlock prevention must typically target other conditions like hold and wait or circular wait.

Q9. A system has a mutex lock that protects a critical section. How does this mutex lock relate to deadlock prevention?

A.It can be made sharable to prevent deadlocks
B.It is an example of a resource that is intrinsically nonsharable and cannot be used for prevention βœ…
C.It is not a resource and cannot be involved in a deadlock
D.It is a sharable resource and cannot cause deadlocks
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: A mutex lock is intrinsically nonsharable. It is used to enforce mutual exclusion. While its nonsharable nature makes it a candidate for causing deadlocks, it also means that we cannot simply 'deny' mutual exclusion to prevent deadlocks involving it. The lock's fundamental purpose is to be nonsharable.

Q10. Why does a process never need to wait for a sharable resource?

A.Because sharable resources are always available
B.Because multiple processes can access them simultaneously βœ…
C.Because sharable resources are never requested
D.Because sharable resources are preemptable
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: Since a sharable resource can be used by more than one process at a time without conflict, a process requesting it will not be blocked by another process's use. The request can be satisfied immediately, eliminating the 'waiting' aspect that is necessary for a deadlock.

Q11. If a system has only sharable resources, can a deadlock occur?

A.Yes, deadlocks can still occur
B.No, deadlocks cannot occur βœ…
C.Yes, if there are multiple instances
D.Yes, if processes request resources in different orders
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: Deadlocks require a circular wait for resources. If all resources are sharable, no process ever has to wait for a resource. Since there is no waiting, there can be no circular wait, and thus no deadlock. This is why sharable resources are considered safe from deadlocks.

Q12. What is the primary reason that the mutual exclusion condition cannot always be prevented for deadlock avoidance?

A.It is too expensive to implement
B.It is a fundamental requirement for many types of resources βœ…
C.It is not a real condition
D.It is automatically handled by the OS
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: The text explains that mutual exclusion is a property of certain resources. A mutex lock is nonsharable by design. A printer cannot be used by two processes simultaneously to print different documents. Because these properties are intrinsic, the condition cannot be 'broken' for these resources, forcing deadlock prevention to focus on other conditions.

Q13. In the context of deadlock prevention, what makes read-only files a safe resource?

A.They are always available in the system
B.They are sharable and do not cause waiting βœ…
C.They are not requested by processes
D.They are stored in a special memory area
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: Read-only files are safe because they are sharable. Multiple processes can read the same file concurrently without any need for exclusive access. Therefore, no process will ever be blocked waiting for a read-only file, which eliminates the possibility of it being involved in a circular wait.

Q14. What does the term 'intrinsically nonsharable' imply about a resource?

A.It can be made sharable with software
B.Its nonsharable nature is a fundamental property that cannot be changed βœ…
C.It is a logical resource
D.It can be shared with proper synchronization
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: 'Intrinsically' means inherently or by its very nature. For a resource like a mutex lock, being nonsharable is its defining characteristic. It is not a choice; the resource's purpose is to provide exclusive access. Therefore, it cannot be transformed into a sharable resource to break the mutual exclusion condition.

Q15. If an operating system cannot deny mutual exclusion, what must it do to prevent deadlocks?

A.It must ignore deadlocks
B.It must rely on detection and recovery
C.It must focus on preventing the other three necessary conditions βœ…
D.It must eliminate all nonsharable resources
πŸ’‘ Difficulty: hard | βœ… Correct: C

πŸ“– Explanation: The text explains that denying mutual exclusion is often not feasible. Therefore, for deadlock prevention, the only viable path is to target one of the other necessary conditions: hold and wait, no preemption, or circular wait. These conditions are more amenable to policy changes and algorithmic control.

Q16. A mutex lock is an example of a resource that is nonsharable. What does this mean for deadlock prevention?

A.It means the mutex lock can be used to prevent deadlocks
B.It means the mutex lock cannot be made sharable to break the mutual exclusion condition βœ…
C.It means the mutex lock will never cause a deadlock
D.It means the mutex lock is a logical resource
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: The nonsharable nature of a mutex lock means it fulfills the mutual exclusion condition. Since it cannot be made sharable, this condition cannot be broken for that resource. Therefore, any deadlock prevention strategy cannot rely on breaking mutual exclusion for mutex locks and must address other conditions.

Q17. What is the significance of the statement 'at least one resource must be nonsharable' in the context of deadlocks?

A.It defines the mutual exclusion condition βœ…
B.It defines the hold and wait condition
C.It defines the no preemption condition
D.It defines the circular wait condition
πŸ’‘ Difficulty: easy | βœ… Correct: A

πŸ“– Explanation: This statement is the formal definition of the mutual exclusion condition. It is one of the four necessary conditions for a deadlock. It specifies that for a deadlock to be possible, there must be at least one resource that cannot be used by more than one process at a time.

Q18. If multiple processes attempt to open a read-only file at the same time, what happens?

A.All but one process are blocked
B.They are granted simultaneous access to the file βœ…
C.They are terminated
D.They are placed in a deadlock state
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: A read-only file is a classic sharable resource. Since processes only read the data and do not modify it, they can all access it concurrently without conflict. The system grants them simultaneous access, and no process needs to wait.

Q19. Why is a mutex lock considered a resource that is intrinsically nonsharable?

A.Because it is used to protect critical sections and must provide exclusive access βœ…
B.Because it is a logical resource
C.Because it is stored in memory
D.Because it is a physical device
πŸ’‘ Difficulty: hard | βœ… Correct: A

πŸ“– Explanation: A mutex lock's entire purpose is to ensure mutual exclusion. It is a synchronization primitive that allows only one thread at a time to enter a critical section. This exclusive access is its defining feature, making it impossible to be shared simultaneously by multiple threads.

Q20. The text states that 'sharable resources cannot be involved in a deadlock.' What is the underlying reason for this?

A.They are always available in unlimited quantities
B.They do not create waiting conditions for processes βœ…
C.They are not managed by the operating system
D.They are always physical resources
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: Deadlocks require a circular chain of waiting processes. A sharable resource, by definition, does not cause a process to wait because multiple processes can access it concurrently. Without waiting, no circular dependency can form involving that resource.

Q21. What is a key challenge in preventing deadlocks by addressing the mutual exclusion condition?

A.It is the easiest condition to break
B.It is the least understood condition
C.Many resources are inherently nonsharable, making it impossible to break βœ…
D.It is the only condition that matters
πŸ’‘ Difficulty: hard | βœ… Correct: C

πŸ“– Explanation: The challenge is that mutual exclusion is not a design flaw but a feature of many resources. A printer, a mutex, a writeable fileβ€”these are resources that cannot be safely shared. Changing them to be sharable would defeat their purpose or corrupt data. Therefore, prevention via this condition is often impossible.

Q22. What is the difference between a sharable resource and a nonsharable resource in terms of deadlock potential?

A.Sharable resources can cause deadlocks; nonsharable resources cannot
B.Nonsharable resources can cause deadlocks; sharable resources cannot βœ…
C.Both can cause deadlocks
D.Neither can cause deadlocks
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: The text explicitly contrasts them: sharable resources cannot be involved in deadlocks because they don't cause waiting. Nonsharable resources, by creating waiting scenarios, are necessary for deadlocks to occur. This is a fundamental distinction in deadlock theory.

Q23. If a system has a mix of sharable and nonsharable resources, which resources should deadlock prevention strategies focus on?

A.The sharable resources
B.The nonsharable resources βœ…
C.Both equally
D.Neither
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: Deadlock prevention strategies must focus on the nonsharable resources. Since sharable resources cannot cause deadlocks, they are not part of the problem. The strategies need to manage the acquisition and release of nonsharable resources to prevent conditions like hold and wait and circular wait from developing.

Q24. What does the mutual exclusion condition require for a resource to be potentially involved in a deadlock?

A.The resource must have multiple instances
B.The resource must be held in a nonsharable mode βœ…
C.The resource must be a physical device
D.The resource must be preemptable
πŸ’‘ Difficulty: easy | βœ… Correct: B

πŸ“– Explanation: The mutual exclusion condition is defined as at least one resource being held in a nonsharable mode. This is a prerequisite for a deadlock to occur, as it creates the possibility of a process being blocked waiting for that resource.

Q25. What is the role of read-only files in the context of deadlock prevention?

A.They are an example of resources that can cause deadlocks
B.They are an example of resources that do not require mutual exclusion βœ…
C.They are an example of resources that are always preemptable
D.They are an example of logical resources
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: Read-only files are used as a positive example of a sharable resource. Because they are read-only, they do not require mutual exclusion. This characteristic makes them safe from being involved in deadlocks, as processes never need to wait for them.

Q26. Which of the following is NOT a reason why deadlocks cannot be prevented by denying mutual exclusion?

A.Some resources are physically nonsharable (like printers)
B.Some resources are logically nonsharable (like mutexes)
C.Making all resources sharable would violate the purpose of some resources
D.Mutual exclusion is not a necessary condition for deadlocks βœ…
πŸ’‘ Difficulty: hard | βœ… Correct: D

πŸ“– Explanation: Mutual exclusion is a necessary condition for deadlocks. However, the reason prevention via denial is not feasible is that many resources are inherently nonsharable. The statement that mutual exclusion is not necessary is false. The other options correctly identify the practical limitations of this approach.

Q27. A process requests access to a mutex lock. What must happen for the process to proceed?

A.It must wait until the lock is released βœ…
B.It can access the lock simultaneously with other processes
C.It is granted immediate access
D.It is terminated
πŸ’‘ Difficulty: easy | βœ… Correct: A

πŸ“– Explanation: A mutex lock is nonsharable. Only one process can hold the lock at a time. If another process tries to acquire it, it will be blocked (must wait) until the lock is released by its current owner. This waiting is what makes it susceptible to deadlocks.

Q28. What is the fundamental reason that multiple processes can access a read-only file simultaneously without conflict?

A.The file is stored in a special memory area
B.The file's data is not being modified βœ…
C.The file is small
D.The file is always cached
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: The key is the 'read-only' nature. Since no process is changing the data, there is no risk of inconsistency. Multiple readers can view the same data without interfering with each other. This eliminates the need for mutual exclusion.

Q29. Which of the following resources would most likely be considered nonsharable and thus a potential cause of deadlocks?

A.A read-only file
B.A shared memory segment used for reading
C.A printer βœ…
D.A global variable used for reading
πŸ’‘ Difficulty: medium | βœ… Correct: C

πŸ“– Explanation: A printer is a classic nonsharable physical resource. Only one process can use a printer at a time to print a document. Other processes that need to print must wait. This nonsharable nature makes it a candidate for deadlocks, unlike sharable resources like read-only files.

Q30. The text concludes that we cannot prevent deadlocks by denying the mutual-exclusion condition. What is the main implication of this conclusion?

A.Deadlock prevention is impossible
B.Deadlock prevention must focus on other necessary conditions βœ…
C.Deadlocks cannot be prevented at all
D.The mutual exclusion condition is not important
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: The conclusion directly implies that deadlock prevention strategies must target the other three conditions: hold and wait, no preemption, or circular wait. This is a crucial point that guides the design of deadlock prevention algorithms, which focus on resource request ordering and allocation policies rather than trying to make all resources sharable.

Q31. What is the relationship between a resource's nonsharable nature and the waiting state?

A.Nonsharable resources cause processes to wait, which can lead to deadlocks βœ…
B.Nonsharable resources eliminate waiting
C.Nonsharable resources can be accessed by multiple processes
D.Nonsharable resources are always available
πŸ’‘ Difficulty: medium | βœ… Correct: A

πŸ“– Explanation: Nonsharable resources are the cause of waiting. Since only one process can use them at a time, other processes must wait if they request the resource while it is in use. This waiting is a necessary condition for a deadlock, as it allows for the build-up of a circular chain of dependencies.

Q32. Which of the following would be the most effective way to prevent deadlocks involving a mutex lock?

A.Making the mutex lock sharable
B.Ensuring processes acquire mutex locks in a specific order βœ…
C.Ignoring the mutex lock
D.Using a semaphore instead
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: Since a mutex lock is intrinsically nonsharable, the mutual exclusion condition cannot be broken. The most effective prevention is to manage how the lock is acquired. Ensuring a global lock ordering prevents circular wait. This is a classic deadlock prevention technique that works with nonsharable resources.

Q33. The text mentions that 'at least one resource must be nonsharable' for a deadlock. This means:

A.All resources in a deadlock must be nonsharable
B.At least one resource in a deadlock scenario must be nonsharable βœ…
C.All resources in a system must be nonsharable
D.Resources are irrelevant to deadlocks
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: The condition specifies 'at least one.' This means a deadlock can occur even if some resources are sharable, as long as there is at least one nonsharable resource involved in the cycle. This highlights that even one nonsharable resource can be the seed for a deadlock if not managed properly.

Q34. A system has a resource that is sharable but has a limited number of instances. Can this resource cause a deadlock?

A.Yes, if all instances are busy
B.No, because it is sharable βœ…
C.Yes, if processes request it in different orders
D.No, because it is a logical resource
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: A sharable resource, by definition, does not cause waiting. Even if there are limited instances, if the resource is truly sharable (can be used concurrently), then multiple processes can use the same instance simultaneously. The concept of 'instances' is less relevant; if two processes can use the same instance at the same time, no waiting occurs.

Q35. What is the key difference between a read-only file and a mutex lock in terms of deadlock potential?

A.The read-only file is a physical resource; the mutex lock is a logical resource
B.The read-only file is sharable and cannot cause deadlocks; the mutex lock is nonsharable and can cause deadlocks βœ…
C.The read-only file is more likely to cause deadlocks
D.There is no difference
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: This contrast is explicitly made in the text. Read-only files are the example of a safe, sharable resource. Mutex locks are the example of an unsafe (in terms of deadlock potential), nonsharable resource. This highlights how the nature of the resource determines its role in deadlocks.

Q36. Why is it impossible to make a mutex lock a sharable resource?

A.Because the operating system does not allow it
B.Because its entire purpose is to provide exclusive access βœ…
C.Because it is a hardware device
D.Because it is too complex
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: A mutex lock is a synchronization primitive. Its sole purpose is to enforce mutual exclusion. If it were made sharable, it would cease to function as a mutex, as multiple threads could enter the critical section simultaneously, defeating its purpose and causing data corruption.

Q37. What does the text mean when it says sharable resources 'cannot be involved in a deadlock'?

A.They can be part of a deadlock if not managed properly
B.They are immune to being part of a deadlock cycle βœ…
C.They can cause deadlocks under certain conditions
D.They are always preemptable
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: This is a definitive statement. Because sharable resources do not cause processes to wait, a cycle of dependencies cannot be formed that includes a sharable resource. If a resource is in a cycle, it must be one that processes are waiting for, which means it must be nonsharable. Therefore, sharable resources are immune from being part of a deadlock.

Q38. What is the main takeaway regarding mutual exclusion and deadlock prevention?

A.Mutual exclusion is the easiest condition to break
B.Mutual exclusion is a necessary condition that is often impossible to break, so prevention must target other conditions βœ…
C.Mutual exclusion is not a necessary condition
D.Mutual exclusion can be broken by making all resources sharable
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: The text's main point is that while mutual exclusion is necessary for deadlocks, it is not a practical target for prevention. The inherent nature of many resources makes them nonsharable. Therefore, effective prevention strategies focus on the other conditions, acknowledging that mutual exclusion will continue to exist for certain resources.

Q39. A process requests a printer and then a scanner. Both are nonsharable. How does the mutual exclusion condition apply here?

A.It doesn't apply because they are different resources
B.It applies to both resources, as each is held in a nonsharable mode βœ…
C.It applies only to the printer
D.It applies only to the scanner
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: The mutual exclusion condition is met for both resources. Since both a printer and a scanner are nonsharable (only one process can use each at a time), they both contribute to the mutual exclusion requirement. This is why systems with multiple nonsharable resources are at risk of deadlocks.

Q40. What is the relationship between mutual exclusion and the concept of 'waiting' in deadlocks?

A.Mutual exclusion eliminates waiting
B.Mutual exclusion creates the need for waiting βœ…
C.Waiting creates mutual exclusion
D.They are unrelated
πŸ’‘ Difficulty: easy | βœ… Correct: B

πŸ“– Explanation: Mutual exclusion (nonsharable resources) is the direct cause of waiting. If a resource is nonsharable and is held by one process, any other process requesting it must wait. This waiting is a necessary component of a deadlock. If resources were sharable, no one would need to wait.

Q41. Why is a printer considered a nonsharable resource in most operating systems?

A.Because it is a physical device
B.Because only one process can print at a time βœ…
C.Because it is a logical device
D.Because it is always preemptable
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: A printer is nonsharable because its nature requires exclusive use. Two processes cannot simultaneously send print jobs to a single printer and have the output not get interleaved and corrupted. The printer's mechanism requires serialization, making it a nonsharable resource.

Q42. What is the effect of making a resource sharable on the deadlock problem?

A.It increases the risk of deadlocks
B.It eliminates the risk of deadlocks involving that resource βœ…
C.It has no effect
D.It makes the system more complex
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: Making a resource sharable removes the waiting condition for that resource. If a resource is sharable, processes never have to wait for it, so it cannot be part of a circular wait. Therefore, making resources sharable is a form of deadlock prevention, but as the text notes, it is not always feasible.

Q43. The text states that 'a process never needs to wait for a sharable resource.' What does this imply about the resource's availability?

A.The resource is always available
B.The resource can be accessed concurrently βœ…
C.The resource is unlimited
D.The resource is not in demand
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: The key is concurrent access. A sharable resource can be used by multiple processes at the same time. Therefore, even if one process is using it, another can also use it without conflict. This eliminates the need for waiting, as there is no 'busy' state from the perspective of an individual process.

Q44. If a system has a single nonsharable resource and multiple processes, what is required to prevent a deadlock?

A.The mutual exclusion condition must be broken
B.The other conditions (like hold and wait) must be prevented βœ…
C.The resource must be shared
D.The processes must not request the resource
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: With a single nonsharable resource, a deadlock cannot occur because there is no circular wait (you need at least two resources to form a cycle). However, deadlock prevention generally focuses on the other conditions. Even with one resource, preventing hold and wait (e.g., by using a queue) ensures the system remains orderly, but it's not a deadlock issue per se. The text emphasizes that prevention strategies target the other conditions because mutual exclusion is often a given.

πŸ”— Related Topics (MCQs)