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.
From a point 13 cm away from the center, a tangent touches a circle of radius 5 cm. Find tangent length.
There are 15 numbers such that average of first 12 numbers is 45 while the average of last five numbers is 56. Find the 12th number, if the ratio betwee...
A container holds a mixture of juice and water in the ratio of 5:2. When 6 liters of juice are added to the mixture, the ratio of...
Aman bought 21 notebooks for Rs.1250 from shop A and 12 notebooks for Rs.895 from shop B. What is the average price he paid per book?
A shopkeeper sells an article at a profit of 12.5% on the selling price. Find the actual profit percentage.
In the each question, the given two series following the same pattern, then find the pattern used in the 1st series and use the pattern to find the unkn...
In 2022, Priya's income was Rs. 18000, out of which she spent 45% and saved the rest. In 2023, if her income increased by 15% and...
If the ratio of areas of two circle is 25:49, then the ratio of their circumferences will be:
Calculate the percentage contribution of the South branch's total revenue to the company's total revenue over the three years (2021-2023).
If (a + b) = 8 and ab = 10, then find the value of (a2Â + b2).