The purpose of this book is to help you understand how to program shared-memory parallel machines without risking your sanity. 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. You 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.
Between 4 and 5 stars. This book is pretty low-level. In fact it sometimes slips into electron level of things. Some chapters are definitely not an easy read. Be ready to struggle with a lot of C code. But it brings point home - parallel programing is hard. Especially if one want to do it in scalable and performant manner. The book tries really hard to dismantle the idea that just using locks with serial access is enough.
The most enlightening chapter for me was chapter 5 - about counting. The point being made - if you want to have performant code you'll have to treat it like a distributed system and assume that coordination is expensive even in shared-memory model. I'm still quite baffled by a chapter on memory barriers. I've never realized that it's a such complex topic. But can't say I have good idea how to use them after reading the book. Not sure if it's the books fault or just the domain is so damn complex.
Recommended by colleagues at work. Heavy going in parts but from the first pass looks like a definitive reference/tutorial about Parallel programming. Will be doing another reading sometime later.
Great explanation about lockless and lock based methods, memory barriers, RCU, hazard pointers, non-blocking synchronizations, multi-processor programming design techniques etc.
I have couple of gripes about the format of the book:
1. The code and the explanation for the code could have been written in a Knuth's Literate programming style since it was too distracting to keep scrolling back and forth between code and its explanation. The two column formatted pdf did help a bit but overall it was a lousy experience.
2. Lot of questions (referred to as quiz) were interspersed with the text which further complicated the flow of the reading. Agreed that the quizzes enable one to engage with the book but for a first perusal it was more distracting than helpful.
This is one of the best books I have ever seen in the subject. But you should consider this is pretty low level, I read few beginning chapter. I realized I need I little bit more knowledge to complete this easily. So I am putting this back on to-read shelf and I am definitely coming back for this one. You should read it, if you like low-level (really low level, I mean) parallel programming.