关于安全性算法有个地方我不懂,谁能解释一下,谢谢!!
系统所执行的安全性算法可描述如下:
(1)设置两个向量
工作向量Work。它表示系统可提供给进程继续运行所需要的各类资源数目,它含有m个元素,执行安全算法开始时,work :=Allocation。
Finish。它表示系统是否有足够的资源分配给进程,使之运行完成,开始时先做Finish[i]:=false;当有足够资源分配给进程时,令Finish[i]:=true。
(2)从进程集合中找到一个能满足下述条件的进程:
①Finish[i]=false
②Needi ≤Work
如找到,执行步骤(3);否则,执行步骤(4)。
(3)当进程只获得资源后,可顺利执行,直至完成,并释放出分配给它的资源,故执行
Work :=Work+Allocationi;
Finish[i]:=true;
Go to step 2;
(4)如果所有进程的Finish[i]=true,则表示系统处于安全状态;否则,系统处于不安全状态
我想知道Allocation 和Allocationi 具体有什么区别?为什么(1)中是Allocation 而(3)中的是Allocationi了?
谢谢 !!!
[解决办法]
和Needi意思差不多,都是指i的资源数,Needi是i需要的,Allocationi是i已经分配的。
[解决办法]
PUPUPUPUP UPUPUPU PUPUP UPUPUPUP UPUP UPUPUPUPUPUP UPUPUPU PUPUPUPU PUPUPU PUPUPU
PUPUPUPUP UPUPUPU PUPUP UPUPUPUP UPUP UPUPUPUPUPUP UPUPUPU PUPUPUPU PUPUPU PUPUPU
PUPUPUPUP UPUPUPU PUPUP UPUPUPUP UPUP UPUPUPUPUPUP UPUPUPU PUPUPUPU PUPUPU PUPUPU
PUPUPUPUP UPUPUPU PUPUP UPUPUPUP UPUP UPUPUPUPUPUP UPUPUPU PUPUPUPU PUPUPU PUPUPU
[b]没人了 都上月亮上去了????[/b]]
PUPUPUPUP UPUPUPU PUPUP UPUPUPUP UPUP UPUPUPUPUPUP UPUPUPU PUPUPUPU PUPUPU PUPUPU
PUPUPUPUP UPUPUPU PUPUP UPUPUPUP UPUP UPUPUPUPUPUP UPUPUPU PUPUPUPU PUPUPU PUPUPU
PUPUPUPUP UPUPUPU PUPUP UPUPUPUP UPUP UPUPUPUPUPUP UPUPUPU PUPUPUPU PUPUPU PUPUPU
PUPUPUPUP UPUPUPU PUPUP UPUPUPUP UPUP UPUPUPUPUPUP UPUPUPU PUPUPUPU PUPUPU PUPUPU