Deadlocks Flashcards
Explain how deadlocks can be prevented.
By preventing one of the “Coffman conditions” from occurring, because all conditions must be satisfied in order for deadlocks to occur and if we can break one of them, then deadlocks will be prevented.
Explain Attack Mutual Exclusion (deadlock prevention)
Only allocate necessary resources to minimize contention.
Explain Attack Hold-and-Wait (deadlock prevention)
o Require processes to request all needed resources at once (may be impractical).
o Make processes release current resources before requesting new ones.
Explain Attack No Preemption (deadlock prevention)
o Virtualize resources to prevent direct access.
o Limit resource access to specific processes, reducing the chance of deadlock.
Explain Attack Circular Wait (deadlock prevention)
o Limit processes to one resource at a time (difficult to implement).
o Use a global numbering system for resources; processes must request them in numerical order to avoid circular waits.