[1]王庆红,李广凯,周育忠,等.一种基于银行家算法的网络爬虫资源配置策略[J].智能系统学报,2015,10(3):494-498.[doi:10.3969/j.issn.1673-4785.201409021]
WANG Qinghong,LI Guangkai,ZHOU Yuzhong,et al.A web crawler resource allocation strategy based on the Banker’s algorithm[J].CAAI Transactions on Intelligent Systems,2015,10(3):494-498.[doi:10.3969/j.issn.1673-4785.201409021]
点击复制
《智能系统学报》[ISSN 1673-4785/CN 23-1538/TP] 卷:
10
期数:
2015年第3期
页码:
494-498
栏目:
学术论文—机器学习
出版日期:
2015-06-25
- Title:
-
A web crawler resource allocation strategy based on the Banker’s algorithm
- 作者:
-
王庆红, 李广凯, 周育忠, 韦嵘晖
-
南方电网科学研究院有限责任公司 技术情报所, 广东 广州 510080
- Author(s):
-
WANG Qinghong, LI Guangkai, ZHOU Yuzhong, WEI Ronghui
-
Technology Information Department, Electric Power Research Institute of China Southern Power Grid, Guangzhou 510080, China
-
- 关键词:
-
操作系统; 资源配置; 死锁; 系统安全; 银行家算法; 网络爬虫
- Keywords:
-
operating system; resource allocation; deadlock; system safety; Banker’s algorithm; web crawler
- 分类号:
-
TP361;TM75
- DOI:
-
10.3969/j.issn.1673-4785.201409021
- 文献标志码:
-
A
- 摘要:
-
死锁是多用户操作系统正常运行的一个重要问题,系统资源不足会导致爬虫算法进入不安全状态,进而引发死锁等问题.引入被广泛用于操作系统的银行家算法,调度多个网络爬虫进程并发运行,并且为每个进程合理分配系统资源,当进程无法获取系统资源时,则等待其他进程分配完成后释放系统资源,从而完成资源分配,有效降低死锁率.采用C++编程,设计并实现基于银行家算法的网络爬虫配置策略.通过2 h 21 min 35 s工程测试,urllib2算法死锁率为30%,新算法死锁率仅为2%,测试证明该策略能够有效降低死锁率,能高效完成多个任务进程的资源分配.
- Abstract:
-
Deadlock is a major issue for the normal operation of a multi-user operating system. Insufficient system resource will make the crawler algorithm go into the unsafe state, which will further cause problems such as deadlock. The introduction of the Banker’s algorithm, which is widely used in the operating system can schedule multiple web crawler processes running concurrently and allocate system resources rationally for each process. When the process is unable to get the system resources, the other processes need to release resources to complete the allocation of resources, thereby reducing the rate of deadlock effectively. In this paper, a web crawler resource allocation strategy based on Banker’s algorithm is designed and implemented using C++ programming. After approximately 2.5 hours of engineering testing the results showed that, the deadlock rate of urllib2 algorithm is 30% and the improved algorithm is only 2%. It is proven that the improved algorithm can reduce deadlock rate effectively and complete resource allocation for multi-process with high efficiency.
备注/Memo
收稿日期:2014-9-12;改回日期:。
作者简介:王庆红,男,1976年生,高级设计师,技术情报所所长,主要研究方向为电力系统运行、规划与设计以及企业情报系统建设与管理.李广凯,男,1975年生,副教授,博士,主要研究方向为电力系统企业技术情报咨询及直流输电技术.周育忠,男,1974年生,高级工程师,主要研究方向为行业情报系统建设、运维管理和资源整合.
通讯作者:王庆红. E-mail: wangqh@csg.cn.
更新日期/Last Update:
2015-07-15