The Art of Concurrency - A Thread Monkey's Guide to Writing Parallel Applications
Verlag | O'Reilly Media |
Auflage | 2009 |
Seiten | 285 |
Format | 23,5 cm |
Gewicht | 554 g |
Artikeltyp | Englisches Buch |
ISBN-10 | 0596521537 |
EAN | 9780596521530 |
Bestell-Nr | 59652153EA |
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 makebest 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.
Inhaltsverzeichnis:
Inhaltsverzeichnis
Preface
Why Should You Read This Book?
Who Is This Book For?
What s in This Book?
Conventions Used in This Book
Using Code Examples
Comments and Questions
Safari® Books Online
Acknowledgments
Chapter 1Want 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 2Concurrent or Not Concurrent?
Design Models for Concurrent Algorithms
What s Not Parallel
Chapter 3Proving 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 4Eight 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
Summary
Chapter 5Threading Libraries
Implicit Threading
Explicit Threading
What Else Is Out There?
Domain-Specific Libraries
Chapter 6Parallel Sum and Prefix Scan
Parallel Sum
Prefix Scan
Selection
A Final Thought
Chapter 7MapReduce
Map As a Concurrent Operation
Reduce As a Concurrent Operation
Applying MapReduce
MapReduce As Generic Concurrency
Chapter 8Sorting
Bubblesort
Odd-Even Transposition Sort
Shellsort
Quicksort
Radix Sort
Chapter 9Searching
Unsorted Sequence Binary Search
Chapter 10Graph Algorithms
Depth-First Search
All-Pairs Shortest Path
Minimum Spanning Tree
Chapter 11Threading Tools
Debuggers
Performance Tools
Anything Else Out There?
Go Forth and Conquer
Glossary
Photo Credits
Colophon