10,624 views
7 votes
7 votes
If a process is in unsafe state, then:
(a) It is in deadlock (b) It might successfully complete
(c) It will lead to deadlock (d) None of the above

6 Answers

Best answer
13 votes
13 votes

All safe states are deadlock free. But not all unsafe states lead to deadlock. There might be a possibility that an unsafe state might complete successfully. Unsafe states are a necessary condition for deadlock, but not sufficient. 

Hence  (b) It might successfully complete is the correct answer.

Option (c) is not correct because it means it will definitely lead to deadlock, which is incorrect. 

selected by
3 votes
3 votes

 All safe states are deadlock free, but not all unsafe states lead to deadlocks .

So, option A is wrong

Option B is correct In Galvin, it says Not all unsafe states are deadlock, however. An unsafe state may lead to deadlock, 

so it is possible that a process can complete successfully .

Option C is also wrong . As it tell surely unsafe state lead to deadlock , but there is no surety for deadlock. An unsafe state May or May not lead to Deadlock .

2 votes
2 votes
Edited Answer,

When process goes to unsafe state, it is an indication that there are not enough available resources for it and processor will not allocate those many requests to the new process, instead it will put the process in the waiting list and that process will be in the waitining list, once enogh resources are available it will be allocated and that process will eventually completed.

Hence B is answer.

I didnt know that, process will be in waiting list.

Thanks for the down vote to correct me .
edited by
1 votes
1 votes

Avoid all confusion and remembering sufficient and necessary conditions, just remember one single statement and you would able to derive it on the fly 

Safe → No deadlock 

 

The above implication is enough to say that a safe condition is a sufficient but not a necessary condition for deadlock,and an unsafe condition is a necessary but not sufficient condition for deadlock. Now it is pretty confusing to remember things like this, at least as it appears for me, I don’t know about others.

Just the different ways of translating implication in English and you are good to go !!!!!!!

edited by
Answer:

Related questions

9 votes
9 votes
1 answer
1
Nancy Pareta asked May 28, 2018
4,207 views
The time complexity of banker's algorithm to avoid deadlock having $n$ processes and $m$ resources is?
3 votes
3 votes
2 answers
2
asu asked Nov 15, 2015
6,702 views
It the Resource-Allocation Graph contains $'m'$ types of resource and $'n'$ processes, then the time complexity of the algorithm for deciding whether the system is safe o...