《多核程序设计》课程介绍
以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.