21. Deadlock Management Flashcards

1
Q

Deadlock

A
  • The permanent blocking of a set of processes that either compete for system resources or communicate with each other
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Process-Resource Dependency Graph

A
  • Processes and resources are nodes
  • An edge exists from a process to a resource if the process is requesting that resource
  • An edge exists from a resource to a process if that process has already acquired the resource
  • A deadlock occurs when there is a loop in the graph
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Necessary and Sufficient Conditions for Deadlock

A
  • Multiple processes sharing multiple resources
  • Resources have limited capacity
  • Processes may hold some resources while waiting for others
  • A closed chain of dependency in the process-resource graph
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Flaw of Deadlock Prevention

A
  • Change the system so that conditions do not hold
  • Not a practical solution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Flaw of Deadlock Detection & Recovery

A
  • Detect loops in graph and break them
  • Hard to detect a lack of progress and reconstruct the dependency graph
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Flaw of Deadlock Avoidance

A
  • Do not entire a doomed state in the first place
  • Processes may be stalled unnecessarily
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Banker Algorithm

A
  • Given a request for process i and resource k
  • Assume we grant the request
  • Recalculate available resources and remaining needs
  • Check if the system can finish execution in this configuration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Banker Algorithm R(k)

A
  • The total amount of resource R_{k} in the system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Banker Algorithm C_{i}(k)

A
  • The total amount of resource R_{k} that process P_{i} will ever need
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Banker Algorithm A_{i}(k)

A
  • The total amount of resource R_{k} currently allocated to process P_{i}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Banker Algorithm V(k)

A
  • The total amount of resource R_{k} currently available
  • Equal to the total minus the sum of the current allocation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Banker Algorithm N_{i}(k)

A
  • The total amount of resource R_{k} currently needed by process P_{i} to complete its execution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Limitations of the Banker Algorithm

A
  • There may exist a state that would not lead to a deadlock that is deemed unsafe by the algorithm
  • Deadlocks are still possible if processes declare inexact values of C_{i}(k) or if there are hidden shared resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly