Book review: Patterns for Parallel Programming

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Like other programming models, there are some patterns in selecting the right parallel solution when it comes to designing a parallel application. This is what this book is about. The solutions may be obvious, but patterns aften are.

Content and opinions

The global content of the book is nothing new. What is really great is the progression thoughout the book (the table of contents is perhaps obvious but it is easy to miswrite it). The decision one has to make to write a parallel application really follow the book’s flow.

Before the actual patterns, two chapters are spent explaining what is meant by parallel programming and the associated patterns. The implication on the OS and the environment are clear and simple. There isn’t much to say about these chapters, as it is pretty much basic knownledge.

The first interesting chapter is the third one. It starts the pattern show with how to achieve concurrency in one’s application. Data, task parallel? Then, how do data and task interact? Once this is done, the fourth chapter comes in. How can one use the preceding findings inside one’s algorithm? Pipeline, divide and conquer, … the usual solutions are thoroughly explained.

Once the interactions are set, they can be used to choose the best tool: one program or several (SPMD or MPMD)? Master/Worker, fork/join, … There are several ways of setting up the application to use the patterns of chapter four (what is called the structure space inside the book). Then, the final chapter is dedicated to the implementation of those structures. Threads or processes? It also depends on the parallel tool that one can use (MPI or OpenMP, for instance), and also how they can interact through synchronization and communication.

At this point, the last step is achived and the program may be written without additional thought about how parallelism can be achieved.

Conclusion

Of course, since the book was first published, additional parallel patterns were “found” (more exactly described), but the ones from the book are the most used ones. Nothing impedes you from using additional ones insode your own parallel workflow.

Ralph Johnson (from the Gang of Four) gave a talk about parallel patterns, and this book. It can be found there: http://media.cs.uiuc.edu/Apresos/seminars/UPCRC/2008-09-19/UPCRC__2008-09-19_02-58-PM_files/flash_index.htm Now that parallelism is the only way to go to really speed up programs, I hope the book will become more popular.

If you don’t like to read and if you have some sense of fun, you can view this Intel video. Enjoy 😉

1 thought on “Book review: Patterns for Parallel Programming

Leave a Reply