Loading approved document…

Approved · Study Friend
1 / 1
100%
SF
STUDY FRIENDTRB Computer Science · Revision Note
1
UNIT 4 · OPERATING SYSTEMS

Deadlock: Detection & Recovery

Quick revision guide for TRB Computer Instructor

Core idea

A deadlock is a state in which every process in a set waits for an event that only another process in the set can cause.

1. Detection approach

The system permits deadlocks, then periodically runs a detection algorithm using allocation and request matrices.

  • Single instance: wait-for graph
  • Multiple instances: matrix-based detection
  • Detection frequency depends on system cost

2. Recovery methods

After detection, the operating system may terminate processes or preempt resources.

  1. Process termination
    Abort all or one process at a time.
  2. Resource preemption
    Choose a victim, roll back and prevent starvation.
TRB exam tipVictim selection considers priority, work completed and resources held.
Mentor reviewed · secure copystudyyogi.kalviyogi.comFor personal study use
1 / 1