Concurrent Processes II Flashcards
(5 cards)
1
Q
What is a deadlock ?
A
When two processes are stuck, wiating indefinitely for resources the other is holding.
2
Q
What are the conditions necessary for deadlock ?
A
Mutual Exclusion,
Resource holding,
No preemption,
Circular wait.
3
Q
How can we handle deadlocks ?
A
Prevention - break one of the deadlock conditions,
Avoidance - use algorithms to check for safe states before granting resources,
Detection - allow deadlocks to occur and detect them with Rescource Allocation Graphs.
4
Q
What is the Banker’s Algorithm ?
A
Evaluates the system state before granting resource requests.
5
Q
What is a “Safe State” ?
A
A state is safe if it is possible for all processes to finish their execution.