2,648 views

4 Answers

Best answer
2 votes
2 votes

Deadlock means something specific: there are two (or more) processes that are currently blocked waiting for each other.

In an unsafe state you can also be in a situation where there might be a deadlock sometime in the future, but it hasn't happened yet because one or both of the processes haven't actually started waiting.

Process       Max Need       Current
P0:             10              5
P2:              9              3

This is an unsafe state. But we're not in a deadlock. There's only 4 free drives, so, for example, if P0 does request an additional 5, and P2 does request an additional 1, we will deadlock, but it hasn't happened yet. And P0 might not request any more drives, but might instead free up the drives it already has. The Max need is over all possible executions of the program, and this might not be one of the executions where we need all 10 drives in P0.

selected by
0 votes
0 votes

Ya it is Unsafe State. 

Becoz Not all Unsafe State will Leads to Deadlock.

See this Link:

https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/7_Deadlocks.html

0 votes
0 votes
The state is safe does not mean deadlock is impossible It simply means there is an order by following which we can avoid deadlock.whenever there is any resource request os will check whether granting that will lead to a safe state or not.just because the system is in unsafe state that does not mean that deadlock will definitly occure.it will depend on an order and number of resource request by other processes.other process may request resource less than required fr deadlock to happen(when the system is in unsafe state).
0 votes
0 votes

Yes the answer is unsafe . As far I know banker algorithm given us just the state of machine as safe and unsafe . That all . And the fact that unsafe may or may not be deadlock . So chose unsafe as answer . They have even said state of the system . They didn't sate of system at that particular instant ( note the difference ) . It might happen that after some time with a new request we can go to safe sate . So unsafe is safest answer yet 

t we would choose deadlock as answer for state of system , then any further request won't help us to get out of situation . I hope you got it  :)smile emoticon

Related questions

3 votes
3 votes
3 answers
1
radha gogia asked Oct 14, 2015
866 views
I got the state to be unsafe since Available is (1,1) which can't satisfy the need of any process so why is not deadlock ?