多核环境下堆排序算法的并行优化策略

Wei Zhenhua, L. Zhifeng, Li Guoliang
{"title":"多核环境下堆排序算法的并行优化策略","authors":"Wei Zhenhua, L. Zhifeng, Li Guoliang","doi":"10.1109/ICMTMA.2015.190","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":196962,"journal":{"name":"2015 Seventh International Conference on Measuring Technology and Mechatronics Automation","volume":"2016 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2015-06-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":"{\"title\":\"Parallel Optimization Strategy of Heap Sort Algorithm under Multi-core Environment\",\"authors\":\"Wei Zhenhua, L. Zhifeng, Li Guoliang\",\"doi\":\"10.1109/ICMTMA.2015.190\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"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.\",\"PeriodicalId\":196962,\"journal\":{\"name\":\"2015 Seventh International Conference on Measuring Technology and Mechatronics Automation\",\"volume\":\"2016 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2015-06-13\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"5\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2015 Seventh International Conference on Measuring Technology and Mechatronics Automation\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICMTMA.2015.190\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2015 Seventh International Conference on Measuring Technology and Mechatronics Automation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICMTMA.2015.190","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

摘要

随着多核和多核平台的普及,面向多核的并行编程与优化已成为计算机领域的研究热点。然而,绝大多数程序员仍在继续传统的串行编程习惯。同时,主流算法仍然是串行的。因此,如何有效地并行化串行程序,高效地编写多核程序,成为多核编程领域亟待解决的问题。本文采用基于openMP的并行技术实现了堆排序算法的优化。首先,基于超立方体模型,将待排序的堆数据划分为n个(n为计算机线程数)块,称为子堆,分别进行排序。将问题的规模分解为1/n,然后利用归并排序算法对排序后的子堆进行合并,最后将并行优化堆排序算法与传统堆排序算法进行比较。当数据量达到千万字节时,本文优化后的并行堆排序算法在实验机上的执行效率与传统的串行堆排序算法相比有了明显的提高。此外,随着数据量的增加,两种算法之间的效率差距将显著加剧。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Parallel Optimization Strategy of Heap Sort Algorithm under Multi-core Environment
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Based on Data Analysis about Risks of Bidding Decisions in Engineering Projects Study on Trusted Vitual Machine Platform Based on Cipher Card Meso-Structure Quantitative Research about Coals Based on the Digital Image Processing Technology News of Atomic Events Time Sequence Relationship Recognition Based on Function Word and Predicate Co-occurrence Research on Bridge Subsidence Control Based on Slip Casting Control
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1