Which of the following statements is not true?a)Deadlock can never occ...
Deadlock can’t take place if resources must be requested in same order by process. For deadlock, circular wait is a must condition.
View all questions of this test
Which of the following statements is not true?a)Deadlock can never occ...
's algorithm is used to prevent deadlocks in a system.d)Deadlock occurs when each process is holding onto resources while waiting for other resources to become available.
a) Deadlock can never occur if resources can be shared by competing processes. This statement is not true as deadlock can still occur even if resources are shared by competing processes. Deadlock occurs when each process is waiting for a resource that is held by another process, and sharing resources does not guarantee that deadlock will not occur.
Which of the following statements is not true?a)Deadlock can never occ...
Deadlock occurs when a common variable is shared .
And ,
When you request or execute the processes in same order , you will never face deadlock or spin lock situations .
The reason is quite simple :-
Problem is with RW , WR , WW at the same time but here , we are requesting or executing the processes in the same order , then for eg :-
There are 2 processes P1 and P2 , We are going to execute them in same order . Means , we are going to first execute P1 or P2 and then we are going to execute P2 or P1 . Means we are first completely executing one process and when they terminate successfully then the another one.
So , in this case , we can se that the two processes are not doing anything at the same time. So here , even spinlock is not there and so there is not a chance of deadlock .
I hope you are able to understand this concept.
Thanks.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).