如何避免Deadlock,如果我们能提前知道各个Process对于资源的需求情况,我们就可以用Banker's algorithm (银行家算法) 来解决问题。可是这在现在中不好实现,因为很难提前知道对于资源的需求情况。此时可以用一下两种方法来解决问题。

1. Wait - die Protocol

2. Kill - wait Protocol

具体地,根据两个Process的创建时间,创建时间较早的,我们称之为Older Process (O),较晚的那个称之为Yonger Process (Y), 那么

Deadlock   Wait - die   Kill - wait

O requires a resource held by Y      O waits         O waits    O dies

Y requires a resource held by O      Y waits      Y dies          Y waits

[Database] Deadlock avoidance protocol的更多相关文章

  1. 【故障处理】ORA-28040: No matching authentication protocol

    [故障处理]ORA-28040: No matching authentication protocol 1.1  BLOG文档结构图 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者 ...

  2. system strategies of Resources Deadlock

    In computer science, Deadlock is a naughty boy aroused by compete for resources. Even now,     there ...

  3. Massively parallel supercomputer

    A novel massively parallel supercomputer of hundreds of teraOPS-scale includes node architectures ba ...

  4. Pythonpika PhpAmqpLib rabbitmq服务中queues被清空的异常处理 无模式数据库对数据结构的定义和控制

    /** * Declares queue, creates if needed * * @param string $queue * @param bool $passive * @param boo ...

  5. Method, apparatus, and system for speculative abort control mechanisms

    An apparatus and method is described herein for providing robust speculative code section abort cont ...

  6. Snoop resynchronization mechanism to preserve read ordering

    A processor employing a post-cache (LS2) buffer. Loads are stored into the LS2buffer after probing t ...

  7. PatentTips - Optimizing Write Combining Performance

    BACKGROUND OF THE INVENTION The use of a cache memory with a processor facilitates the reduction of ...

  8. 《modern operating system》 chapter 6 DEADLOCKS 笔记

    DEADLOCKS Both processes are blocked and will remain so forever. This situation is called a deadlock ...

  9. 清华大学ucore操作系统课笔记

    操作系统 清华大学ucore操作系统课笔记 全文思维导图 1. 操作系统概述 1.1 什么是操作系统? 操作系统的定义 没有公认的精确定义 一个控制程序 一个系统软件 控制程序执行过程,防止错误和计算 ...

随机推荐

  1. PHP学习系列(1)——字符串处理函数(5)

    31.ord() 函数返回字符串第一个字符的 ASCII 值. 语法:ord(string) 例子 <?php echo ord("h"); echo ord("h ...

  2. Python中*和**的用法

    好久不用Python,今天在用Python写个小工具的时候发现好些东西都快忘记了,特别是*和**. 什么情况下使用*和**呢(不是C里面的指针哦!) 当函数的参数不确定时,可以使用*args 和**k ...

  3. iOS学习之页面之间传值的方式总结

    传值三种场景: 1.属性传值(从前往后传) 需求:第二个界面标签显示第一个界面输入框文字. 第一步, 在前一个界面定义属性. (语义属性声明为copy); 第二步, 在进入下一个界面之前,给属性传入数 ...

  4. SQL建模错误--逗号分隔值

    最近帮一个客户分析SQL语句的问题,大致经过如下 场景: 委托方有一个用于追踪他们产品的系统,每个产品都会卖给许多客户:但是客户又被从业务上分成两类,一类是带有合作伙伴性质的,这个 合作伙伴通常会给予 ...

  5. 安卓 eclipse项目创建

    一. 创建项目工程 1.  点击 file -> new -> Android Application project -> 2.  创建工程项目名字   自己命名 (注: 不要出现 ...

  6. cf B. The Fibonacci Segment

    http://codeforces.com/contest/365/problem/B #include <cstdio> #include <cstring> #includ ...

  7. Windows进程间通信的各种方法

    原文:Windows进程间通信的各种方法 进程是装入内存并准备执行的程序,每个进程都有私有的虚拟地址空间,由代码.数据以及它可利用的系统资源(如文件.管道等)组成.多进程/多线程是Windows操作系 ...

  8. 【Xamarin 开发 IOS --IOS 页面导航概念Segue】

    Storyboard里面的几种Segue区别及视图的切换:push,modal,popover,replace和custom 一.视图切换类型介绍在storyboard中,segue有几种不同的类型, ...

  9. 关于TCP的三次握手和四次分手(整理)

    这个协议非常重要,这里把它的链接和释放整理一下 首先是三次握手: 1.  客户端发起,像服务器发送的报文SYN=1,ACK=0,然后选择了一个初始序号:seq=x. SYN是干什么用的? 在链接的时候 ...

  10. linux/unix 段错误捕获【续】

    本文为“在C/C++中捕获段错误,打印出错的具体位置”的续篇,进一步解决涉及动态链接库的情况.   背景知识: ·linux/unix下动态链接库的基本原理 ·/proc/pid/maps文件的基本格 ...