Presents a method for deadlock avoidance algorithm used in Flexible Manufacturing System(FMS). This method is an improvement of the Banker algorithm. The Banker algorithm is commonly used in the Operating System (OS),...Presents a method for deadlock avoidance algorithm used in Flexible Manufacturing System(FMS). This method is an improvement of the Banker algorithm. The Banker algorithm is commonly used in the Operating System (OS), but some improvements will have to be made on the algorithm if this algorithm is used in FMS. The difference between the process in operating system and the job in the FMS is fully discussed. Based on this difference, the improvement is made. In order to improve the algorithm, formal methods are adopted to the manufacturing systems. The simulation model is translated into a format suitable for model checking. That is, the model is written into PROMELA, the input language of the popular model checker SPIN. After that, SPIN is used to verify that the model does not have deadlock. This algorithm proves to be highly effective in practice.展开更多
死锁是多用户操作系统正常运行的一个重要问题,系统资源不足会导致爬虫算法进入不安全状态,进而引发死锁等问题。引入被广泛用于操作系统的银行家算法,调度多个网络爬虫进程并发运行,并且为每个进程合理分配系统资源,当进程无法获取系...死锁是多用户操作系统正常运行的一个重要问题,系统资源不足会导致爬虫算法进入不安全状态,进而引发死锁等问题。引入被广泛用于操作系统的银行家算法,调度多个网络爬虫进程并发运行,并且为每个进程合理分配系统资源,当进程无法获取系统资源时,则等待其他进程分配完成后释放系统资源,从而完成资源分配,有效降低死锁率。采用C++编程,设计并实现基于银行家算法的网络爬虫配置策略。通过2 h 21 min 35 s工程测试,urllib2算法死锁率为30%,新算法死锁率仅为2%,测试证明该策略能够有效降低死锁率,能高效完成多个任务进程的资源分配。展开更多
文摘Presents a method for deadlock avoidance algorithm used in Flexible Manufacturing System(FMS). This method is an improvement of the Banker algorithm. The Banker algorithm is commonly used in the Operating System (OS), but some improvements will have to be made on the algorithm if this algorithm is used in FMS. The difference between the process in operating system and the job in the FMS is fully discussed. Based on this difference, the improvement is made. In order to improve the algorithm, formal methods are adopted to the manufacturing systems. The simulation model is translated into a format suitable for model checking. That is, the model is written into PROMELA, the input language of the popular model checker SPIN. After that, SPIN is used to verify that the model does not have deadlock. This algorithm proves to be highly effective in practice.
文摘死锁是多用户操作系统正常运行的一个重要问题,系统资源不足会导致爬虫算法进入不安全状态,进而引发死锁等问题。引入被广泛用于操作系统的银行家算法,调度多个网络爬虫进程并发运行,并且为每个进程合理分配系统资源,当进程无法获取系统资源时,则等待其他进程分配完成后释放系统资源,从而完成资源分配,有效降低死锁率。采用C++编程,设计并实现基于银行家算法的网络爬虫配置策略。通过2 h 21 min 35 s工程测试,urllib2算法死锁率为30%,新算法死锁率仅为2%,测试证明该策略能够有效降低死锁率,能高效完成多个任务进程的资源分配。