Chapter 29 Flashcards
What are 2 techniques for the recovery of deadlock
- Process termination
2. Resource preemption
How deadlock detection works
Allow system to enter a deadlock state. There is detection algorithm to detect deadlock. If deadlock found then recovery of system.
What algorithm used for deadlock detection in single instance resource type
Wait-for graph
What are types of nodes in resource allocation graph
Processes and resource
What is available data structure in bankers algorithm
It tells available instances of resources
What are 3 possibilities of invoking deadlock detection algorithm
- Run deadlock detection algorithm every time request can not be granted immediately. It is very expensive.
- Monitor CPU utilization and when it lowers to some watermark then run detection algorithm
- Run detection algorithm arbitrarily
What are 2 ways in Process termination
- kill all processes in deadlock
2. kill processes one by one and check if system came out of deadlock or not
What is resource preemption
Take resources from process so deadlock break
What is rollback in resource preemption
Process return to some safe state, restart process from that state.
What are 3 main issues in resource preemption
- Selecting a victim
- Rollback
- Starvation