COMSCI 2101 - PROCESS MANAGEMENT (DEADLOCK)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

17 Terms

1
New cards

- Deadlock
- Starvation

A lack of process synchronization can result in two extreme conditions:

2
New cards

Deadlock

A problem where resources needed by some process to finish execution are held by other processes, which, in turn, are waiting for other resources to
become available.

3
New cards

Deadlock

also called deadly embrace

4
New cards

Deadlock

infrequent in batch systems, and more prevalent in interactive
systems.

5
New cards

• Case 1: Deadlocks on File Requests
• Case 2: Deadlocks in Databases
• Case 3: Deadlocks in Dedicated Device Allocation
• Case 4: Deadlocks in Multiple Device Allocation
• Case 5: Deadlocks in Spooling
• Case 6: Deadlocks in a Network
• Case 7: Deadlocks in Disk Sharing

Seven Cases of Deadlock

6
New cards

Case 5: Deadlocks in Spooling

• The spooler accepts output from several users and acts as a
temporary storage area for all output until the printer is ready
to accept it.
• This process is called _______.

7
New cards

- Mutual Exclusion
- Resource Holding
- No Preemption
- Circular Wait

Conditions for Deadlock

8
New cards

Mutual Exclusion

- act of allowing only one person (or process) to have access to a step (a dedicated resource)

9
New cards

Resource Holding

- When two people meet on the stairs and each one holds ground and waits for the other to retreat

10
New cards

No Preemption

- Each step is dedicated to the climber; it is allocated to the holder
for as long as needed.

11
New cards

Circular Wait

- Each person (or process) involved in the impasse is waiting for
another to voluntarily release the step (or resource) so that at
least one will be able to continue on and eventually arrive at the
destination.

12
New cards

• Detection
• Prevention
• Avoidance
• Recovery

Strategies for Handling Deadlocks

13
New cards

Detection

The directed graphs presented earlier in this chapter showed
how the existence of a circular wait indicated a deadlock, so it's
reasonable to conclude that deadlocks can be detected by
building directed resource graphs and looking for cycles.

14
New cards

Prevention

To prevent a deadlock, the operating system must eliminate
one of the four necessary conditions, a task complicated by
the fact that the same condition can't be eliminated
from every resource.

15
New cards

Avoidance

Even if the operating system can't remove one of the conditions
for deadlock, it can avoid one if the system knows ahead of time
the sequence of requests associated with each of the active
processes.

16
New cards

Recovery

• Once a deadlock has been detected, it must be untangled and
the system returned to normal as quickly as possible.

• There are several ______ algorithms, but they all have one feature in common:
They all require at least one victim, an expendable job, which, when removed from the deadlock, will
free the system.

17
New cards

Starvation

• So far we have concentrated on deadlocks, the result of liberal
allocation of resources.
• At the opposite end is ________, the result of conservative
allocation of resources where a single job is prevented from
execution because it's kept waiting for resources that never
become available.