lock_hungry
代码说明:
给出进程需求矩阵C、资源向量R以及一个进程的申请序列。使用进程启动拒绝和资源分配拒绝(银行家算法)模拟该进程组的执行情况。要求: 初始状态没有进程启动 计算每次进程申请是否分配?如:计算出预分配后的状态情况(安全状态、不安全状态),如果是安全状态,输出安全序列。 每次进程申请被允许后,输出资源分配矩阵A和可用资源向量V。 每次申请情况应可单步查看,如:输入一个空格,继续下个申请 (The gives processes demand matrix C resource vector R as well as the application of a process sequence. Using the process starts refused to reject and resource allocation (the bankers algorithm) analog implementation of the process group. Requirements: initial state process starts calculated each time the process is whether the application is assigned? : Calculate a state after the pre-allocated (safe state, unsafe state), if it is a safe state, the output safety sequence. Each process the application is allowed, the the output resource allocation matrix A and the resources available vector V. Each application should be able to single-step view, such as: type a space, continue to the next application)
文件列表:
lock_hungry.cpp,3461,2013-01-08
下载说明:请别用迅雷下载,失败请重下,重下不扣分!