views:

2754

answers:

9

I want to read a good book about multithreading and parallelism. I have a primarily .NET background but I think I would prefer a book focused on first principles and working into general patterns and algorithms and being overall less technology specific.

Obviously a discussion of the kind of low-level system architecture issues that the C# "volatile" keyword attempts to address (for example) would be important, just without being tied directly to a particular language.

Is there a particular book in this field that stands out among the others?

Thanks,

+1  A: 

Joe Duffy has a book coming out soon: Concurrent Programming on Windows

Obviously that's somewhat technology specific, but it goes into a lot of low-level detail and also addresses the principles involved. It's platform-specific but not really language-specific. It's also by someone who I trust enormously when it comes to concurrency.

Jon Skeet
+2  A: 

I recommend Principles of Concurrent and Distributed Programming by M. Ben-Ari, or his first about Concurrent Programming

epatel
+1  A: 
eed3si9n
+3  A: 

Joe Albahari's free ebook Threading in C# is excellent.

Mitch Wheat
+6  A: 
Rasmus Faber
It's a great book for Java but not so sure about C#
Steve McLeod
After two weeks, this answer has the most votes so I'll accept it and go buy the book.
Jason Stangroome
+1  A: 

I haven't read it yet, but The Art of Multiprocessor Programming by Herlihy and Shavit has been getting good reviews.

Alex Miller
+1  A: 

Jeffrey Richter's CLR via C# has a couple of great chapters on asynchronous programming in CLR.

Geoff Snowman
+1  A: 

The best resource for learning how to use multi-threading in an OO language that I've ever used is:

Lea, Douglas - Concurrent Programming in Java(TM): Design Principles and Patterns (3rd Edition)

If you want to understand low-level hardware/software details and how Java/.NET multi-threading constructs are implemented then the following is a great start:

Butenhof, David R. - Programming with POSIX(R) Threads (Addison-Wesley Professional Computing Series)

To understand how to apply concepts from the pthreads book to a Windows environment then the following is essential:

Hart, Johnson M. - Windows System Programming (3rd Edition)

Matthew Murdoch
+2  A: 

I am aiming for C++ Concurrency in Action to be that book, at least if you're programming in C++. Though all the examples are C++-specific, lots of the principles are not. See, for example, the excerpt recently published on CodeGuru about deadlock.

Anthony Williams