The purpose of this book is to help you understand how to program shared-memory parallel machines without risking your sanity.1 By describing the algorithms and designs that have worked well in the past, we hope to help you avoid at least some of the pitfalls that have beset parallel projects. But you should think of this book as a foundation on which to build, rather than as a completed cathedral. Your mission, if you choose to accept, is to help make further progress in the exciting field of parallel programming, progress that should in time render this book obsolete. Parallel programming is not as hard as it is reputed, and it is hoped that this book makes it even
easier for you.
1
Introduction
1.1 Historic Parallel Programming Difficulties . . . . . . . . . . . . . . . . .
1.2 Parallel Programming Goals . . . . . . . . . . . . . . . . . . . . . . . .
1.2.1 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.2 Productivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.3 Generality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 Alternatives to Parallel Programming . . . . . . . . . . . . . . . . . . . .
1.3.1 Multiple Instances of a Sequential Application . . . . . . . . . .
1.3.2 Make Use of Existing Parallel Software . . . . . . . . . . . . . .
1.3.3 Performance Optimization . . . . . . . . . . . . . . . . . . . . .
1.4 What Makes Parallel Programming Hard? . . . . . . . . . . . . . . . . .
1.4.1 Work Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.2 Parallel Access Control . . . . . . . . . . . . . . . . . . . . . . .
1.4.3 Resource Partitioning and Replication . . . . . . . . . . . . . . .
1.4.4 Interacting With Hardware . . . . . . . . . . . . . . . . . . . . .
1.4.5 Composite Capabilities . . . . . . . . . . . . . . . . . . . . . . .
1.4.6 How Do Languages and Environments Assist With These Tasks? .
1.5 Guide to This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5.1 Quick Quizzes . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5.2 Sample Source Code . . . . . . . . . . . . . . . . . . . . . . . .
2 Hardware and its Habits
2.1 Overview . . . . . . . . . . . . . . .
2.1.1 Pipelined CPUs . . . . . . . .
2.1.2 Memory References . . . . .
2.1.3 Atomic Operations . . . . . .
2.1.4 Memory Barriers . . . . . . .
2.1.5 Cache Misses . . . . . . . . .
2.1.6 I/O Operations . . . . . . . .
2.2 Overheads . . . . . . . . . . . . . . .
2.2.1 Hardware System Architecture
2.2.2 Costs of Operations . . . . . .
2.3 Hardware Free Lunch? . . . . . . . .
2.3.1 3D Integration . . . . . . . .
2.3.2 Novel Materials and Processes
2.3.3 Special-Purpose Accelerators
2.3.4 Existing Parallel Software . .
2.4 Software Design Implications . . . . .
...
很多程序员及软件设计师都认为,用c++开发意味着放弃程序性能提升的可能。在很多人眼里,使用c++来开发那些效率至上的应用无疑将
《PyTorch机器学习从入门到实战》内容简介:近年来,基于深度学习的人工智能掀起了一股学习的热潮。本书是使用PyTorch深度学习框架
《中国调解的理念创新与机制重塑》内容简介:人民调解制度是传统中国社会纠纷化解的一种重要机制,也是中国法律传统的重要组成部分
《堆栈的艺术:Photoshop风光摄影后期叠加处理技法》内容简介:本书介绍了堆栈的基本概念及原理,借助大量的实际案例,讲解各种堆栈
《别输在不懂营销上》内容简介:本书按照推销的进程来安排顺序,从塑造推销员的基本素质说开去,将接近客户、寻找和开发客户、产品介
●本书是作者多年来教学实践经验的总结,汇集了学员在学习课程或认证考试中遇到的概念、操作、应用等问题及解决方案●针对JavaSE
《华为HCIA路由交换认证指南》内容简介:本书是针对HCIA最新考试大纲编写的认证教材。全书共分为15章,首先介绍了计算机网络的产生
盖国强(网名Eygle),OracleACE总监,恩墨科技创始人,ITPUB论坛超级版主,远程DBA服务的倡导者和实践者,致力于以技术服务客户
Graspthefundamentalsofwebapplicationdevelopmentbybuildingasimpledatabase-backeda...
XML基础教程 本书特色 XML是由万维网联盟定义的一种语言,是表示结构化数据的行业标准,使得Internet上的数据相互交流更方便,让文件的内容更加显而易懂。...
小型纸品的设计,使平面设计师找到了可以真正发挥创造才能的机会。本书提供的近千幅图例,很多是在不需要满足客户要求的情况下,
管理运筹学和MATLAB软件应用 内容简介 本书从现代管理科学研究和实际应用的角度出发,将运筹学的原理、建模方法、应用事例和MATLAB软件计算有机地结合起来,...
《物像:观看的意义之旅》内容简介:观看,让我们抵达艺术的意义,解开物像之迷,看见记忆与失忆。最新张晓刚研究论著✖近50幅画作
《3分钟,让公司介绍发光》内容简介:本书聚焦公司介绍的书写和展示,力争实现:用3分钟的介绍,让客户选择,被客户信任,达成合作
要想在网络经济中取得竞争优势,仅有网络是远远不够的,本书是为那些面临规划网络战略重任的经理们所写的,这些战略将为他们公司
《WCDMA无线网络规划与优化》围绕WCDMA移动通信系统中的各种网络规划和优化技术和方法,结合作者多年的研究成果,并在参考大量国
《On Java 中文版:进阶卷(试读本)》内容简介:☆本电子书仅为试读本,截取原书部分内容。☆ 本书内容主要是对《On Java 中文版:
《ASP.NET MVC 企业级实战》内容简介:ASP.NET MVC 是微软官方提供的以MVC模式为基础的ASP.NET Web应用程序框架。MVC 将一个W...
《高速信号传输工程化技术:概念与方法》内容简介:本书对高速信号传输相关技术中需要掌握的概念、理论和方法深入浅出地给出了定义
《设计模式之禅》内容简介:全书共分为四部分,第一部分从原理的角度阐述了面向对象程序设计的6大原则;第二部生动地讲解和剖析了2