《深入理解并行编程》的原文摘录
Therefore, if you wish to argue that parallel programming will remain as difficult as it is currently perceived by many to be, it is you who bears the burden of proof, keeping in mind the many centuries of counter-examples in a variety of fields of endeavor. (查看原文 )
the primary goals of parallel pro-
gramming are performance, productivity, and gener-
ality. (查看原文 )
This book is intended primarily
for developers working near the bottom of the stack,
where performance and generality are paramount
concerns. (查看原文 )
It is important to keep in mind that parallelism
is but one way to improve performance. Other well-
known approaches include the following, in roughly
increasing order of difficulty:
1. Run multiple instances of a sequential applica-
tion.
2. Construct the application to make use of exist-
ing parallel software.
3. Apply performance optimization to the serial
application. (查看原文 )
Most people have an intuitive understanding that
passing messages between systems is considerably
more expensive than performing simple calcula-
tions within the confines of a single system. How-
ever, it is not always so clear that communicat-
ing among threads within the confines of a single
shared-memory system can also be quite expensive. (查看原文 )
shared-memory parallel programs must normally deal with no obstacle worse
than a cache miss, while a distributed parallel program will typically incur the larger
network communication latencies. (查看原文 )
3.3.3 Light, Not Electrons
Although the speed of light would be a hard limit, the fact
is that semiconductor devices are limited by the speed of
electrons rather than that of light, given that electrons in
semiconductor materials move at between 3% and 30%
of the speed of light in a vacuum. (查看原文 )