Jump to ratings and reviews
Rate this book

The Art of Concurrency: A Thread Monkey's Guide to Writing Parallel Applications

Rate this book
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 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.

301 pages, Paperback

First published January 1, 2009

12 people are currently reading
159 people want to read

About the author

Clay Breshears

2 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
6 (16%)
4 stars
11 (29%)
3 stars
13 (35%)
2 stars
5 (13%)
1 star
2 (5%)
Displaying 1 - 5 of 5 reviews
Profile Image for Mauro.
43 reviews2 followers
December 27, 2019
A very nice book on parallel algorithms for modern shared memory machines. I already had a couple of books on related topics, but they either cover the specifics of some threading library but don't say anything about how you'd go about parallelizing a serial algorithm, or assume that you want to program a distributed memory system with a message passing API. So I found The Art of Concurrency quite useful.

The first few chapters cover topics such as theoretical models for parallel machines, how to reason about algorithm correctness, and the basics of some APIs (OpenMP, TBB, pthreads and Windows threads). Later chapters cover building blocks such as parallel sum and prefix scan, then map/reduce, and sorting and graph algorithms.

The writing is informal, but the book requires some serious commitment (I found it useful to implement some of the algorithms with the C++11 threading facilities). It's not a cookbook either: for instance, there are a few pages on parallelizing bubble sort and showing that the implementation is correct. No one in their right mind would use a parallel bubble sort in production code, but I found the discussion enlightening.

It does not cover topics such as SIMD or CUDA/OpenCL - thankfully, as there's more than enough to take in already.

Unfortunately, the sample code is a bit sloppy (allocating with new[] and deallocating with free? Also, declaring variables where they are used would have saved some space on the page...). And some of the algorithms only made sense after I looked them up on Wikipedia.

Still: worth reading.
Profile Image for Warren Mcpherson.
196 reviews34 followers
December 29, 2019
This guide to writing concurrent applications covers major design considerations, specific advice and runs through many significant algorithms in detail. Three topics were expanded extensively, Map Reduce, Sorting and graph algorithms. These were well chosen and well explained. Serial versions of algorithms were outlined, then the approach to a parallel implementation was explained. This is a good overview.
Profile Image for Thomas Harning.
8 reviews
February 6, 2011
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.
Profile Image for Fabien Niñoles.
8 reviews
March 30, 2015
Good reading for those who want to learn the basic tools and algorithms of concurrency programming. The book touch mainly multithreading parallel algorithms using C++ (and some extensions), touch a little bit the context of distributed programming and very little about lock-free and wait-free programming. Nothing is really said about other models like transactional programming and other models, but the book already covers a lot with just that.

The algorithms are approached in a progressive manner, the author following his own advice to start with a non-concurrent version and transform it to a concurrent version where you can, using either TBB, OpenMP, pthreads or Windows Threads. Unless you are already doing a lot of parallels algorithms (not only multithreading, real parallels algorithms), you should probably learn a thing or two here, or at least get a good revision of those pesky parallel algorithms you learn in classes. The examples are very clear, simple and often illustrated and still contains the little details that can transform a simple sort in a debugging nightmare.

In all, a good read.
Displaying 1 - 5 of 5 reviews

Can't find what you're looking for?

Get help and learn more about the design.