操作系统学习之关于死锁的理解
参考书目操作系统——精髓与设计原理(第七版) William Stallings(威廉.斯托林斯)
感觉这本书图文丰富,比那边现代操作系统好读一些
操作系统——精髓与设计原理,这是我见到关于死锁讲解的最为深刻,最容易理解的操作系统的书了。
按照数学中充分条件和必要条件讲解的,甚为亲切啊
原书第六章:
Conditions for Deadlock
• Mutual exclusion(互斥—排它性访问资源)
– only one process may use a resource at a time
• Hold-and-wait(占有且等待—拥有部分资源,还要请求新的)
– A process does not request all of its required resources at one time
• No preemption(非剥夺性—排他性访问资源)
– If a process holding certain resources is denied a further request, that process must not release its original resources
– If a process requests a resource that is currently held by another process, the operating system is not allowed to preempt the second process and require it to release its resources
• Circular wait(循环等待—在进程资源图中有环路)
**若可能发生死锁,则必定要出现三个条件:
1.互斥。一次只有一个进程可以使用一个资源。其他进程不能访问已分配给其他进程的 资源。