.数据结构 假设有M个进程N类资源,则有如下数据结构: MAX[M*N] M个进程对N类资源的最大需求量 AVAILABLE[N] 系统可用资源数 ALLOCATION[M*N] M个进程已经得到N类资源的资源量 need[M*N] M个进程还需要N类资源的资源量 2.银行家算法 设进程I提出请求Request[N],则银行家算法按如下规则进行判断。 (1)如果Request[N]<=need[I,N],则转(2);否则,出错。 (2)如果Request[N]<=AVAILABLE,则转(3);否则,出错。 (3)系统试探分配资源,修改相关数据: AVAILABLE=AVAILABLE-REQUEST ALLOCATION=ALLOCATION+REQUEST need=need-REQUEST (4)系统执行安全性检查,如安全,则分配成立;否则试探险性分配作废,系统恢复原状,进程等待。 3.安全性检查 (1)设置两个工作向量WORK=AVAILABLE;FINISH[M]=FALSE (2)从进程集合中找到一个满足下述条件的进程, FINISH[i]=FALSE need<=WORK 如找到,执行(3);否则,执行(4) (3)设进程获得资源,可顺利执行,直至完成,从而释放资源。 WORK=WORK+ALLOCATION FINISH=TRUE GO TO 2 (4)如所有的进程Finish[M]=true,则表示安全;否则系统不安全。
上传时间: 2014-01-05
上传用户:moshushi0009
数据结构 假设有M个进程N类资源,则有如下数据结构: MAX[M*N] M个进程对N类资源的最大需求量 AVAILABLE[N] 系统可用资源数 ALLOCATION[M*N] M个进程已经得到N类资源的资源量 need[M*N] M个进程还需要N类资源的资源量 2.银行家算法 设进程I提出请求Request[N],则银行家算法按如下规则进行判断。 (1)如果Request[N]<=need[I,N],则转(2);否则,出错。 (2)如果Request[N]<=AVAILABLE,则转(3);否则,出错。 (3)系统试探分配资源,修改相关数据: AVAILABLE=AVAILABLE-REQUEST ALLOCATION=ALLOCATION+REQUEST need=need-REQUEST (4)系统执行安全性检查,如安全,则分配成立;否则试探险性分配作废,系统恢复原状,进程等待。 3.安全性检查 (1)设置两个工作向量WORK=AVAILABLE;FINISH[M]=FALSE (2)从进程集合中找到一个满足下述条件的进程, FINISH[i]=FALSE need<=WORK 如找到,执行(3);否则,执行(4) (3)设进程获得资源,可顺利执行,直至完成,从而释放资源。 WORK=WORK+ALLOCATION FINISH=TRUE GO TO 2 (4)如所有的进程Finish[M]=true,则表示安全;否则系统不安全。
上传时间: 2013-12-24
上传用户:alan-ee
The code is fairly straightforward, except perhaps for the call to convertColumnIndexToModel. That call is necessary because if the user moves the columns around, the view s index for the column doesn t match the model s index for the column. For example, the user might drag the Vegetarian column (which the model considers to be at index 4) so it s displayed as the first column — at view index 0. Since prepareRenderer gives us the view index, we need to translate the view index to a model index so we can be sure we re dealing with the intended column
标签: convertColumnIndexToModel straightforward perhaps fairly
上传时间: 2013-12-10
上传用户:it男一枚
自制51编程器 I have build my own programmer. This device can program the AT89C51 and works with it. So it can easily be adapted to programming other devices by itself. The Atmel Flash devices are ideal for developing, since they can be reprogrammed easy, often and fast. You need only 1 or 2 devices in low cost plastic case for developing. In contrast you need 10 or more high cost windowed devices if you must develop with EPROM devices (e.g. Phillips 87C751).
标签: programmer program device build
上传时间: 2015-05-11
上传用户:sdq_123
检测windows下rootkit对文件的隐藏。some usermode overwrites first few bytes of ZwQueryDirectoryFile and that trick will fail then :( So, you will probably need a small database of the correct indexes for all Windows versions
标签: ZwQueryDirectoryFile overwrites usermode windows
上传时间: 2014-12-08
上传用户:lps11188
ENGLISH RESUME Dear sir/madam In answer to your advertisement in present interview for your need. I wish to tender my service. With reference to your advertisement in present interview for your need, I respectfully offer myself for the position.
标签: your advertisement interview ENGLISH
上传时间: 2014-09-08
上传用户:chenbhdt
Although there has been a lot of AVL tree libraries available now, nearly all of them are meant to work in the random access memory(RAM). Some of them do provide some mechanism for dumping the whole tree into a file and loading it back to the memory in order to make data in that tree persistent. It serves well when there s just small amount of data. When the tree is somewhat bigger, the dumping/loading process could take a lengthy time and makes your mission-critical program less efficient. How about an AVL tree that can directly use the disk for data storage ? If there s something like that, we won t need to read through the whole tree in order to pick up just a little bit imformation(a node), but read only the sectors that are neccssary for locating a certain node and the sectors in which that node lies. This is my initial motivation for writing a storage-media independent AVL Tree. However, as you step forth, you would find that it not only works fine with disks but also fine with memorys, too.
标签: available libraries Although nearly
上传时间: 2014-01-22
上传用户:zhoujunzhen
uc/os-ii for 8051 This package provides the sources required to use the uC/OS-II v2.00 real time kernel on the 8051 processor. To use this package you will need the TASKING C Compiler toolset v6.0r1 or higher. For info on TASKING products you can contact our Web-site at: http://www.tasking.com Unzip the zipfile in the root of the drive where you also installed the uC/OS-II general sources. The following directories will be added: \SOFTWARE\UCOS-II\8051 This directory contains the microprocessor specific source code \SOFTWARE\UCOS-II\ex1_8051r This directory contains the project files for the first example \SOFTWARE\UCOS-II\ex2_8051r This directory contains the project files for the second example
标签: the provides required package
上传时间: 2015-05-21
上传用户:ainimao
This book isn t for uber-programmers who already have all the answers. If you think that J2EE does everything that you need it to do and you can make it sing, this book is not for you. Believe me, there are already enough books out there for you.
标签: uber-programmers already answers think
上传时间: 2015-05-22
上传用户:tb_6877751
* * Input * bin_data : binary data * bin_size : binary data length * Mode : operation mode * BASE64_needCRLF ---- need a CRLF every 64 base64-character * BASE64_NotCRLF ---- need not CRLF between 64 base64-character * * Output * char data * char data length * * Return * 0: success -1: error
标签: binary data operation bin_data
上传时间: 2015-06-04
上传用户:ZJX5201314