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.
What is the total investment approved for the chip assembly unit in Jewar, Uttar Pradesh under the ISM?
Recently Nikos Christodoulides was elected as the new President of which of the following country?
On which date will Karnataka officially hand over kumki elephants to Andhra Pradesh?
The Department of Personnel and Training (DoPT) recently notified the Public Examinations (Prevention of Unfair Means) Act, 2024. This Act includes a pr...
Recently RBI has imposed a monetary penalty on which financial institution for not complying with directions issued on ATM deployment targets?
How much relief assistance did India provide to earthquake-hit Vanuatu in December 2024?
What major infrastructure event is India set to host in September 2024?
Who has been elected as the new president of the Fédération Internationale de l'Automobile (FIA)?
Where are the headquarters of the International Energy Agency?Â
The Reserve Bank of India (RBI) recently joined forces with the Bank for International Settlements (BIS) and central banks of four ASEAN countries to co...