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 . . . . .
...
《史官主书与秦书八体》内容简介:“主书”是史官的基本职能,而“秦书八体”则是指通行于秦代的八种书体。本书由“史官主书研究”
《基于Kubernetes的DevOps实践:容器加速软件交付》内容简介:容器化被认为是实现DevOps的最佳方式。谷歌开发了Kubernetes,它有效
Whatdoesittaketobecomeadoctor,andhowdotheykeepushealthy?Learnhowlongdoctorshavet...
内容简介:今天的Android应用开发者经常要想尽办法来提升程序性能。由于应用越来越复杂,这个问题也变得越来越棘手。本书主要介绍
《特大型城市公共服务资源配置》内容简介:本书运用问卷调查、个案访谈、典型事件等社会调查方法,研究了特大型城市基层治理与创业
天正十五(1587)年,德川家康将治城搬到骏府,夫人朝日姬因母病被接回大坂。经数年征讨,丰臣秀吉遍服众大名,同十七年,发兵征
《典藏:经典世界名画高清图集》内容简介:了解艺术史,最直观的方法就是去欣赏艺术作品。本书集结了中世纪以来艺术史上各流派的经
《新手易学:中文版Photoshop CS5图像处理》内容简介:《新手易学:中文版Photoshop CS5图像处理》是为帮助Photoshop初级用户掌握Ph
《所思远道:两周卷》内容简介:《所思远道:两周卷》全书通过对我国两周时期大量文明遗产(包括各类工艺品、美术作品、音乐舞蹈作
《深入大型数据集cf》内容简介:《深入大型数据集:并行与分布化Python代码》共分3部分,主要介绍如何使用Python语言来处理大型数据
2015,中国以“一带一路”为纽带,选择和平与共享的方式,重新缔造与世界的关系;抗战胜利日大阅兵,对应的是70年前中国以血肉之
《C++编程规范:101条规则准则与最佳实践》中,两位知名的C++专家将全球C++界20年的集体智慧和经验凝结成一套编程规范。这些规范可
《中国:推动金砖国家合作第二个黄金十年》内容简介:“求和平、谋发展、促合作、图共赢”,金砖国家“十年磨一剑”,一步一个脚印
Ubuntu Linux完全自学教程 本书特色 全程图片讲解轻松推进,100%可实践针对性实例,节省70%学习时间Ubuntu Linux完全自学教程 内容简介...
本书是一本引导读者深入了解Docker实现原理的技术普及读物,主要目标是通过对Docker架构和源代码的详细讲解和解剖,帮助读者对Do
《长三角文化产业发展蓝皮书》内容简介:本书分为五个部分,主要包括总报告、行业报告篇、专题报告篇、区域报告篇和长三角文化产业
米兰·斯特瓦诺维奇编著的这本《高级CC编译技术》从多个角度全面、系统地讲解多任务操作系统中编译、链接、装载与库的内幕和技术
《Ruby设计模式》是一本关于设计模式方面的重点书籍。《Ruby设计模式》以通俗易懂的方式介绍了Ruby设计模式,主要包括Ruby概述、
PRO/ENCINEERZ中文野火版4.0模具设计师-分模特训篇 目录 第1章Pro/E分模的基础知识1.1Pro/MOLDESIGN模块1.2Pro/E的模具...
现在的软件糟糕透顶。软件不安全,它允许恶意程序通过Internet线路钻到我们的卧室;软件不可靠,当我们最需要它的时候它却崩溃,