Question
Which of the following is a key challenge in handling
deadlocks in an operating system?Solution
Detailed Explanation: Deadlocks occur when a set of processes is blocked because each process is holding a resource and waiting for another resource held by another process. One of the primary methods for detecting deadlocks is using the resource allocation graph (RAG) . A cycle in this graph indicates a potential deadlock when resources are not reusable or preemptible. Detecting cycles involves examining the directed graph of resources and processes to find circular dependencies. Algorithms like Depth First Search (DFS) are commonly used for this purpose in deadlock detection. Deadlock detection is critical in systems where prevention or avoidance mechanisms are impractical, such as distributed systems. Once detected, the system must recover by terminating one or more processes or preempting resources, which can be complex and resource-intensive. Why Other Options Are Incorrect:
- Option A: Allocating resources fairly is more related to system performance and fairness policies rather than deadlock handling. Fairness does not directly address circular wait or hold-and-wait conditions.
- Option B: Preventing starvation is a separate issue. Starvation happens when low-priority processes wait indefinitely, often due to poor scheduling, not necessarily because of deadlocks.
- Option D: FCFS is a scheduling algorithm that manages the sequence of process execution but does not directly address or solve deadlocks.
- Option E: Managing shared memory involves synchronization and mutual exclusion issues but is not inherently about detecting cycles in deadlocks.
According to the RBI's Urban Consumer Confidence Survey (UCCS) for May 2025, what is the value of the Current Situation Index (CSI)?
Nehru Memorial Museum and Library has been renamed as?
What is the primary objective of the 'Traditional and Complementary Medicine Project Collaboration Agreement' signed between WHO and the Ministry of Ayush?
What is the name of the anti-drone system deployed by Punjab to prevent cross-border smuggling?
Who won silver in men’s category in the BWF World Championships 2021 in Huelva, Spain?
Who is the author of the book "Becoming Gandhi," which explores Mahatma Gandhi's ideals and principles and their relevance in today's world?
Who is the third Indian chess player to defeat the world's number one player, Magnus Carlsen, in classical chess?
Which team won the inaugural Women’s Hockey India League 2024?
What feature of the "Flash Pay" RuPay smart key chain launched by Federal Bank emphasizes enhanced security for contactless payments?
In test match cricket, how many minimum overs can a team play in a day?