Resource-Allocation Graph(资源分配图) A set of vertices V and a set of edges E.(一个顶点的集合Ⅴ和边的集合E) V is partitioned into two types:(V被分为两个部分) P=(P1, P2,., Pn], the set consisting of all the processes in the system.(P:含有系统中全部的进程) R=(R1, R2,..., Rmi, the set consisting of all resource types in the system.(R:含有系统中全部的资源 request edge- directed edge P1→R(请求边:直接P1→R) assignment edge- directed 09e→P(分配边:P1→月) Applied Operating System Concepts 86 Silberschatz, GalVin, and Gagne@1999
Silberschatz ,Galvin, and Gagne©1999 8.6 Applied Operating System Concepts Resource-Allocation Graph(资源分配图) • V is partitioned into two types:(V被分为两个部分) – P = {P1 , P2 , …, Pn }, the set consisting of all the processes in the system.(P:含有系统中全部的进程) – R = {R1 , R2 , …, Rm}, the set consisting of all resource types in the system.(R:含有系统中全部的资源) • request edge – directed edge P1 → Rj(请求边:直接P1 → Rj ) • assignment edge – directed edge Rj → Pi(分配边:P1 → Rj ) A set of vertices V and a set of edges E.(一个顶点的集合V和边的集合E)
Resource-Allocation Graph(Cont 咨源分配 Process进程 ° Resource Type with4 instances有四个实例的资源类型 ° Pi requests instance of R(P请求一个R的实例) R · Pi is holding an instance of R(P并有一个R的实例) P1日 Applied Operating System Concepts 87 Silberschatz, GalVin, and Gagne@1999
Silberschatz ,Galvin, and Gagne©1999 8.7 Applied Operating System Concepts Resource-Allocation Graph (Cont.) 资源分配图续 • Process进程 • Resource Type with 4 instances有四个实例的资源类型 • Pi requests instance of Rj ( Pi 请求一个Rj的实例) • Pi is holding an instance of Rj( Pi 持有一个Rj的实例) Pi Pi Rj Rj
Example of a Resource Allocation Graph 资源分配图的例子 R R2 Applied Operating System Concepts 88 Silberschatz, GalVin, and Gagne@1999
Silberschatz ,Galvin, and Gagne©1999 8.8 Applied Operating System Concepts Example of a Resource Allocation Graph 资源分配图的例子
Resource Allocation Graph With A Deadlock 死销的瓷源分配图 月1 R Applied Operating System Concepts 8.9 Silberschatz, GalVin, and Gagne@1999
Silberschatz ,Galvin, and Gagne©1999 8.9 Applied Operating System Concepts Resource Allocation Graph With A Deadlock 有死锁的资源分配图
Resource Allocation Graph with a cycle But No deadlock 有环但没有死锁的资源分配图 ( ea Applied Operating System Concepts 8.10 Silberschatz, GalVin, and Gagne@1999
Silberschatz ,Galvin, and Gagne©1999 8.10 Applied Operating System Concepts Resource Allocation Graph With A Cycle But No Deadlock 有环但没有死锁的资源分配图