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.
How is T related to S? Â Â
Answer the following questions based on the information given below.
Seven persons T, U, V, W, X, Y and Z has different weights. T is heavier...
How many persons are shorter than T?
There are five persons Priya, Mohini, Chetna, Alka and Garima, who have different heights. Priya is taller than Garima but shorter than Alka. Chetna is ...
Five persons N, P, R, U and Y have different weights. Only one person has more weight than Y. P is heavier than U but not the heaviest. Weight of second...
Certain number of boxes are in a stack, such that the box, which is at the bottom, is numbered as 1, the box above it as 2 and so on. Box W is 14t...
Six laptops P, Q, R, S, T and U have different prices. P is cheaper than Q. R is not costlier than S. S is not costlier than P. U is costlier than T. Mo...
In a class among five students, F has more marks than G and H, but H does not have least marks. I has more marks than J and J has more marks than F, who...
Select the combination of letters that when sequentially placed in the gaps of the given letter series will complete the series.
t _ v _ x _ u v w...In a certain code language, "BOND" is coded as 24 and "PLANT" is coded as 67. How will "SMART" be coded in that language?