[1]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]
Copy
CAAI Transactions on Intelligent Systems[ISSN 1673-4785/CN 23-1538/TP] Volume:
10
Number of periods:
2015 3
Page number:
494-498
Column:
学术论文—机器学习
Public date:
2015-06-25
- Title:
-
A web crawler resource allocation strategy based on the Banker’s algorithm
- 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
- CLC:
-
TP361;TM75
- DOI:
-
10.3969/j.issn.1673-4785.201409021
- 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.