Os vocab Flashcards
Deadlock
Two ore more programs waiting on each other.
Conditions for Deadlock
Mutual Exclusion, Hold-and-wait, No Preemption, Circular Wait
Mutual Exclusion
Only one process may use a resource at a time
Hold-and-wait
A process may hold allocated resources while awaiting assignment of others.
No Preemption
No resource can be forcibly removed from a process holding it.
Circular Wait
A closed chain of processes exists, such that each process holds at least one resource needed by the next process in the chain.
Deadlock Prevention
Adopt a policy that eliminates one of the possible conditions for deadlock.
Deadlock Avoidance
Make the appropriate dynamic choices based on the current state of resource allocation.
Deadlock Detection
Attempt to detect the presence of a deadlock and take action to recover.
Indirect Deadlock Prevention
Prevent occurrence of one of the three necessary conditions for deadlock- Mutual Exclusion, Hold-and-wait, or No preemption.
Direct Deadlock Prevention
Prevent the occurrence of circular wait.
Deadlock Prevention Behavior
Conservative, under-commits resources.
Deadlock Prevention Strategies
Requesting all resources at once, Preemption, Resource ordering
Requesting all resources at once advantages
Works well for processes that perform a single burst of activity, no preemption necessary
Requesting all resources at once disadvantages
Inefficient: delays process initiation, future resource requirements must be known by process
Preemption advantages
Convenient when applied to resources whose state can be saved and restored easily.
Preemption disadvantages
Preempts more often than necessary.
Resource ordering advantages
Feasible to enforce with compile time checks, needs no runtime computation since problem is solved in system design
Resource ordering disadvantages
Disallows incremental resource requests