top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

When a system in safe state?

0 votes
251 views
When a system in safe state?
posted May 31, 2014 by Amit Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

System will be in safe state if the system could allocate resources to the available process in some order to prevent the dead locak. To be precise, A system is in safe state if there in a safe sequence

Safe and Unsafe States

A state (as in the above example) is considered safe if it is possible for all processes to finish executing (terminate). Since the system cannot know when a process will terminate, or how many resources it will have requested by then, the system assumes that all processes will eventually attempt to acquire their stated maximum resources and terminate soon afterward. This is a reasonable assumption in most cases since the system is not particularly concerned with how long each process runs (at least not from a deadlock avoidance perspective). Also, if a process terminates without acquiring its maximum resources, it only makes it easier on the system. A safe state is considered to be the decision maker if it is going to process ready queue. Safe State ensures the Security.

Given that assumption, the algorithm determines if a state is safe by trying to find a hypothetical set of requests by the processes that would allow each to acquire its maximum resources and then terminate (returning its resources to the system). Any state where no such set exists is an unsafe state
We can use Banker's Algo to get rid of this and avoid deadlock.

answer Jul 6, 2014 by Kali Mishra
...