Kurs: Parallel and Asynchronous Programming in C# 5

Klasserom3 dagerKursNorsk

Dette kurset har ikke oppført noen dato for studiestart. Bruk skjemaet under for å kontakte leverandør for nærmere informasjon.

In recent years, parallel hardware has become the norm. It's not unusual to discover that one's smartphone has a multi-core CPU these days! At the same time, making calls to remote services has become common and users have come to expect highly responsive interfaces - both of which push developers towards asynchronous programming.

Thankfully, the .Net Framework and C# language have been evolving to help us cope with these new realities and expectations. Of course, there have always been threads and locks - but today, we've many, many more options: concurrent collections, parallel looping constructs, PLINQ, Tasks, the new async/await keywords in C# 5, the Reactive Extensions (Rx), the TPL Dataflow library with its Actor-based approach... Each of them are suitable for different problems. So how do you know what to use when, and how to use them effectively?

That's where this course comes in. It won't just teach you how to use all of these exciting new libraries. It will also help you to understand what kind of problem each one is aimed at, so that you can pick the appropriate solution to the challenges you face. It also provides clear explanations of pertinent theory and terminology, including a dive all the way down to the hardware level, so you'll have a strong grasp on what's really going on! Labs will provide an opportunity for you to try things out for yourself.


Day 1

      Classifying Concurrency
      • Parallel vs. asynchronous
      • Task parallel vs. data parallel
      • CPU-bound vs. IO-bound
      • Shared vs. thread-local data
      • Blocking, lock-free, wait-free, and progress bounds
      Understanding The Hardware
      • Why did CPUs go multi-core?How CPU caches work with multi-core, and why it matters
      • Why therad-local storage helps
      • Why immutability helps
      • The problem of false sharing
      Building Blocks
      • Threads
      • How many threads?
      • The thread pool
      • The Task abstraction
      • Monitors, the lock keyword
      • Multiple Reader, Single Writer locks
      • Deadlock
      • Lock granularity
      • The cost of locking
      • Avoiding locking
      Concurrent Collections
      • What are the concurrent collections?
      • Concurrent queues, stacks, bags and dictionaries
      • The blocking collection
      • Queues and Staged Event Driven Architecture
      • Other use cases
      • Performance compared to locking the non-concurrent collections
      The Parallel Class
      • Parallel for
      • Parallel foreach
      • Flow control in parallel loops
      • Keeping thread local state in parallel loops
      • Exceptions and parallel loops
      • Cancellation
      • Parallel invoke



Day 2

      Asynchronous Programming
      • Why threads aren't ideal for blocking operations
      • ContinueWith and CPS (Continuation Passing Style)
      • Why CPS transforms hurt, and how async/await help
      • Exploring the new Async methods in .Net 4.5
      • Task combinators
      More On Asynchrony
      • Understanding synchronization contexts
      • Cancellation
      • Task completion sources
      • Integrating asynchrony and parallelism
      Introducing Rx
      • The Enumerable/Observable duality
      • IObserver and IObservable
      • Producing and consuming simple event streams
      • Subscription and unsubscription
      • Familiar Linq Operators, the Rx way
      • Converting enumerables to observables, and vice versa
      Applying Rx
      • Using Rx with Windows Forms
      • Using Rx with WPF
      • Using Rx with async/await
      • Understanding schedulers
      • Writing tests for Rx code
      • Other useful Rx bits

Day 3

    TPL DataFlow
    • Agents and actors: the ideas behind dataflow parallelism
    • Sources, targets and propagators
    • Transforming
    • Joining
    • Batching
    • Schedulers
    • Implementing custom blocks
    Parallel LINQ
    • A quick LINQ refresher
    • Using PLINQ
    • Understanding how PLINQ parallelizes queries
    • Order (non-)preservation
    • Merge options
    • Cancellation
    • Dealing with exceptions
    • Custom aggregation functions
    Atomic Operations and Lock Free Data Structures
    • The Interlocked class
    • Basic atomic operations
    • Atomic Compare And Swap (CAS)
    • How to make any data structure lock free - at a cost
    • Livelock, and the contrast with wait freedom
    • The A-B problem
    Putting It All Together
    • Mapping problems to suitable concurrent mechanisms
    • Integrating approaches
    • The importance of immutability
    • Trends so far, and how the future may look


This course assumes participants are already comfortable C# developers. The topics and libraries it covers make very frequent use of generics, lambdas and LINQ. Therefore, it is advisable to have a reasonable knowledge of these C# language features before taking the course. On the other hand, prior experience with parallel and asynchronous programming is not required. While it's certainly not a requirement, taking the C# Masterclass does serve as good preparation for this course. Of note, it covers generics, lambdas and LINQ, and provides a high level look at asynchrony and parallelism.


Les mer om kurset her: Parallel and Asynchronous Programming in C# 5

Les mer om Glasspaper as


Parallel and Asynchronous Programming in C# 5 hos Glasspaper
Start her
100% sikkert skjema
Tar ett minutt å fullføre
Hurtig respons

Felt som er merket med * må fylles ut
Ønsket valuta *
Dato og sted *
Hvor mange? (Gavekort)
Kampanjekoden er korrekt og rabatt er lagt til.
Fant ingen kampanje. Skrev du kampanjekoden riktig?
Kampanjekode er korrekt, men kampanjen gir ikke bedre pris enn nåværende kampanje.
Deltaker {{$index+1}}
Filen ble lastet opp
Filen ble fjernet
Laster opp... {{item.upload_progress}}%
{{ file.file.name }} Fjern
{{total_price | fprice}} kr {{currency}}
{{total_price-total_with_discount | fprice}} kr {{currency}}
{{total_with_discount | fprice}} kr {{currency}}
{{total_vat | fprice}} kr {{currency}}

MVA per produkt:

Betalingsmåte *
Number: 1+2 *
Vennligst rett opp følgende og forsøk igjen
Vent til opplasting av fil er ferdig

Dette skjemaet er 100% sikkert.
Glasspaper vil snart kontakte deg og bekrefte!


Åpen deltakerdiskusjon om kurset eller emnet

Del gjerne din erfaring eller tanker om dette kurset eller temaet med andre!

Anbefalinger fra andre brukere