银行家算法问题:进程请求的资源是否可以超过它的需要?

Banker's Algorithm Issue : Can a process request resources more than it's need?

In the problem mentioned in the image, on request of p3 (0,2,0) the need of p3 is becoming negative(means it has an extra resource). According to other general rules the request can be granted since safe sequence exists : P1 -> P3 -> P2.

一个进程是否可以请求比银行家算法所需的更多的资源? 如果存在安全序列,这样的请求是否会被视为有效或可行?

不,不允许进程请求超过其声明的最大需求。

原因:银行家算法在确定请求的安全性时使用每个进程的最大需求。 如果一个进程被允许请求超过最大需要的资源,那么被认为是 在以前的一些分配期间安全可能变得不安全。所以安全分析会崩溃。

P.S。此答案由 Dhananjay Dhamdhere https://www.cse.iitb.ac.in/~dmd/

给出

谢谢先生,解决了我的疑问。