The purpose of this book is to help you program shared-memory parallel systems without risking your sanity. Nevertheless, you should think of the information in 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 will in time render this book obsolete. Parallel programming in the 21st century is no longer focused solely on science, research, and grand-challenge projects. And this is all to the good, because it means that parallel programming is becoming an engineering discipline. Therefore, as befits an engineering discipline, this book examines specific parallel-programming tasks and describes how to approach them. In some surprisingly common cases, these tasks can be automated. This book is written in the hope that presenting the engineering discipline underlying successful parallel-programming projects will free a new generation of parallel hackers from the need to slowly and painstakingly reinvent old wheels, enabling them to instead focus their energy and creativity on new frontiers. However, what you get from this book will be determined by what you put into it. It is hoped that simply reading this book will be helpful, and that working the Quick Quizzes will be even more helpful. However, the best results come from applying the techniques taught in this book to real-life problems. As always, practice makes perfect. But no matter how you approach it, we sincerely hope that parallel programming brings you at least as much fun, excitement, and challenge that it has brought to us!
翻译:本书旨在帮助你在不牺牲理智的前提下,对共享内存并行系统进行编程。然而,你应将本书中的信息视为构建的基础,而非一座已完工的宏伟殿堂。你的使命——若选择接受——是协助在激动人心的并行编程领域取得更大进展,而这一进展终将让本书过时。21世纪的并行编程已不再仅仅聚焦于科学、研究和宏大挑战项目。这实为幸事,因为它意味着并行编程正逐步成为一门工程学科。因此,与工程学科相称,本书审视具体的并行编程任务,并阐述如何着手处理。在某些出奇普遍的情况下,这些任务可以实现自动化。作者撰写本书,是希望展现成功并行编程项目背后的工程学科,从而让新一代并行黑客们无需再缓慢而艰辛地重新发明旧有的轮子,得以将他们的精力和创造力聚焦于新的前沿领域。然而,你从本书中能收获多少,取决于你投入了多少。我们期望,仅仅阅读本书便有所帮助,而完成书中的快速测验则能助益更多。不过,最佳成果来自于将本书传授的技巧应用于现实问题。熟能生巧,恒久不变。但无论你以何种方式研读,我们衷心希望并行编程能带给你至少与我们同样多的乐趣、激情与挑战!