.數(shù)據(jù)結(jié)構(gòu) 假設(shè)有M個進程N類資源,則有如下數(shù)據(jù)結(jié)構(gòu): MAX[M*N] M個進程對N類資源的最大需求量 AVAILABLE[N] 系統(tǒng)可用資源數(shù) ALLOCATION[M*N] M個進程已經(jīng)得到N類資源的資源量 Need[M*N] M個進程還需要N類資源的資源量 2.銀行家算法 設(shè)進程I提出請求Request[N],則銀行家算法按如下規(guī)則進行判斷。 (1)如果Request[N]<=Need[I,N],則轉(zhuǎn)(2);否則,出錯。 (2)如果Request[N]<=AVAILABLE,則轉(zhuǎn)(3);否則,出錯。 (3)系統(tǒng)試探分配資源,修改相關(guān)數(shù)據(jù): AVAILABLE=AVAILABLE-REQUEST ALLOCATION=ALLOCATION+REQUEST Need=Need-REQUEST (4)系統(tǒng)執(zhí)行安全性檢查,如安全,則分配成立;否則試探險性分配作廢,系統(tǒng)恢復(fù)原狀,進程等待。 3.安全性檢查 (1)設(shè)置兩個工作向量WORK=AVAILABLE;FINISH[M]=FALSE (2)從進程集合中找到一個滿足下述條件的進程, FINISH[i]=FALSE Need<=WORK 如找到,執(zhí)行(3);否則,執(zhí)行(4) (3)設(shè)進程獲得資源,可順利執(zhí)行,直至完成,從而釋放資源。 WORK=WORK+ALLOCATION FINISH=TRUE GO TO 2 (4)如所有的進程Finish[M]=true,則表示安全;否則系統(tǒng)不安全。
標簽: 數(shù)據(jù)結(jié)構(gòu) 進程 資源
上傳時間: 2014-01-05
上傳用戶:moshushi0009
數(shù)據(jù)結(jié)構(gòu) 假設(shè)有M個進程N類資源,則有如下數(shù)據(jù)結(jié)構(gòu): MAX[M*N] M個進程對N類資源的最大需求量 AVAILABLE[N] 系統(tǒng)可用資源數(shù) ALLOCATION[M*N] M個進程已經(jīng)得到N類資源的資源量 Need[M*N] M個進程還需要N類資源的資源量 2.銀行家算法 設(shè)進程I提出請求Request[N],則銀行家算法按如下規(guī)則進行判斷。 (1)如果Request[N]<=Need[I,N],則轉(zhuǎn)(2);否則,出錯。 (2)如果Request[N]<=AVAILABLE,則轉(zhuǎn)(3);否則,出錯。 (3)系統(tǒng)試探分配資源,修改相關(guān)數(shù)據(jù): AVAILABLE=AVAILABLE-REQUEST ALLOCATION=ALLOCATION+REQUEST Need=Need-REQUEST (4)系統(tǒng)執(zhí)行安全性檢查,如安全,則分配成立;否則試探險性分配作廢,系統(tǒng)恢復(fù)原狀,進程等待。 3.安全性檢查 (1)設(shè)置兩個工作向量WORK=AVAILABLE;FINISH[M]=FALSE (2)從進程集合中找到一個滿足下述條件的進程, FINISH[i]=FALSE Need<=WORK 如找到,執(zhí)行(3);否則,執(zhí)行(4) (3)設(shè)進程獲得資源,可順利執(zhí)行,直至完成,從而釋放資源。 WORK=WORK+ALLOCATION FINISH=TRUE GO TO 2 (4)如所有的進程Finish[M]=true,則表示安全;否則系統(tǒng)不安全。
標簽: 數(shù)據(jù)結(jié)構(gòu) 進程 資源
上傳時間: 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
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1