Deadlocks Flashcards

1
Q

Explain how deadlocks can be prevented.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain Attack Mutual Exclusion (deadlock prevention)

A

Only allocate necessary resources to minimize contention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain Attack Hold-and-Wait (deadlock prevention)

A

o Require processes to request all needed resources at once (may be impractical).
o Make processes release current resources before requesting new ones.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explain Attack No Preemption (deadlock prevention)

A

o Virtualize resources to prevent direct access.
o Limit resource access to specific processes, reducing the chance of deadlock.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain Attack Circular Wait (deadlock prevention)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly