《多核程序設計》課程介紹
以Intel為代表的國際主流微處理器廠商已經成功推出了多款多核微處理器系統,應用領域也從高端服務器向一般桌面系統延伸。如何充分發揮多核處理器的性能優勢,已經成為當前軟件産業的重要挑戰。在已有軟件工程專業的教學體系中,還沒有課程能充分指導學生掌握多核處理器上軟件設計的方法和技巧,這直接制約了多核處理器應用的普及和深入,制約了軟件技術水平的提高。因此,開設“多核程序設計”課程具有相當的重要性和緊迫性。
現如今多核處理器已經成為通用處理器的主流,多核程序設計技術是一大新興的研究熱點。本課程目的是讓學生了解當前計算機芯片設計領域中新興多核體系設計的基本原理、技術難點、目前發展狀況、以及對計算機領域帶來的相關影響等,通過建立體系經典理論研究和實際的發展方向之間的橋梁,為将來從事體系結構領域、系統軟件領域以及相關領域的高水平研究打好紮實的基礎。學習該課程的基本目标是通過本課程的學習,使學生掌握多核體系的基本原理、基于多處理器的程序設計方法、編程方式的變化趨勢等,達到能真正将多核技術應用在本學科領域的目的。
本課程通過對多核架構和編程技術的學習,結合同學們在本專業其它課程的學習,側重于多核編程技術的應用實踐。讓學生學習多核平台上的并行編程設計,學習多核硬件與單核在編程技巧上的差異性,以及多核程序評測和調優工具的使用以及優化技巧。
本課程中程序設計實踐占了相當大的比重,為配合本課程更好的開展教學,課程提供了程序設計習題,供同學們在各章節的學習思考。此外課程還精心設計了多個配套實驗,讓同學們在各章節理論學習的同時進行動手實踐加深理解,切實掌握多核程序設計技術。
“多核程序設計”課程的主要内容包括四個主要部分:基本理論知識,多核程序設計方法,基于多核處理器的并行算法設計與實現,多核軟件性能分析工具的使用。
1、 基本理論知識
該部分主要介紹多核程序設計的硬件和操作系統平台基礎,以期讓學生掌握多核程序設計的基本原理。
2、多核軟件設計技術
這部分内容主要講授基于Windows操作系統平台上多線程程序設計的基本操作系統原語,以及OpenMP的基本設計方法,以期讓學生掌握使用多線程方法進行多核程序設計的基本技能。
3、并行算法設計基本方法和實例分析
這部分内容主要講授并行計算程序設計的一般原理,以及結合實際例子說明在多核處理器平台上使用多線程方法設計并行程序的方法。
4、多核軟件的性能分析方法和工具
這部分内容以Intel公司的性能分析工具為基礎,介紹了多核軟件實際運行性能的分析和優化方法。包括性能分析工具中采樣方式和調用圖方式的工作原理,以及工具中關于數據競争、死鎖、關鍵路徑、負載均衡等重要問題的方法。
The introduction of course --- Multi-Core Programming
The current international microprocessor manufacturers, represented by Intel, have successfully presented various multi-core microprocessors, and have expanded their application fields from high-end servers to common desktop systems as well. It has been a great challenge for the software industry that how to maximize the performance advantages of multi-core processors. In the software engineering curriculum system, there is no course that can guide the students to fully master the methods and techniques of software programming using multi-core processors, which directly restricts the universal and deep application of multi-core processors, and restricts the improvement of software techniques. Thus, it's of great importance and urgency to develop the multi-core programming course.
Now the Multi-core processor has already become the mainstream of the current processor, and the Multi-core programming design is a new research hotspot. The purpose of this course is letting students understand the new Multi-core design’s principle, the technical difficulty, the present developmental situation, and the influence of the computer which all in the present computer CMOS chip designing realm. Through establishing the bridge between the system classical theory and the actual developmental direction, it’ll build the well-knit foundation for the high-leveled research of engaging in the realm of the systematic structure, the realm of the systematic software and relevant realm. The basic purpose of studying this course is letting students grip the principle of the Multi-core system. Based on the Multi-processor programming design method and the changing trend of the programming and so on, it will reach the purpose that students could apply the Multi-core technology in this course realm.
Through the studying of this Multi-core construction and the program technology and combining the other course’s study, this course emphasize particularly on the applied practice of the Multi-core programming technology. This course let students study the parallel programming which on the Multi-core platform, the different programming skill between the Multi-core hardware and the Single-core hardware, and the Multi-core programming evaluation and the use and optimization skill of optimization implemental.
In this course, the programming account for a large proportion. In order to cooperate with this course to better develop the teaching, it provides the exercises of programming to let the students to think in every chapter. Besides, it also designs many matching experiments elaborately. So it will help students while carrying on different chapters’ theoretical study to deepen the understanding and let them actually grip Multi-core programming technology.
“Multi-core programming” course mainly consist four major parts: basic theoretical knowledge, Multi-core programming method, the parallel arithmetic design and realization based on the multi-core processor, the utilization of analysis implement of multi-core software.
(1) Fundamental theoretical knowledge
This part mostly introduces the hardware and operating system platform foundation of multi-core programming to let students grip the principle of multi-core programming.
(2) The programming technology of multi-core software
The primary content of this part introduces the basic skill of multithreading programming fundamental operating system original word which based on the Windows platform and the OpenMP basic programming method to let student grip the skill of using the multithreading method to design the multi-core programming.
The method of multithreading programming based on the Windows platform. This part primarily introduces the multithreading API connection function on the Windows platform which includes the establishment, abolishment, hangcomeback, the setting of PRI, sleeping, and critical region and so on.
It’s the method of multi-core software programming based on OpenMP. This part primarily introduces the principle and character of the OpenMP, the sentence format of translation and edition direction, the instruct order and the clause which are always used in the sentences. And emphatically introduce the variable property, the maneuver of multithreading distribution, stipulations of an agreement sentence and so on.
(3) The basic method of the parallel arithmetic programming and instance analysis
This part primarily instruct the principle of the parallel account programming, and combining the actual instance to explain how to use the multithreading programming method to design the parallel program on the multi-core processor.
(4) The character analysis method and implement of the multi-core software
Based on the Intel company character analysis implement, this part introduces the analysis and the optimization method of the multi-core software’s function. Including the sampling manner in the character analysis implement and the principle of the transferring picture manner, it also includes the methods about the date competition, lock, the key path, load equilibrium and so on in the implement.