ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > 2016329621097-任鑫 >
Homework-5 Version 0
👤 Author: by 751815618qqcom 2019-12-26 08:30:37

We can think of the operating system as a banker, where the resources managed by the operating system are equivalent to the funds managed by the banker, and the process's request for resources allocated to the operating system is equivalent to the user's loan to the banker.


To ensure the safety of capital, bankers stipulate:


(1) to accept a customer when the maximum demand for funds does not exceed the banker's available funds;


(2) customers may take out loans in installments, but the total amount of loans shall not exceed the maximum demand;


(3) when the banker's available funds cannot meet the amount of loans still needed by the customer, the loan to the customer may be deferred, but the customer can always obtain the loan for a limited period of time;


(4) when the customer gets all the funds he needs, he must be able to return all the funds within a limited time.


The operating system allocates resources to the process according to the rules set by the banker. When the process first requests resources, it tests the process's maximum demand for resources. If the system's existing resources can meet its maximum demand, it allocates resources according to the current demand, otherwise it delays the allocation.When a process continues to request resources during execution, test to see if the number of resources requested by the process exceeds the total amount of resources remaining.If more than that, refuse to allocate resources; if it can be met, allocate resources according to the current amount of applications; otherwise, also delay the allocation.









Please login to reply. Login

Reversion History

Loading...
No reversions found.