The Art of Multiprocessor Programming and over 360,000 other books are available for Amazon Kindle – Amazon’s new wireless reading device. Learn more

 

or
Sign in to turn on 1-Click ordering.
 
 
Express Checkout with PayPhrase
What's this? | Create PayPhrase
Sorry!
More Buying Choices
43 used & new from $45.47

Have one to sell? Sell yours here
 
   
The Art of Multiprocessor Programming
 
 
Start reading The Art of Multiprocessor Programming on your Kindle in under a minute.

Don’t have a Kindle? Get your Kindle here.
 
  

The Art of Multiprocessor Programming (Paperback)

~ (Author), (Author)
Key Phrases: transactional memory, work distribution, concurrent objects, Exercises Exercise, Distributed Coordination, Linked Lists (more...)
4.4 out of 5 stars  See all reviews (10 customer reviews)

List Price: $69.95
Price: $56.65 & this item ships for FREE with Super Saver Shipping. Details
You Save: $13.30 (19%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Want it delivered Thursday, November 12? Choose One-Day Shipping at checkout. Details
29 new from $47.95 14 used from $45.47

Formats

Amazon Price New from Used from
  Kindle Edition $45.32 -- --
  Paperback $56.65 $47.95 $45.47

Frequently Bought Together

The Art of Multiprocessor Programming + Patterns for Parallel Programming + Intel Threading Building Blocks: Outfitting C++ for Multi-Core Processor Parallelism
Price For All Three: $129.42

Show availability and shipping details

  • This item: The Art of Multiprocessor Programming by Maurice Herlihy

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Patterns for Parallel Programming by Timothy G. Mattson

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Intel Threading Building Blocks: Outfitting C++ for Multi-Core Processor Parallelism by James Reinders

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

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

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

by Clay Breshears
4.0 out of 5 stars (3)  $38.71
Professional Multicore Programming: Design and Implementation for C++ Developers (Wrox Programmer to Programmer)

Professional Multicore Programming: Design and Implementation for C++ Developers (Wrox Programmer to Programmer)

by Cameron Hughes
4.5 out of 5 stars (2)  $37.79
Synchronization Algorithms and Concurrent Programming

Synchronization Algorithms and Concurrent Programming

by Gadi Taubenfeld
5.0 out of 5 stars (2)  $81.83
Intel Threading Building Blocks: Outfitting C++ for Multi-Core Processor Parallelism

Intel Threading Building Blocks: Outfitting C++ for Multi-Core Processor Parallelism

by James Reinders
3.7 out of 5 stars (3)  $34.07
Elements of Programming

Elements of Programming

by Alexander Stepanov
4.9 out of 5 stars (7)  $31.99
Explore similar items

Editorial Reviews

Book Description

The first text and reference on this sea change in the computer industry


Product Description

This book is the first comprehensive presentation of the principles and tools available for programming multiprocessor machines. It is of immediate use to programmers working with the new architectures. For example, the next generation of computer game consoles will all be multiprocessor-based, and the game industry is currently struggling to understand how to address the programming challenges presented by these machines.
This change in the industry is so fundamental that it is certain to require a significant response by universities, and courses on multicore programming will become a staple of computer science curriculums.
The authors are well known and respected in this community and both teach and conduct research in this area. Prof. Maurice Herlihy is on the faculty of Brown University. He is the recipient of the 2003 Dijkstra Prize in distributed computing. Prof. Nir Shavit is on the faculty of Tel-Aviv University and a member of the technical staff at Sun Microsystems Laboratories. In 2004 they shared the Gödel Prize, the highest award in theoretical computer science.

* THE book on multicore programming, the new paradigm of computer science
* Written by the world's most revered experts in multiprocessor programming and performance
* Includes examples, models, exercises, PowerPoint slides, and sample Java programs

Product Details

  • Paperback: 528 pages
  • Publisher: Morgan Kaufmann (March 14, 2008)
  • Language: English
  • ISBN-10: 0123705916
  • ISBN-13: 978-0123705914
  • Product Dimensions: 9.2 x 7.5 x 1 inches
  • Shipping Weight: 1.7 pounds (View shipping rates and policies)
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (10 customer reviews)
  • Amazon.com Sales Rank: #15,056 in Books (See Bestsellers in Books)

    Popular in these categories: (What's this?)

    #2 in  Books > Computers & Internet > Hardware > Parallel Processing Computers
    #3 in  Books > Computers & Internet > Databases > Distributed Databases

More About the Authors

Discover books, learn about writers, read author blogs, and more.

Inside This Book (learn more)


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(2)
(1)

Your tags: Add your first tag
 

 

Customer Reviews

10 Reviews
5 star:
 (7)
4 star:
 (2)
3 star:    (0)
2 star:    (0)
1 star:
 (1)
 
 
 
 
 
Average Customer Review
4.4 out of 5 stars (10 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
35 of 35 people found the following review helpful:
4.0 out of 5 stars The content is brilliant, the code is sometimes misleading, May 28, 2008
The content is perfect and deserves 5 stars and I agree with the 5 stars comments, but the code deserves the only 3 stars as there are a lot of flaws in it - the code even contradicts its description( both in the book and in the code downloaded from a site ). For example, at chapter 8.3.1 the Readers-Writers ( i.e. multiple-readers-multiple-writers as the name suggests ) implementation is actually a multiple-readers-single-writer as the WriteLock.lock() method doesn't protect from multiple writers( there is a mention about a single writer in the text but the paragraph name suggests multiple writers ). The code at 8.3.2 is just misleading and doesn't match the description - again the WriteLock.lock() is flawed - it frees the lock if readAcquires != readReleases thus allowing the ReadLock.lock() method to acquire the lock and increment the readAcquires counter which results in the writer starvation and lost of fairness( should be FIFO ) and again there is no protection from multiple writers but the "Readers-Writers lock" name suggests that it should be. And as the last blow the code in 8.3.2 suffers from the lost-wakeup problem described two pages before - the WriterLock.unlock() method doesn't wake up the readers waiting in condition.await(). But there is a rehabilitation for the authors - the description for the code doesn't contain the flaws mentioned above - it is absolutely correct! The Chapter 8 drove me mad by its discrepancy between the text and the code!
So, I got suspicious about the code in the book but not about the description.
I rated the book 4 stars as the content and description( including pictures )is brilliant but the code is sometimes wrong and misleading ( I think it was copy-pasted from the old authors's works ), if the code had not contained such bizarre flaws I would have rated 5 stars as the content is really perfect and shows the authors expertise in the field.
Comment Comments (2) | Permalink | Was this review helpful to you? Yes No (Report this)



 
20 of 20 people found the following review helpful:
5.0 out of 5 stars An invaluable resource for contemporary programmers, May 29, 2008
This book gives programmers the practical and theoretical tools they need to adapt to the proliferation of multi-core machines. It opens with six chapters on theoretical subjects. These chapters are fascinating in their own right as well as directly applicable to my daily work. I thought the most important subjects were wait-free synchronization (every method completes in a finite number of steps), lock-free synchronization (some method completes in a finite number of steps), and some computability proofs. The authors use computability to demonstrate the equivalence of several types of synchronization primitives. They also present some impossibility proofs that show you how to avoid trying to solve unsolvable problems. The computability results and synchronization guarantees combine to give you the tools to determine whether one concurrent algorithm is "better" than another.

The remainder of the book is devoted to practical subjects. These chapters cover locks, a variety of data structures, work scheduling, and some miscellaneous topics. Java's java.util.concurrent package provides production-quality implementations of most of these data structures. The authors know this, and they use the data structures chapters to demonstrate generally applicable techniques while avoiding unnecessary implementation details. The work scheduling chapter is a sobering reminder of the difficulty inherent in fully exploiting highly parallel architectures. The authors show how to use recurrences to analyze the relative speedup an algorithm gains by running on P processors instead of a single processor. Combining this with the discussion of Ahmdal's Law earlier in the book we see that the essential math behind parallelism severely penalizes you for seemingly small sequential portions of your code. I also found the counting networks chapter fascinating, as I had never encountered that material before.

The book also provides appendices aimed at bringing inexperienced readers up to speed. That said, I wouldn't recommend this book for inexperienced programmers. The material is challenging. If you are looking for a gentler introduction to this subject, consider Java Concurrency in Practice. Each chapter ends with a note describing the history of the material and providing pointers to the bibliography. These demonstrate that the authors have been significant contributors to this field. I do agree with the review from Vyacheslav Imameyev - some of the code samples are wrong. I think they missed "volatile" keywords in several places. I don't see this as a cookbook, so I'm still giving the book five stars.

Highly parallel machines are here to stay. Programmers need to adapt to this or suffer competitive disadvantage. This is the book to read in order to meet that challenge.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
24 of 26 people found the following review helpful:
5.0 out of 5 stars Soon to be the classic text on multiprocessor programming, December 7, 2008
The Art of Multiprocessor Programming is an outstanding text that will soon become a classic. I give a chapter by chapter review of it below.

Practitioners that are already well versed in parallel programming can jump directly to Chapter 7, however, I would suggest at least skimming Chapters 2, 3 and 4. Even those programmers who understand shared memory and locking may be shocked at how relaxed memory models or compiler optimizations can reorder operations causing innocent looking code to break.

----------------------------------------

Chapter 1 - Introduction

Why is this book called "The Art of Multiprocessor Programming" and not "The Art of Parallel Programming?" It is not by accident. There is a directed effort to explain parallel programming concepts as they relate to multi-core (or many-core) architectures. In particular, shared-memory multiprocessors have specific implementation details, such as cache coherence policies, that directly affect parallel software run on such architectures. The introduction gives a brief overview of the direction of the text: principles and practice.

----------------------------------------

Part 1 - Principles

Chapter 2 - Mutual Exclusion

Mutual exclusion is a key concept to multi-threaded programming, and this chapter is rightly placed at the beginning of the text. This chapter presents some of the foundational concepts in parallel computing, such as, understanding time related to operation interleavings, pessimistic critical sections, forward progress, deadlocks and fairness. In addition, some of the classic algorithms are presented here, such as Lamport's Ticket Locking and Peterson's 2-Threaded Lock.

Chapter 3 - Concurrent Objects

This chapter starts off simple, but gets complex fast. While experts will understand and acknowledge the importance of this chapter, less experienced programmers will find it very challenging to understand and may be turned off: don't give up!

My suggestion to non-experts is to focus on understanding two concepts of this chapter: hardware sequential consistency (3.4) and software linearizibility (3.5). Once you understand both concepts, skim all other sections except section 3.8.

Java programmers may want to pay special attention to the Java Memory Model section (3.8) and ill-formed unsynchronized code. General programmers will also be interested in this section as it is important to understand how the hardware's memory consistency model, the programming language's memory model and the compiler's operation reordering optimizations may interfere with what "looks like" correct code.

Do not be discouraged by the difficult of this chapter. It is one of the most difficult chapter in the text. Get through it and keep reading.

Chapter 4 - Foundations of Shared Memory

This chapter concentrates on understanding shared memory, the cornerstone of all multi-threaded applications. It explains how to implement shared memory that behaves "correctly" without using mutual exclusion. The different types of memory that are discussed are single-reader single-writer (SRSW), multiple-reader single-writer (MRSW) and multiple-reader multiple-writer (MRMW). This is an important chapter for non-experts to think about, as it explains how operation interleavings are not as discrete as we pretend they are and how shared memory should behave in all possible cases.

Chapter 5 - The Relative Power of Primitive Synchronization Operations

This chapter explains the varying strength of different wait-free synchronization primitives. Consensus numbers will undoubtedly confuse novice parallel programmers. In short, the higher the consensus number the better. A high consensus number, say N, for a synchronization primitive means that synchronization primitive can "correctly" solve the consensus problem for N concurrently executing threads. For example, critical sections have an infinite consensus number (e.g. support an infinite number of concurrent threads). Atomic registers have a consensus number of 1, they support only 1 thread's execution that is guaranteed to consistently and validly solve the consensus problem.

The most important point of this chapter (in my opinion) is that compare-and-swap (CAS), or compare-and-set, has an infinite consensus number (section 5.8). This is why modern instruction set architectures (ISAs) all provide CAS: it is critical to supporting an unlimited number of concurrently executing threads. Realizing the importance of CAS is vital for advanced parallel programmers who want to implement nonblocking algorithms.

Chapter 6 - Universality of Consensus

This chapter explains how to build universal consensus for your own concurrent objects. While it will be an interesting chapter for experts, novices may want to skip it.

----------------------------------------

Part II - Practice

Chapter 7 - Spinlocks and Contention

This chapter explains the important differences between different types of locking. It explains how to implement locks using assembly level operations (test-and-set and test-and-test-and-set), how to reduce bus contention using backoff, how to reduce cache pressure by having threads spin on their local cache memory and how to manage an unknown number of threads using locks.

After reading this chapter, most readers should have an appreciation for the hardware complexity of implementing something as simple as a lock. Some programmers may argue that they should not need to know how hardware behaves. While I would like to agree, the unfortunate state of multi-core programming currently requires a basic understanding of memory consistency models and cache behaviors. Herlihy and Shavit note this and make an effort to address it in a "just what you need to know" fashion, as done in this chapter.

Chapter 8 - Monitors and Blocking Synchronization

This chapter explains monitors, conditions, the differences between readers and writers, and reentrant locks. Java programmers will be especially interested in understanding monitors, while all OO programmers should have an appreciation of synchronizing an entire class. Moreover, the section on reentrant locks is simple but important to preventing deadlocks.

----------------------------------------

Unofficially, Chapters 9 - 11 focus on achieving parallelism in algorithms that have sequential bottlenecks and are therefore inherently sequential.

----------------------------------------

Chapter 9 - Linked Lists: The Role of Locking

The chapter explains how to implement ordered linked lists (e.g., IntSets or just sets) in a variety of different ways. The chapter starts out with the most basic implementation and then begins to increase performance by relaxing the strictness of the required thread synchronization.

Chapter 10 - Concurrent Queues and the ABA Problem

The chapter explains how to implement pools, a collection of unordered or ordered items. The chapter then explains the ways to implement pools as different types of queues, containers with first-in-first-out behavior. The chapter also explains a classic parallel problem known as ABA, where thread1 observes x == A, thread2 does x=B and then x=A and thread1 then observes x == A. The ABA problem is a subtle, but important problem.

Chapter 11 - Concurrent Stacks and Elimination

This chapter starts where the last chapter left off; it explains how to implement concurrent stacks, containers with first-in-last-out behavior. The chapter also explains a neat cancellation problem called elimination. Elimination is useful for avoiding overflows, underflows and other types of bounded problems.

Chapter 12 - Counting, Sorting and Distributed Coordination

This chapter explains how to take problems that seem to be inherently sequential and make them parallel. The chapter also explains both combining and diffracting trees, both of which are very interesting ways to make sequential problems parallel. This chapter is one of the more complex chapters of the text. Some readers may want to skim it.

----------------------------------------

Unofficially, Chapters 13 - 15 focus on achieving parallelism in algorithms that are inherently parallel. Readers will enjoy seeing how easy it is to extract parallelism in these naturally parallel algorithms.

----------------------------------------

Chapter 13 - Concurrent Hashing and Natural Parallelism

This chapter explains how to build parallel hash tables, with both open and closed addressing. First, the authors explain how to implement hash tables using coarse-grained locks, then with fine-grained locks, then with no locks at all. The chapter also explains how to deal with open-addressed hash tables which are particularly challenging.

Chapter 14 - Skiplists and Balanced Search

Most non-experts that make it this far in the text will be greatly rewarded by this chapter. Chapter 14 explains skiplists, an intriguing way to implement a container that has logarithmic search time and that is inherently parallel. Unlike red-black trees or balanced binary trees that yield logarithmic search time complexity, skiplists do not need to be rebalanced. Skiplists do not need to be rebalanced due to their unique algorithmic layering, making them inherently parallel. As such, skiplists have a notable benefit over their inherently sequential logarithmic search time counterparts.

This is a critically important chapter for practitioners hoping to exploit high parallelism... Read more ›
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
Ad
 
Most Recent Customer Reviews

5.0 out of 5 stars At the Border of Theory and Practice
What this book is not:
- A programmer's cookbook
- A programming manual
- A math text

This is an engineering theory textbook: enough theory to teach... Read more
Published 2 months ago by Reader in Matawan

5.0 out of 5 stars Great class, great book
I took a class with Professor Herlihy at Brown in which he used perhaps an early version of this text. Read more
Published 4 months ago by S. Syberg

1.0 out of 5 stars Not recommended for enterprise architects
If you're working in a large enterprise, the major trends at the moment are SOA and SaaS - and this book does not deal with them in the context of multicore. Read more
Published 8 months ago by PJ Murray

4.0 out of 5 stars Challenging
This book is challenging. Several occasions I flipped between chapters reviewing earlier notational details I thought I understood only to come to the conclusion the book is... Read more
Published 13 months ago by J. johnson

5.0 out of 5 stars Everything I expected it to be, and then some
If you've already gotten your feet wet with multi-threaded programming, but you haven't been able to maximize concurrency yet, this is the book you need. Read more
Published 17 months ago by Nicolas Capens

5.0 out of 5 stars Excellent book
Took the class from Herlihy that goes with this book. He's an extremely intelligent and knowledgeable man, and the book is invaluable. Read more
Published 19 months ago by L. Quirk

5.0 out of 5 stars A great book on concurrent programming!
This is a great, lucid - and PRACTICAL book on concurrent programming in general. It's equally applicable if you're programming for a multi-core CPU ... Read more
Published 20 months ago by paulsm

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Discussion Replies Latest Post
Textbooks for Kindle DX? 61 3 days ago
textbook scam 66 8 days ago
Amazon is a great place to buy textbooks! 35 20 days ago
Search Customer Discussions
Search all Amazon discussions
   



So You'd Like to...


Create a guide

Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.