Deadlock and Distributed Deadlock Flashcards

1
Q

4 necessary deadlock conditions

A

mutual exclusion

hold and wait

no preemption

circular wait

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

what is hold and wait

A

allowing processes to hold previously acquired resources while waiting for additional ones

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

3 deadlock handling strategies

A

deadlock prevention

deadlock avoidance

deadlock detection/recovery

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

2 types of resources

A

reusable resources

consumable resources

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

idea of Havender’s linear ordering scheme

A
  • the idea is deadlock prevention by eliminating circular wait
  • resources are ordered in some way by id or priority
  • processes can only request resources of higher id or priority than they currently have. since resource request are uni-directional, circular-wait is impossible
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The part of Banker’s algorithm I’m likely to forget

A

To find available resources sum up each column in “Allocated” and subtract from Total-Max

Max Resources for process = Allocation + Need

When you are checking to see if a request is safe, subtract request value from “Available”. Then look at need matrix to see if any of the processes can be completed (“Available” has greater than or equal to the number of resources of each kind that are needed by that process).

If a process can be completed, subtract the need from “Available”. Then add “Max” to available. Repeat process to determine if all processes can be completed.

if yes = safe
if no = not safe

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

Resource graph semantics

A

if a process node has a directed edge towards a resource node = request for that resource

edge from resource node to process node = process is holding that resource

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

system model

A

a set of assumptions to reduce the complexity of deadlock detection

  • reusable resources only
  • only exclusive access to resources (no concurrent use)
  • each resource only has one instance (only one unit of each resource)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is a wait-for graph? (WFG)

A

a resource graph without the resource nodes for simplicity

P1 –> P2 implies P1 –> R –> P2

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

centralize deadlock control algorithm

A
  • control site maintains WFG of the entire system
  • when a site requests or releases a resource it sends a message to the control site.
  • each time the control site receives a message it updates the WFG and the inspects it to see if a deadlock is present
How well did you know this?
1
Not at all
2
3
4
5
Perfectly