Deadlock _ AI Flashcards

(40 cards)

1
Q

What is a deadlock?

A

Threads waiting for each other’s resources

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

Impact of deadlock?

A

Concurrent processes cannot complete

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

Methods to handle deadlocks?

A

Prevention, avoidance, detection, recovery

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

System resources consist of?

A

Finite resources among competing threads

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

Resource request sequence?

A

Request → Use → Release

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

Resource request via?

A

System calls (e.g., open/close)

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

Example deadlock problem?

A

Dining philosophers

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

Common sync tools?

A

Mutex locks and semaphores

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

Mutual exclusion?

A

Resource non-sharable

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

Hold and wait?

A

Holding and waiting for resources

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

No pre-emption?

A

Resources released voluntarily

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

Circular wait?

A

Cycle of threads waiting

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

How many conditions for deadlock?

A

All four must hold

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

Resource-allocation graph?

A

Directed graph of threads/resources

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

Request edge?

A

Thread → Resource request

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

Assignment edge?

A

Resource → Thread allocated

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

Threads shown as?

18
Q

Resources shown as?

A

Rectangles with instance dots

19
Q

No cycle implies?

20
Q

Cycle implies deadlock when?

A

Single instance per resource

21
Q

Cycle with multiple instances?

A

Deadlock may not occur

22
Q

Three main approaches?

A

Ignore, prevent/avoid, detect/recover

23
Q

Ignoring deadlocks cost?

A

Cheaper, dev-managed

24
Q

Goal of prevention?

A

Prevent a necessary condition

25
Prevention method?
Constrain request order
26
Avoidance requires?
Advance resource usage info
27
Avoidance decision based on?
Available, allocated, future requests
28
Avoidance side effect?
Low utilization
29
Detection graph variant?
Wait-for graph
30
Wait-for graph edge?
Thread→Thread wait
31
Detection overhead?
Runtime cost, recovery losses
32
Break deadlock methods?
Abort threads or preempt resources
33
Recovery option 1?
Abort all deadlocked processes
34
Recovery option 2?
Abort one process at a time
35
Reclaim resources from?
Terminated processes
36
Define system model importance?
Shows resource allocations
37
Primary deadlock methods?
Prevention, avoidance, detection, recovery
38
Prevention vs avoidance?
Limits requests vs uses info
39
Recovery methods?
Abort or preempt
40
List main topics?
Model, characterization, handling methods