homework-5 Version 0 |
|
👤 Author: by 992632427qqcom 2019-10-23 08:40:36 |
When a process first requests resources, it tests the process's maximum demand for resources, and allocates resources according to the current number of applications if the system's existing resources can meet its maximum demand. Otherwise, the allocation is delayed. When a process continues to request resources during execution, test whether the number of resources requested by the process exceeds the total remaining resources. If more than that, the resources will be refused to be allocated. If the resources can be met, the resources will be allocated according to the current number of applications. Otherwise, the allocation will also be delayed.
Example:
Available
6 4 2
Max
2 5 6
4 8 2
1 3 0
Allocation
3 4 6
2 5 6
3 1 4
Need
2 6 4
3 2 1
2 4 6
p1->p0->p2