perfbook-c1
Is Parallel Programming Hard, And, If So, What Can You Do About It?
《深入理解并行编程》
1 How To Use This Book
不同的程序会有不同的性能瓶颈。并行计算只能淡化某些瓶颈。 比如,假设你的程序花费最多的时间在等待磁盘驱动的数据。在这种情况下,让你的程序在多 CPU 下运行并不大可能会改善性能。实际上,如果进程正在读取一个旋转的磁盘上的大型顺序文件,并行设计程序也许会使它变得更慢。相反,你应该添加更多的磁盘、 优化数据以使这个文件能变得更小(因此读的更快),或者,如果可能的话,避免读取如此多的数据。
不是所有的程序都适合使用并行来提高性能,前提依赖于这个程序有良好的并行化设计。
This book is a handbook of widely applicable and heavily used design techniques, rather than a collection of optimal algorithms with tiny areas of applicability.
前言中的这句话体现了Paul
的技术格局和胸怀,要搞通用的输出而不是一些极个别领域的最佳算法和优化措施。
Don’t get me wrong, passively reading the material can be quite valuable, but gaining full problem-solving capability really does require that you practice solving problems. Finally, the most common learning disability is thinking that you already know. The quick quizzes can be an extremely effective cure.
作者认为比起被动阅读而言,带着问题去阅读,去尝试解决问题,能够对知识有更深的印象。Quick Quizzes
,是作者在读博时学习到的很棒的学习方式。
1.3
同类书籍推荐:
其中介绍了一些c++相关的优秀并行编程书籍
测试程序编译
- 编译安装依赖 Userspace RCU
问题:
- lockdeq.c:70:23: error: field ‘chain’ has incomplete type struct cds_list_head chain;