Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Parallel Programming with Microsoft® Visual Studio® 2010 Step by Step
Foreword
Introduction
Who Should Read This Book
Who Should Not Read This Book
Assumptions
Organization of This Book
Finding Your Best Starting Point in This Book
Conventions and Features in This Book
System Requirements
Code Samples
Installing the Code Samples
How to Access Your Online Edition Hosted by Safari
How to Download the Online Edition to Your Computer
Acknowledgments
Errata and Book Support
We Want to Hear from You
Stay in Touch
1. Introduction to Parallel Programming
Multicore Computing
Multiple Instruction Streams/Multiple Data Streams
Multithreading
Synchronization
Speedup
Amdahl’s Law
Gustafson’s Law
Software Patterns
The Finding Concurrency Pattern
The Task Decomposition Pattern
The Data Decomposition Pattern
The Group Tasks Pattern
The Order Tasks Pattern
The Data Sharing Pattern
The Algorithm Structure Pattern
The Supporting Structures Pattern
Summary
Quick Reference
2. Task Parallelism
Introduction to Parallel Tasks
Threads
The Task Class
Using the Parallel.Invoke Method
Using the TaskFactory.StartNew method
Using the Task.Start Method
Using Function Delegates
Unhandled Exceptions in Tasks
Sort Examples
Bubble Sort
Insertion Sort
Pivot Sort
Using the Barrier Class
Refactoring the Pivot Sort
Cancellation
A Cancellation Example
Task Relationships
Continuation Tasks
Parent and Child Tasks
The Work-Stealing Queue
Summary
Quick Reference
3. Data Parallelism
Unrolling Sequential Loops into Parallel Tasks
Evaluating Performance Considerations
The Parallel For Loop
Interrupting a Loop
Handling Exceptions
Dealing with Dependencies
Reduction
Using the MapReduce Pattern
A Word Count Example
Summary
Quick Reference
4. PLINQ
Introduction to LINQ
PLINQ
PLINQ Operators and Methods
The ForAll Operator
ParallelExecutionMode
WithMergeOptions
AsSequential
AsOrdered
WithDegreeOfParallelism
Handling Exceptions
Cancellation
Reduction
Using MapReduce with PLINQ
Summary
Quick Reference
5. Concurrent Collections
Concepts of Concurrent Collections
Producer-Consumers
Lower-Level Synchronization
SpinLock
SpinWait
Two-Phase Synchronization
ConcurrentStack
ConcurrentQueue
ConcurrentBag
ConcurrentDictionary
BlockingCollection
Summary
Quick Reference
6. Customization
Identifying Opportunities for Customization
Custom Producer-Consumer Collections
Task Partitioners
Advanced Custom Partitioners
Using Partitioner<TSource>
Using OrderablePartitioner<TSource>
Custom Schedulers
The Context Scheduler
The Task Scheduler
Using a Custom Task Scheduler
Creating a Custom Scheduler
Summary
Quick Reference
7. Reports and Debugging
Debugging with Visual Studio 2010
Live Debugging
Performing Post-Mortem Analysis
Debugging Threads
Using the Parallel Tasks Window
Using the Parallel Stacks Window
The Threads View
The Tasks View
Using the Concurrency Visualizer
CPU Utilization View
The Threads View
The Report Section
The Cores View
The Sample Application
Summary
Quick Reference
A. Donis Marshall
Index
About the Author
← Prev
Back
Next →
← Prev
Back
Next →