Responsive image
博碩士論文 etd-0713118-220108 詳細資訊
Title page for etd-0713118-220108
論文名稱
Title
設計與實現基於共享記憶體架構之多核心並行運算平台
Design and Implementation of Parallel Processing Platform on Multi-core System Based on Shared Memory Architecture
系所名稱
Department
畢業學年期
Year, semester
語文別
Language
學位類別
Degree
頁數
Number of pages
76
研究生
Author
指導教授
Advisor
召集委員
Convenor
口試委員
Advisory Committee
口試日期
Date of Exam
2018-07-24
繳交日期
Date of Submission
2018-08-18
關鍵字
Keywords
多核心運算、平行運算、共享記憶體、進程間通訊、核心驅動程式
IPC, Shared Memory, Parallel Processing, Multicore, Kernel Mode Driver
統計
Statistics
本論文已被瀏覽 5657 次,被下載 2
The thesis/dissertation has been browsed 5657 times, has been downloaded 2 times.
中文摘要
摘要
現今的平行運算開發平台,大致可分為行為描述的平行運算開發平台語程序導向的平行運算開發平台;行為描述的平行運算開發平台提供半自動式的並行程式開發環境,較易導入平行演算法的程式實現,因其對程式行為的描述有其特定的限制,故其執行效能也相對的受到限制;程序導向的平行運算開發平台為全客戶式的開發環境,平行運算行為需全由使用者自行安排,程式設計者須有程度相關的並行程式經驗,彈性度大,通常為高效能保證的並行程式所需之開發者所用。本論文提出之基於共享記憶體架構之多核心並行運算平台Parallel Processing Platform on Multi-core System Based on Shared Memory Architecture(MSSM)為屬於程序導向的平行運算開發平台,目的在讓C語言使用者只須要透過簡單的API便能夠開發出效能優異之平行運算系統。程式開發者只需要安裝本論文提出之驅動程式後,便可以在用戶模式下,透過簡單的API就能夠在實體記憶體中配置出大小可依照程式開發者需求而改變之共享記憶體空間,無須額外花費大量時間去撰寫複雜的核心驅動程式。基於本論文提出的非常具有彈性之共享記憶體架構,平行程式之開發者便能夠輕鬆地以多進程的方式開發出多核心平行運算程式。
本論文中提出之多核心並行運算平台之整體架構針對其特性分為三個部份設計:主程式(Main Program)、運算進程(Computing Process)以及核心驅動程式(Kernel Mode Driver)。主程式只要使用簡單的API便能夠建立多個運算進程,藉由作業系統的資源調配以達到多核心之平行運算。除此之外,為了讓多進程運算能夠在運算時比較不會因演算法中資料的相依性之影響,在頻繁的進程間通訊有過多之延遲,MSSM之API傳送IOCTL給予核心驅動裝置,藉此配置出實體記憶體空間作為進程之共享記憶體空間,以實體記憶體讀寫快速的特色減少通訊延遲。
為了驗證MSSM平行運算之實用性,在三種不同的演算法: Advanced Encryption Standard、K-means clustering以及Sub of Absolute Difference中,MSSM與市面上常見之平行運算開發平台:OpenMP、Parallel Patterns Library (PPL)和Message Passing Interface (MPI)之平行運算效能比較。以PPL為例,MSSM平均增加了0.3倍的運算效能。證實MSSM為具簡單開發之平台,且為擁有高運算效能之多核心運算系統。
Abstract
Abstract
Nowadays, there are two kinds of parallel programming models for developing parallel applications which are Procedure-Oriented models and Behavior Description models. Using directives offering from Behavior Description models, the programmer can easily parallelize the code Semi-Automatically. There is restriction of parallelism because of the rules of Behavior Description models. As a result, performance of the code parallelized by Behavior Description models is restricted. Procedure-Oriented models offer full-custom development platform so they have much more flexibility than Behavior Description models. Programmer can arrange how to parallelize the code via Behavior Description models. In addition, with user’s knowledge of parallelism, the code parallelized by Procedure-Oriented models can have high performance. This thesis propose Parallel Processing Platform on Multi-core System Based on Shared Memory Architecture (MSSM) which is a kind of Procedure-Oriented models to make programmer can easily develop parallel processing programs in C language on Windows. Programmer can use MSSM’s API to create multiple processes easily to do multicore processing. Besides, via API offering from MSSM, programmer can allocate physical memory as shared memory in user mode in order to decrease Inter-Process Communication latency. MSSM is composed of Main Program、Computing Process、Kernel Mode Driver. Main Program creates multiple Computing Processes to do multicore processing and use MSSM’s API to order Kernel Mode Driver allocate physical shared memory. For testing the performance of MSSM, this thesis implemented three kinds of algorithms which are Advanced Encryption Standard (AES), Sum of Absolute Differences (SAD) and K-Means Clustering by MSSM OpenMP, Parallel Patterns Library (PPL), Message Passing Interface (MPI) and compared the performance of these models. In average, MSSM is 30% faster than PPL, 13% faster than OpenMP and 14% faster than MPI , proving that MSSM has high performance of programming parallel processing Applications.
目次 Table of Contents
目錄
論文審定書 i
致謝 ii
摘要 iii
Abstract v
圖次 ix
表次 xi
第一章 簡介 1
1.1 研究動機 1
1.2 研究目的 2
1.3 論文架構 2
第二章 背景知識與相關研究 3
2.1 現有平行運算平台 3
2.1.1 Parallel Patterns Library (PPL) 3
2.1.2 OpenMP(Open Multi-Processing) 5
2.1.3 MPIKC 8
2.2 Windows Driver Frameworks(WDF) 17
2.2.1 WDF核心框架 17
2.2.2 WDF特點 18
2.2.3 KMDF 19
2.3 Memory Descriptor List (MDL) 20
第三章 多核心平行運算平台架構 21
3.1 MSSM架構 21
3.1.1 MSSM運作流程 22
3.1.2 MSSM軟體系統架構 25
3.2 用戶模式 27
3.3 核心驅動程式 33
3.3.1 核心驅動程式之架構 33
3.3.2核心驅動程式之安裝及初始化 36
3.3.3連接與關閉連接應用程式 38
3.3.4執行API之命令 40
3.4 MSSM 平台總結 44
第四章 平台使用者開發流程、結果測試與分析 45
4.1平台使用者開發流程 45
4.1.1 主程式開發 46
4.1.2 Computing Processes開發 48
4.1.3 MSSM之應用成式API 49
4.1.4 MSSM共享記憶體之使用 52
4.2 MSSM 運算效能測試 53
4.2.1基本MSSM分配運算任務及切割資料方式 53
4.2.2 測試環境 54
4.2.3 Advanced Encryption Standard (AES) 54
4.2.4 K-means clustering 57
4.2.4 Sub of Absolute Difference (SAD) 59
4.2.5 MSSM運算效能測試總結 61
第5章 結論 62
參考文獻 63
參考文獻 References
參考文獻
[1] Tim D. Sherer ,”Using MDLs”, June 2017, [Online]. Available: https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/using-mdls
[2] MSDN , “Parallel Patterns Library (PPL) “, [Online].Available: https://msdn.microsoft.com/en-us/library/dd492418.aspx
[3] Ruud van der Pas, Eric Stotzer and Christian Terboven , Using OpenMP – The Next Step, London,UK The MIT Press,2007, pp.227-304
[4] Message-Passing Interface Standard Version3.1, [Online]. Available:http://www.mpi-forum.org/docs/
[5] “Kernel-Mode Driver Framework”,Wikipedia, [Online]. Available: https://en.wikipedia.org/wiki/Kernel-Mode_Driver_Framework
[6] “MPICH wiki”, [Online]. Available: https://wiki.mpich.org/mpich/index.php/Main_Page
[7] Chris Cant , Writing Windows WDM Device Drivers , CRC Press,Jan 1999, pp.111-160
[8] Tim D. Sherer ,“Defining I/O Control Codes”, June 2017, [Online]. Available: https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/defining-i-o-control-codes
[9] MSDN, “Interprocess Communications”, [Online]. Available: https://docs.microsoft.com/en-us/windows/desktop/ipc/interprocess-communications
[10] Penny Orwick ,” Developing Drivers with the Windows® Driver Foundation”, Microsoft Press, April 2007 ,pp. 497-730
[11] Jih-Ching Chiu, Bao-Ren Guo, Chao-Chih Hsun, “Message-Passing Interface Cluster Build upon System Kernel Environment”, in 2016 International Computer Symposium, 2016
[12] Xiao-hui Cheng , Liang Zhang,” A research of inter-process communication based on shared memory and address-mapping”, Proceedings of 2011 International Conference on Computer Science and Network Technology, Harbin, China, 24-26 Dec. 2011
[13] Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman,” Linux Device Drivers, 3rd Edition”, California, United States: O'Reilly Media, Feb 2009
[14] Junwei Li,Zibin Dai ,Wei Li ,Tao Chen ,Yufei Zhu,” Study and implementation of cluster hierarchical memory system of multicore cryptographic processo”, 2015 IEEE 11th International Conference on ASIC (ASICON), Chengdu, China, 3-6 Nov. 2015
[15] Amjad Kotobi,Nor Asilah Wati Abdul Hamid, Mohamed Othman, Masnida Hussin, “Performance analysis of hybrid OpenMP/MPI based on multi-core cluster architecture”, 2014 International Conference on Computational Science and Technology (ICCST), Kota Kinabalu, Malaysia ,27-28 Aug. 2014 Alexandre E. Eichenberger, Christian Terboven, Michael Wong,and Dieter an Mey,” The Design of OpenMP Thread Affinity”, IBM Corporation, 2012
[16] MSDN,” Migrating from OpenMP to the Concurrency Runtime”, [Online]. Available:https://msdn.microsoft.com/en-us/library/ff461340.aspx
[17] Colin Campbell, Ade Miller ,” Parallel Programming with Microsoft Visual C++”, Microsoft Press,April 2011
電子全文 Fulltext
本電子全文僅授權使用者為學術研究之目的,進行個人非營利性質之檢索、閱讀、列印。請遵守中華民國著作權法之相關規定,切勿任意重製、散佈、改作、轉貼、播送,以免觸法。
論文使用權限 Thesis access permission:自定論文開放時間 user define
開放時間 Available:
校內 Campus: 已公開 available
校外 Off-campus: 已公開 available


紙本論文 Printed copies
紙本論文的公開資訊在102學年度以後相對較為完整。如果需要查詢101學年度以前的紙本論文公開資訊,請聯繫圖資處紙本論文服務櫃台。如有不便之處敬請見諒。
開放時間 available 已公開 available

QR Code