Parallel Optimization Strategy of Heap Sort Algorithm under Multi-core Environment
Parallel Optimization Strategy of Heap Sort Algorithm under Multi-core Environment
复制标题
多核环境下堆排序算法的并行优化策略
DOI:
10.1109/icmtma.2015.190
复制
发表时间:
2015
期刊:
影响因子:
--
通讯作者:
Li Guoliang
中科院分区:
文献类型:
--
作者:
Wei Zhenhua;L. Zhifeng;Li Guoliang
With the popularity of multi-core and many-core platform, multi-core-oriented parallel programming and optimization has become a research hotspot in computer field. However, the vast majority of programmers are still continuing the traditional serial programming habits. Meanwhile, the mainstream algorithms are still in serial. Therefore, how to parallelize the serial programs effectively and write the multi-core programs efficiently is becoming an urgent problem in the field of multi-core programming. In this paper, the optimization of the heap sort algorithm has been achieved adopting the parallel technology based on openMP. Firstly, based on the hypercube model, the heap data to be sorted are divided into n (n is the computer thread amount) blocks called sub-heap which will be sorted respectively. Thus, the scale of the problem is decomposed into 1/n, secondly, the sorted sub-heaps will be merged using merge sort algorithm, finally, the parallel optimized heap sort algorithm is compared to the traditional heap sort algorithm. When the data quantity comes up to ten million bytes, the execution efficiency of the optimized parallel heap sort algorithm of this paper is improved significantly compared with the traditional serial heap sort algorithm on the experimental computer. Furthermore, the efficiency gap between the two algorithms will be intensified prominently with the increasing data quantity.