If you're looking to take full advantage of multi-core processors with concurrent programming, this practical book provides the knowledge and hands-on experience you need. The Art of Concurrency is one of the few resources to focus on implementing algorithms in the shared-memory model of multi-core processors, rather than just theoretical models or distributed-memory architectures. The book provides detailed explanations and usable samples to help you transform algorithms from serial to parallel code, along with advice and analysis for avoiding mistakes that programmers typically make when first attempting these computations.
Written by an Intel engineer with over two decades of parallel and concurrent programming experience, this book will help you:
Understand parallelism and concurrency
Explore differences between programming for shared-memory and distributed-memory
Learn guidelines for designing multithreaded applications, including testing and tuning
Discover how to make best use of different threading libraries, including Windows threads, POSIX threads, OpenMP, and Intel Threading Building Blocks
Explore how to implement concurrent algorithms that involve sorting, searching, graphs, and other practical computations
The Art of Concurrency shows you how to keep algorithms scalable to take advantage of new processors with even more cores. For developing parallel code algorithms for concurrent programming, this book is a must.
Chapter 1 Want to Go Faster? Raise Your Hands if You Want to Go Faster!
Some Questions You May Have
Four Steps of a Threading Methodology
Background of Parallel Algorithms
Shared-Memory Programming Versus Distributed-Memory Programming
This Book’s Approach to Concurrent Programming
Chapter 2 Concurrent or Not Concurrent?
Design Models for Concurrent Algorithms
What’s Not Parallel
Chapter 3 Proving Correctness and Measuring Performance
Verification of Parallel Algorithms
Example: The Critical Section Problem
Performance Metrics (How Am I Doing?)
Review of the Evolution for Supporting Parallelism in Hardware
Chapter 4 Eight Simple Rules for Designing Multithreaded Applications
Rule 1: Identify Truly Independent Computations
Rule 2: Implement Concurrency at the Highest Level Possible
Rule 3: Plan Early for Scalability to Take Advantage of Increasing Numbers of Cores
Rule 4: Make Use of Thread-Safe Libraries Wherever Possible
Rule 5: Use the Right Threading Model
Rule 6: Never Assume a Particular Order of Execution
Rule 7: Use Thread-Local Storage Whenever Possible or Associate Locks to Specific Data
Rule 8: Dare to Change the Algorithm for a Better Chance of Concurrency
Clay Breshears has been with Intel since September 2000. He started as a Senior Parallel Application Engineer at the Intel Parallel Applications Center in Champaign, IL, implementing multithreaded and distributed solutions in customer applications. Clay is currently a Course Architect for the Intel Software College, specializing in multi-core and multithreaded programming and training. Before joining Intel, Clay was a Research Scientist at Rice University helping Department of Defense researchers make best use ofthe latest High Performance Computing (HPC) platforms and resources.
Clay received his Ph.D. in Computer Science from the University of Tennessee, Knoxville, in 1996, but has been involved with parallel computation and programming for over twenty years; six of those years were spent in academia at Eastern Washington University and The University of Southern Mississippi.
The cover image is an aerial view of wheat-harvesting combines from Getty Images. The cover fonts are Akzidenz Grotesk and Orator. The text font is Adobe's Meridien; the heading font is ITC Bailey.
Comments about O'Reilly Media The Art of Concurrency:
"The Art of Concurrency," by Clay Breshears, is an outstanding book on concurrent algorithms and multi-threaded programming. Breshears hits the sweet spot between rigor and readability, and manages to make a terrifically difficult subject accessible, if not the to layman, at least to motivated and experienced developers.
While I cannot imagine a more accessible book on the subject, make no mistake: reading this book requires some serious head work and commitment. If you stay the course, you will review the details of algorithms that you vaguely remember (quick sort; Floyd's algorithm) and some that may be entirely new to you (PRAM). But the rewards are significant: not just a sense of accomplishment, but confidence that you could transform a gnarly serial algorithm into a parallel version that would run rings around the original. There is also the intangible benefit of having been forced to look at problems sideways, with the result that next time you need to engineer a solution, you will be less stuck in a rut and more apt to find an elegant, out-of-the-box solution.
Although there are some eminently practical chapters on searching for potential race conditions, this book is not a cookbook of thread solutions: few developers will need to implement parallel binary searches, parallel sorts, or parallel graph traversal. Yet reading this book should make a developer better prepared to resolve more mundane concurrency issues. And it goes down easy: the author has a charming voice, loves his area of expertise, and takes delight in leading the reader through this subject.
Without a doubt, this is one of the best books on programming that I have read.
2/6/2011
4.0
Great introduction and reference
By harningt
from Huntertown, IN
About Me Developer
Pros
Easy to understand
Helpful examples
Well-written
Cons
Best Uses
Expert
Intermediate
Comments about O'Reilly Media The Art of Concurrency:
With CPUs growing in power by adding additional core as opposed to just getting "faster", learning how to take advantage of parallel programming is a must. The book "The Art of Concurrency: A Thread Monkey's Guide to Writing Parallel Applications" by Clay Breshears works great as a reference and guide for determining when parallelization may be possible, how it could be done, and what to look out for.
The book introduces the reader to parallel programming with a set of useful rules and guidelines to follow to plan for optimizing algorithms by distributing workloads through concurrent programming. Much of the remainder of the book enumerates some common tasks and how to make them concurrent. One of the best parts of the common task listing is the scorecard for evaluating the quality of the implementation. The scorecard includes the useful performance factors of "efficiency" and "scalability". It also includes the important details of "simplicity" and "portability", important when evaluating methods for maintainable code. The common threading tools OpenMP, Intel Thread Building Blocks, and POSIX threads are described in the early chapters and sprinkled throughout the examples in a useful manner, providing exposure to different ways one might implement concurency; not everyone needs to re-invent the wheel when optimizing tasks.
11/24/2009
(4 of 9 customers found this review helpful)
4.0
Content ok, style strange
By Chrilly
from Altmelon, Austria/Europe
About Me Designer, Developer
Pros
Accurate
Helpful examples
Cons
Best Uses
Expert
Intermediate
Comments about O'Reilly Media The Art of Concurrency:
The book is a good introduction into concurrent/parallel programming on shared memory machines. It shows how one can use the multiple cores on modern PCs. The author presents usefull examples in C++ (its in fact C). He covers OpenMP, TBB, Unix-Pthreads and Windows-Threads in a balanced way. There are (naturally) no MPI examples. A drawback of the book is the writing style. The author takes himself to serious and important. He "speaks" sometimes to the reader like a mother to a 3 years old child. Just to impress the reader, he mentions several times that he has a PhD in Computer-Science. Personally I was not impressed, because for a mathematician CS is a second-hand discipline. But that's another story.
Another drawback of the book is, that the code is not available on the net.