Thought of Today : “When I See A Hot Girl,
I Take Two Seconds To Plan Our Future Together “
Q?What is this deadlock problem
/>A situation in which the set of blocked processes each holding a
resource and waiting to acquire
a resource held by another
process in the set is called deadlock problem
/>during deadlock starvation occurs
Q?how can deadlock arise
/>it can arise if four conditions hold simultaneously
1>Mutual exclusion : only one
process at a time can use a resources
2>Hold and wait : a process holding
at least one resource is
waiting to acquire
additional resources held by
other processes.
3>No preemption : a resource can be only voluntarily by the
process holding it, after that process has completed its task. there
is no timeslice
4>Circular wait: there exists a set of waiting processes such that p0
is waiting for resources held by p1
and so on …
Q?what is a resource allocation graph
/>
Resource allocation graph with deadlock
Resource allocation graph with cycle but no deadlock
/>usually rule is graph having no
cycles has no deadlock
/>here we have more than 1 instances so no deadlock
Q?how can we perform deadlock prevention
/>we have the solution for following cases
/1>Mutual Exclusion : not used for
sharable resources, must be used for nonsharable resources
/2>Hold and Wait : we must guarantee that whenever a process
requests a resource, it does not hold any other resources
Request All First (RAF):
ReleaseBefore Request(RBR):
/3>No preemption : we perform preemption : having time-slice
option for all the processes who are incomplete (this processes are
kept in the waiting list to be accessed later)
/4>Circular Wait : we do the Hierarchical
Resource Usage (HRU) by imposing the interger number and
categorizing the processes on the basis of the hierarchy.
Comments
Post a Comment