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.

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

What are the conditions necessary for deadlock ?

A

Mutual Exclusion,
Resource holding,
No preemption,
Circular wait.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

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

What is the Banker’s Algorithm ?

A

Evaluates the system state before granting resource requests.

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

What is a “Safe State” ?

A

A state is safe if it is possible for all processes to finish their execution.

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