文件名称:osBank
- 所属分类:
- 数据结构常用算法
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.07mb
- 下载次数:
- 0次
- 提 供 者:
- fairy******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
3、银行家算法
设request:是Pi进程的请求向量,当Pi发了资源请求后,系统按下述步骤检查:
(1)如果Request[i]<= Need[i],则转向步骤(2);
(2)若Request[i] <=Available,则转向步骤(3);
(3)系统试探性地把要求的资源分配给进程Pi,并修改以下数据结构的值:
Available=Available-Request[i];
Allocation[i]= Allocation[i]+ Request[i];
Need[i]= Need[i]- Request[i];
(4)系统执行安全性算法,检查此次资源分配后,系统是否处于安全状态,若安全,才正式将资源分配给Pi进程,完成本次分配;否则,试探性分配作废,恢复原来的资源分配状态,Pi进程进入等待状态。
-3, the banker s algorithm
Set request: the request is the process of vector Pi, Pi made when the resource request, the system according to the following steps to check:
(1) If Request [i] <= Need [i], then go to step (2)
(2) If Request [i] <= Available, then go to step (3)
(3) system tentatively assigned to the resources required to process Pi, and modify the value of the following data structure:
Available = Available-Request [i]
Allocation [i] = Allocation [i]+ Request [i]
Need [i] = Need [i]- Request [i]
(4) system to perform security algorithms, checks the resource allocation, the system is in safe state if the security, formally allocate resources to Pi process, the completion of this assignment Otherwise, the tentative allocation set aside to restore the original resource distribution of state, Pi process enters a wait state.
设request:是Pi进程的请求向量,当Pi发了资源请求后,系统按下述步骤检查:
(1)如果Request[i]<= Need[i],则转向步骤(2);
(2)若Request[i] <=Available,则转向步骤(3);
(3)系统试探性地把要求的资源分配给进程Pi,并修改以下数据结构的值:
Available=Available-Request[i];
Allocation[i]= Allocation[i]+ Request[i];
Need[i]= Need[i]- Request[i];
(4)系统执行安全性算法,检查此次资源分配后,系统是否处于安全状态,若安全,才正式将资源分配给Pi进程,完成本次分配;否则,试探性分配作废,恢复原来的资源分配状态,Pi进程进入等待状态。
-3, the banker s algorithm
Set request: the request is the process of vector Pi, Pi made when the resource request, the system according to the following steps to check:
(1) If Request [i] <= Need [i], then go to step (2)
(2) If Request [i] <= Available, then go to step (3)
(3) system tentatively assigned to the resources required to process Pi, and modify the value of the following data structure:
Available = Available-Request [i]
Allocation [i] = Allocation [i]+ Request [i]
Need [i] = Need [i]- Request [i]
(4) system to perform security algorithms, checks the resource allocation, the system is in safe state if the security, formally allocate resources to Pi process, the completion of this assignment Otherwise, the tentative allocation set aside to restore the original resource distribution of state, Pi process enters a wait state.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
osBank
......\Debug
......\.....\osBank.exe
......\.....\osBank.ilk
......\.....\osBank.obj
......\.....\osBank.pch
......\.....\osBank.pdb
......\.....\vc60.idb
......\.....\vc60.pdb
......\osBank.cpp
......\osBank.dsp
......\osBank.dsw
......\osBank.ncb
......\osBank.opt
......\osBank.plg
......\Debug
......\.....\osBank.exe
......\.....\osBank.ilk
......\.....\osBank.obj
......\.....\osBank.pch
......\.....\osBank.pdb
......\.....\vc60.idb
......\.....\vc60.pdb
......\osBank.cpp
......\osBank.dsp
......\osBank.dsw
......\osBank.ncb
......\osBank.opt
......\osBank.plg