当前位置: 代码迷 >> 综合 >> 操作系统(六)DeadLock
  详细解决方案

操作系统(六)DeadLock

热度:15   发布时间:2024-01-12 16:08:28.0

文章目录

  • 一、概念
  • 二、4个必要条件
  • 概念题


在这里插入图片描述

一、概念

A set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause.

二、4个必要条件

  • Mutual exclusion condition(互斥执行)
    ? Each resource is either currently assigned to exactly one process or is available.

  • Hold and wait condition(保持和等待)
    ? process holding resources can request additional

  • No preemption condition(非抢占式)
    ? previously granted resources cannot forcibly taken away

  • Circular wait condition(循环等待)
    ? must be a circular chain of 2 or more processes
    ? each is waiting for resource held by next member of the chain

在这里插入图片描述

概念题

  • 死锁条件
    Four Conditions for Deadlock: Mutual exclusion ,Hold and wait, No preemption and Circular wait
  相关解决方案