Cargando…

The art of concurrency /

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-...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Breshears, Clay
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Beijing ; Cambridge : O'Reilly, ©2009.
Edición:1st ed.
Colección:Theory in practice
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • Table of Contents; 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 1. Want to Go Faster? Raise Your Hands if You Want to Go Faster!; Some Questions You May Have; What Is a Thread Monkey?; Parallelism and Concurrency: What's the Difference?; Why Do I Need to Know This? What's in It for Me?; Isn't Concurrent Programming Hard?; Aren't Threads Dangerous?; Four Steps of a Threading Methodology
  • Step 1. Analysis: Identify Possible ConcurrencyStep 2. Design and Implementation: Threading the Algorithm; Step 3. Test for Correctness: Detecting and Fixing Threading Errors; Step 4. Tune for Performance: Removing Performance Bottlenecks; The testing and tuning cycle; What About Concurrency from Scratch?; Background of Parallel Algorithms; Theoretical Models; Distributed-Memory Programming; Parallel Algorithms Literature; Shared-Memory Programming Versus Distributed-Memory Programming; Common Features; Redundant work; Dividing work; Sharing data; Static/dynamic allocation of work
  • Features Unique to Shared MemoryLocal declarations and thread-local storage; Memory effects; Communication in memory; Mutual exclusion; Producer/consumer; Readers/writer locks; This Book's Approach to Concurrent Programming; Chapter 2. Concurrent or Not Concurrent?; Design Models for Concurrent Algorithms; Task Decomposition; What are the tasks and how are they defined?; What are the dependencies between tasks and how can they be satisfied?; How are the tasks assigned to threads?; Example: numerical integration; Data Decomposition; How should you divide the data into chunks?
  • How can you ensure that the tasks for each chunk have access to all data required for updates?How are the data chunks (and tasks) assigned to threads?; Example: Game of Life on a finite grid; Concurrent Design Models Wrap-Up; What's Not Parallel; Algorithms with State; Recurrences; Induction Variables; Reduction; Loop-Carried Dependence; Not-so-typical loop-carried dependence; Chapter 3. Proving Correctness and Measuring Performance; Verification of Parallel Algorithms; Example: The Critical Section Problem; First Attempt; Second Attempt; Third Attempt; Fourth Attempt; Dekker's Algorithm
  • Case 1Case 2a: T0 is the favored thread; Case 2b: T1 is the favored thread; Case 3; What about indefinite postponement?; What Did You Learn?; There Are No Evil Threads, Just Threads Programmed for Evil; Performance Metrics (How Am I Doing?); Speedup; Amdahl's Law; Gustafson-Barsis's Law; Efficiency; One Final Note on Speedup and Efficiency; 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