Operating System
  • Introduction
  • Chapter 1 Introduction
  • Chapter 2 Operating System Structures
  • Chapter 3 Processes
    • 3.1 Process Concept
    • 3.2 Process Scheduling
    • 3.3 Operation on Processes
    • 3.4 Interprocess Communication
  • Chapter 4 Threads
    • Summary: slides
    • 4.1 Overview
    • 4.2 Multithreading Models
    • 4.3 Thread Libraries
    • 4.4 Threading Issues
  • Chapter 6 Process Synchronization
    • 6.1 Background
    • 6.2 Critical-section problem
    • 6.3 Peterson's Solution
    • 6.4 Synchronization Hardware
    • 6.5 Semaphores
  • Summary ch1
  • Summary ch2
  • Summary ch3
  • Summary ch4
  • Summary ch5
  • Summary ch7
  • Summary ch6
  • Summary ch8
Powered by GitBook
On this page

Was this helpful?

Summary ch7

  1. Deadlock: Permanent blocking of a set of processes that either compete for system resources or communicate with each other.

  2. Reusable Resources:

    -Used by only one process at a time and not depleted by that use

    -Processes obtain resources that they later release for reuse by other processes

    -Processors, I/O channels, main and secondary memory, devices, and data structures such as files and databases

    -Deadlock occurs if each process holds one resource and requests the other

  3. Consumable Resources:

    -Created (produced) and destroyed (consumed)

    -Interrupts, signals, messages, and information in I/O buffers

  4. Conditions for Deadlock

    -Mutual exclusion: Only one process may use a resource at a time

    -Hold-and-wait: A process may hold allocated resources while awaiting assignment of others

    -No preemption: No resource can be forcibly removed from a process holding it

    -Circular wait: A closed chain of processes exists, such that each process holds at least one resource needed by the next process in the chain

  5. Deadlock Avoidance

    -A decision is made dynamically on whether the current resource allocation request will, if granted, potentially lead to a deadlock

    -Requires knowledge of future process requests

    -Resource-allocation-graph algorithm (Chap 7.5.2) is only applicable to systems with single instance of each resource type

    -Do not grant an incremental resource request to a process if this allocation might lead to deadlock (Banker’s Algorithm)

  6. Deadlock Avoidance

    -Maximum resource requirement must be stated in advance

    -Processes under consideration must be independent; their execution order must be unconstrained by any synchronization requirements

    -There must be a fixed number of resources to allocate

    -No process may exit while holding resources

  7. Strategies Once Deadlock Detected

    -Abort all deadlocked processes

    -Back up each deadlocked process to some previously defined checkpoint, and restart all processes

    -Successively abort deadlocked processes until deadlock no longer exists

    -Successively preempt resources until deadlock no longer exists

PreviousSummary ch5NextSummary ch6

Last updated 5 years ago

Was this helpful?