Question
Which of the following statements is true about
deadlocks in an operating system?Solution
Deadlocks arise when a set of processes is blocked because each process is holding a resource and waiting for another resource that is currently held by another process in the set. This creates a circular wait condition. Deadlock avoidance is a strategy to ensure that the system never enters a deadlocked state. One such method is implementing the "No Hold and Wait" condition, where processes are required to request all required resources simultaneously or release currently held resources before requesting new ones. This approach prevents the circular wait condition from forming, thereby avoiding deadlocks. For example, in resource allocation, the Banker's Algorithm is a practical method for deadlock avoidance. Why Other Options Are Incorrect :
- Deadlocks occur when multiple processes are competing for a single CPU core in a multithreaded environment : This describes resource contention, not deadlock. Deadlocks involve resources like files, printers, or memory, not CPU cores specifically.
- Deadlocks can only occur when using the Round Robin CPU scheduling algorithm : Deadlocks are independent of CPU scheduling algorithms and depend on resource allocation policies.
- Deadlocks are resolved by the Least Recently Used (LRU) page replacement algorithm : LRU is a page replacement algorithm used in memory management, not for resolving deadlocks.
- Deadlocks cannot occur if the system uses multithreading instead of multiprocessing : Deadlocks can occur in both multithreading and multiprocessing if resource allocation policies create circular waits.
In the question below, some letters are given in two ovals, intersecting each other. The letter(s) given in the intersected portion can be used more tha...
Select a figure amongst the four alternatives that when placed in the blank space(?) of figure X will complete the pattern. (Rotation is not allowed).<...
In a certain code language, NEST is written as 8426, WISE is written as 6912, and RAIN is written as 7859.
The letters do not correspond to ...
Three statements are given, followed by three conclusions numbered I, II and III. Assuming the statements to be true, even if they seem to be at varianc...
An information is given, followed by two statements labelled I and II. Identify which of the statements is/are possible reason(s) behind the given infor...
Which figure should replace the question mark (?) if the following series were to be continued?
Six students Mani, Nisha, Ojas, Parth, Qasim, and Riya are sitting on the classroom bench facing towards the blackboard. Mani is sitting between Parth a...
Statements:
• All trojans are fairies.
• No fairy is a flower.
• All viruses are trojans.
Conclusions:
I. N...
The average weight of A, B and C is 60 kg. If the average weight of A and B is 55 kg and the average weight of B and C is 58 kg, then what is the weight...
BE17 is related to DJ51 in a certain way. In the same way, GJ23 is related to NT69. Which of the following are conect matches following the same logic?<...