views:

874

answers:

4

What is your opinion on The Art of Multiprocessor Programming, by Maurice Herlihy? Do you recommend it?

Please do not downvote other's opinions; if you have a different opinion, just add it as a new answer.

A: 

Well, the book looks okay, although I prefer O'Reilly books. And for some reason, it seems to contain Java samples. I would expect such a book to at least use C++ instead. At Elsevier you can find another description, although using Google on the book's title or ISBN will get even more useful links.

It should be an interesting book if you're doing lots of multi-processor stuff. Up until recently, I only used a single core with some additional hyperthreading so it wasn't that interesting to me. I now have a Quad-core Intel Xeon system for about three weeks so I am getting interested, but on a hobby level. (Most applications don't do much multi-threading, or just use the basics.)

There's also a draft PDF copy on the Internet available. This is just an appetizing short version. After browsing through this, the use of Java makes a bit more sense to me. Then again, I would expect that most modern runtime libraries are already secured for multi-processing tasks.

Workshop Alex
A: 

I've ordered it since it sounds interesting and relates well to my current line of work. I'm skeptical about a book-length coverage of this topic. I understand that it's complex and error-prone in practice but the conceptual basics are quite simple.

We'll see, I'll probably update this answer if I have any thoughts after it arrives.

Dan Olson
+3  A: 

This is a great book providing deep and and important coverage of a difficult topic. Maurice Herlihy is an ACM Fellow, was the first to really exploit consensus number(maybe even introduced it), provided many of the first proofs of sufficiency/insufficiency of various hardware synchronization primitives to implement various wait free data structures.

A thorough understanding of this book will give you great appreciation for some of the subtleties involved and a real appreciation of some of the benefits of garbage collection (ABA problem avoidance in particular). This is one reason things are in java.

First, truly correct MP safe C++ code generally involves great care in memory reuse and using global operator new and delete can frequently be just plain wrong (though the probability of the error showing its ugly head is frequently small. And it is not just the probability of wraparound of version stamps. google "hazard pointers" and chase down those papers many of which are available on the net)

Second, much of the content in this book is NOT about being MP safe. It is about achieving concurrency.

This book cannot be too highly recommended.

Another instructive book is Taubenfield - "Synchronization Algorithms"

Both books will require some work on your part.

BTW - the topic is not argumentative - seems like the guy just wants to know if he should spend $50 on the book.

+4  A: 

FWIW, it's definitely a "Text Book" meant for a high-level comp sci class rather than a reference or tutorial. There are "exercises for the reader" that are unfinished as well as Homework Questions that are unanswered. A reference, or even a tutorial book would have step-by-step solutions to each idea presented rather than a lot of open-ended questions that expect you to work out your own solutions.

It's meant to accompany classroom instruction. It's also a very "Computer Science" book in that algorithms are approached from a proof basis and done in pseudo-code or incomplete java fragments. This is not a book for someone to say "Hey, I want a working lock-free queue I can just use in my code" to buy -- you'll also have to work a bit harder in C++ (since some of the code assumes garbage collection and you'll have to use hazard pointers in C++).

The book also show a lot of things that don't work and then say hey this is wrong and here's why as opposed to only showing working solutions. I guess that's pretty good to learn what doesn't work but it puzzles me a bit why they have so many non-working solutions and then often leave the working solution as an "excercise to the reader".

That said, overall it's a good book and I have been learning from reading it. Just be prepared to work quite a bit mentally to take anything out of it -- this book is not going to spoon-feed you anything.

Adisak