main
代码说明:
为了了解系统的资源分配情况,假定系统的任何一种资源在任一时刻只能被一个进程使用。任何进程已经占用的资源只能由进程自己释放,而不能由其他进程抢占。当进程申请的资源不能满足时,必须等待。因此,只要资源分配算法能保证进程的资源请求,且不出现循环等待,则系统不会出现死锁。 要求编写系统进行资源调度的程序,采用银行家算法,有效地避免死锁的产生。(In order to understand the resource allocation of the system, it is assumed that any resource of the system can only be used by one process at any one time. Any resources that have been occupied by the process can only be released by the process itself, rather than by other processes. You must wait when the resources for the process cannot be satisfied. Therefore, as long as the resource allocation algorithm can guarantee the resource request of the process, and there is no circular waiting, the system will not deadlock. Write the system scheduling procedures for resources, using bankers algorithm, effectively avoid the deadlock.)
下载说明:请别用迅雷下载,失败请重下,重下不扣分!