如何避免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. C#使用log4net

    C#很多异步机制使程序无法使用断点调试,这时候我们就需要使用日志输出.使用log4net一定要先引用net4log这个dll,不然无法使用. 作者很懒,直接上代码吧. using System; us ...

  2. 轻量级jQuery工具提示插件tooltipsy使用方法

    今天想给单位的系统弄一个提示插件,懒得自己做,于是就上网百度了几个jQuery插件,挺好用的.下面以tooltipsy插件为例,说明如何使用这些插件. 一.下载 首先到tooltipsy的官网http ...

  3. MongoDB资料--Java驱动, Hadoop驱动, Spark使用

    MongoDB数据库备份: mongodump -h 192.168.1.160 -d MapLoc -o /usr/local/myjar/mongo/MapLoc/数据库还原:mongoresto ...

  4. ImageView显示不出来图片

    问题?? 用ImageView控件方法:public void setImageBitmap(Bitmap bm)来显示生成的bimap,结果在图片显示区域显示一片空白,而且其他控件颜色没变化,造成I ...

  5. poj3164 (朱刘算法 最小树形图)

    题目大意:给定n个点坐标,m条有向边,要求最小树形图. 题解:直接上模板,前面打的 vis[v]=i一直把i打成1,一直TLE. #include<iostream> #include&l ...

  6. How to install phpmyadmin on centos 6

    Phpmyadmin :   Phpmyadmin is a free tool used to administrate MySQL . Phpmyadmin supports all major ...

  7. poj1014:母函数+优化

    题目大意: 有1~6六种宝石,价格分别为1~6 ..给定每种宝石的个数,问能否平分给两个人 分析: 一看显然是个多重背包问题,也可以用母函数做 不过母函数的复杂度是n*v*k,第一次tle了.. 后来 ...

  8. MVC中使用EF(2):实现基本的CRUD功能

    MVC中使用EF(2):实现基本的CRUD功能 By  Tom Dykstra |July 30, 2013 Translated by litdwg   Contoso University示例网站 ...

  9. Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法

    抛错: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document ...

  10. centerOS安装chkrootkit

    Chkrootkit是一个在本地系统检查rootkit痕迹的工具,它是检查系统二进制文件是否被rootkit病毒修改的一个shell脚本. (1)centerOS安装chkrootkit 安装gcc编 ...