M2G Posted May 31, 2012 Report Share Posted May 31, 2012 (edited) Authored by: Dr. Joe Hummel Duration: 3h 44mLevel: IntermediateReleased: 5/29/2012Discusses the design of asynchronous and parallel applications using the new Task-based model available in .NET 4 and Silverlight 5.Contents: Understanding the Dangers of Concurrency 01:22:56Introductions and Agenda The pitfalls of concurrency Correctness guarantees: safety, liveness Terminology: race conditions, critical sections Race conditions involving shared resources Demo 1: parallelizing a Logfile Search app Demo 1: source code layout Demo 1: from sequential to parallelDemo 1: summary of why it's broken Solving race conditions --- an overview Solution 1: locking Demo 2: solution using locking Solution 2: interlocking Demo 3: solution using interlocking Solution 3: lock-free Demo 4: lock-free solution The danger of shared objects Thread-safety and solutions to shared objects Demo 5: using thread-safe objects Synchronization primitives The concurrent data structures: thread-safe collections Performance lessons... Demo 6: improving performance Summary and References Execution Model and Types of Parallelism 01:04:06 Introductions and Agenda Tasks: developer's role vs. .NEt's role Execution model: high-level view Task granularity: just how lightweight? Execution model: tasks vs. threads vs. cores Custom task scheduling Additional observations regarding task scheduler Work-stealing in detail Two important assumptions: short-lived, random order Fairness option to execute tasks in order LongRunning option for tasks > 1-2 seconds Demo 1: executing 100 long-running tasks Demo 1: solution attempt with default behavior Demo 1: solution attempt with long-running option Solution for 100 long-running tasks Demo 2: proper solution in action Parallel.For = more concise solution Types of Parallelism Data parallelism Task parallelism Dataflow parallelism Embarrassingly parallel TPL support for parallelism types Parallel.For, .Foreach, .Invoke Structured (fork-join) parallelism Demo 3: Mandelbrot app overview Demo 3: sequential version Demo 3: Parallel.For version Data partitioning Custom data partitioning Exception handling with Parallel class Breaking out of a Parallel loop Cancelling a Parallel loop Demo 4: Mandelbrot app with cancellation Summary and References Designs and Patterns for Parallel Programming 01:17:20Introductions and Agenda Design Problem 1: 100+ CPU-intensive operations Design Problem 2: download 20+ web pages Design Problem 3: application logging task Parallel Patterns --- master list Pipeline pattern Dataflow pattern Increasing parallelism in pipeline and dataflow Concurrent Data Structures --- master list ConcurrentQueue T Demo 1: overview of Netflix data mining app Demo 1: overview of parallel solution (v1) Demo 1: implementation with ConcurrentDictionary T Demo 1: results Producer-Consumer pattern Implementation of Producer-Consumer with BlockingCollection T Demo 2: Netflix solution using Producer-Consumer (v2) Demo 2: results MapReduce pattern Implementing MapReduce Demo 3: Netflix using MapReduce Demo 3: results Parallel LINQ (PLINQ) Demo 4: Netflix with PLINQ Speculative Execution pattern APM: Asynchronous Programming Model pattern APM example of async file I/O Demo 5: Stock History with Speculative Execution and APM Parallel I/O design challenge Summary and ReferencesDownload: http://ge.tt/6LO6rTI/v/0(Asteptati pana il termin de urcat, probleme cu site-ul de filesharing)Cele de aici: Async and Parallel Programming: Application Design - Online Training Course for .NET Developers Edited May 31, 2012 by M2G Quote Link to comment Share on other sites More sharing options...
phreak Posted May 31, 2012 Report Share Posted May 31, 2012 The pitfalls of concurrency : loss of sanity. Quote Link to comment Share on other sites More sharing options...