摘要
对线程池的阻塞唤醒机制,动态调整,线程安全退出,参数处理,系统线程数限制等细节进行研究,保证了其在不同应用场景下的独立性和通用性;同时采用一种基于数组的链表机制来改进线程池的查找分配算法,将其时间复杂度稳定在O(1),避免了传统线程池当线程数目过大时导致的查询分配性能下降的问题。实验结果表明,改进后的线程池与传统的系统线程分配方式相比在开销上有很大节省。
Do research on blocking and wakeup mechanism, dynamic adjustment, thread exit safely, parameter pro- cessing, the system maximam number of threads limits and other details in thread pool, to ensure its independence and generality under the different scenarios; meanwhile, using a linked list of array-based mechanisms to improve the search and allocation algorithm in thread pool, to be stable in time complexityO ( 1 ), and avoid the problem that allocate and query performance will degrade in the traditional thread pool when the number of threads allocated is too large, experimental results show that there is a great saving in cost with the traditional distribution system com- pared to the thread.
出处
《计算机工程与应用》
CSCD
2012年第28期77-83,共7页
Computer Engineering and Applications