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 . . . . .
...
中文版Windows7 从入门到精通 本书特色 《从入门到精通系列:中文版windows 7从入门到精通》特点一本图书 三本价值1本书=入门十提高十精通=3本书...
TakeyourExcelskillstothenextlevelwithVBAprogrammingNowthatyouvemasteredExcelbasi...
《没什么难的HTML5完全自学手册》内容简介:本书作为HTML5网页开发语言的教程,系统地介绍了HTML5的相关知识点。全书共12章,从HTM
《精通HTML5+CSS3+JavaScript网页设计(视频教学版)(第2版)》内容简介:HTML5、CSS3和JavaScript技术是网页设计的精髓,本书...
PraisefortheSecondEdition:"Seriousresearchersincombinatoricsoralgorithmdesignwil...
《中国古代四大发明:源流、外传及世界影响》基于近30年间对考古发掘资料的利用、出土文物的考察和中外文献的考证,系统而深入地研
Cryptographyplaysakeyroleinensuringtheprivacyandintegrityofdataandthesecurityofc...
信息系统与数据库技术 内容简介 本书属于上海市教育委员会组编的“高等院校计算机基础综合应用能力培养规划教材”系列,可以从机械工业出版社教材服务网(www.cmp...
Ajax,orAsynchronousJavaScriptandXML,explodedontothesceneinthespringof2005andrema...
机器学习 本书特色" 机器学习是计算机科学与人工智能的重要分支领域. 本书作为该领域的入门教材,在内容上尽可能涵盖机器学习基础知识的各方面. 全书共16 章,大...
《Python预测分析实战》内容简介:本书先介绍预测分析的重要概念和原则,然后给出一系列的代码示例和算法讲解,引导读者了解完整的
ClojureisadynamicprogramminglanguagethattargetstheJavaVirtualMachine.TheJoyofClo...
《绝非偶然:撬动星球的头部效应》内容简介:这是一部各行业翘楚在互联网技术革命到来时,借助新媒体将个人能量放大,一跃逆袭成为
《3ds Max/VRay印象超写实建筑表现全模渲染技法》内容简介:本书从“真实”的角度出发,根据笔者多年积累的建筑效果图制作和教学经
《数据驱动:从方法到实践》内容简介:本书是从理论到实践的全面且细致的企业数据驱动指南,从作者的百度大数据工作说起,完整还原
《运动与职场人生》内容简介:本教材不把提高学生运动技能作为首要指导思想,而是更加注重体育的文化因素,以知识性、趣味性和可读
《Visual C++程序开发参考手册》内容简介:本书是一本VisualC 综合参考手册,介绍了VisualC 程序开发中涉及的各种函数、类及方法。
《大明帝国》内容简介:本书是一部以《明史》为基础的历史小说,分为上、下两册。全面展现了大明帝国开国后波云诡谲、血雨腥风的历
HostYourWebSiteOnTheCloudistheOFFICIALstep-by-stepguidetothisrevolutionaryapproa...
《编程卓越之道(卷1):深入理解计算机(第2版)》内容简介:卓越的代码需要利用现代编程语言的先进特性来实现软件功能。但软件最终