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 . . . . .
...
《Arduino项目开发:智能生活》内容简介:本书系统论述了Arduino开源硬件的架构、原理和开发方法,并具体阐述了19个完整的项目设计
《Linux虚拟化数据中心实战》内容简介:本书共8章,采用循序渐进的方式,帮助读者掌握Linux虚拟化架构的部署和使用,包括开源虚拟化
《文史随感》内容简介:本书是戴逸先生在史学研究之余创作的文史随感结集,书中鉴古思今,内容涉及作者对中国历史和文学、中西文化
《软件困局》内容简介:软件工程其实并没有多少“工程”的成分,这已经是公开的秘密了。自计算机诞生以来,特别是20世纪60年代大批
《温故(之六)》内容简介:《温故》是一种陆续出版的历史文化读物。以今天的视角来追怀与审视过去,并为当下的生存与未来的发展提
《数据库系统实现(第2版)》是斯坦福大学计算机科学专业数据库系列课程第二门课的教科书。书中对数据库系统实现原理进行了深入阐述
欧洲人用他们的浪漫洒脱,以及悠久的艺术传统造就了欧洲设计在世界上独树一帜的风采。本书汇集了奥地利著名设计学院历年的学生作
《Python网络编程(原书第2版)》内容简介:本书从使用者的角度出发,学习难度逐渐增加。首先简单回顾了TCP/IP和Python基础知识,然
内容简介:Web应用无处不在,安全隐患如影随形。承载着丰富功能与用途的Web应用程序中布满了各种漏洞,攻击者能够利用这些漏洞盗
本书详细地介绍使用TurboGears的丰富特殊性来实现更加快速的Web应用程序开发。主要内容包括TurboGears基础知识、SQLObject与Turb
基于实用、实践、前瞻性、学习的原则,笔者精选了近300段JavaScript代码和400种解决方案,覆盖了几乎所有的脚本处理模块,最大程
Visual C++.NET编程宝典 内容简介 本书作者具有丰富的Viual C++.NET/MFC经验,对许多具体问题的处理都有独到的见解。本书按照由浅入深的...
《每晚睡前原谅所有的人和事》内容简介:每晚入睡前,想着一天的劳累和辛苦,想着过往几十年的辛酸与不易,想着那些我们曾经错过和
《曹操传》内容简介:曹操是个历史评价非常复杂的人物,他战黄巾,讨董卓,剿灭吕布、袁术、公孙瓒,击败袁绍,收降刘琮、张绣等,
《SQL解惑(第2版)》中收集了75个与SQL编程相关的有趣问题,涉及数据库应用的许多方面,如财务、投资、旅游、销售、计算等,不一而
《布克·华盛顿与杜波依斯的思想之争及其对非裔政治领袖的影响(英文版)》内容简介:20世纪初,布克·华盛顿与杜波依斯就非裔美国
Getin-depthcoverageofWebapplicationplatformsandtheirvulnerabilities,presentedthe...
《物联网与智慧养老》内容简介:本书深入剖析当今我国人口老龄化与产业发展,从老龄化发展背景和智慧养老入手,结合物联网技术支撑
《行业专网规划设计手册》内容简介:本书首先介绍了专网的概念与目前国内外专网的建设现状。在专线电路的建设中根据承载业务对网络
《疯狂Java讲义》2000年至今,Java语言一直是应用最广的开发语言,并拥有最广泛的开发人群。如今,Java已经不再简单地是一门语言