Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Parallel programming: how new language features help


Published on

In these presentation I talk about Parallel Programming, its necessities, challenges.
Then I talk about how the syntax of languages like C# advances to improve the expressiveness of parallel programming.

Published in: Technology
  • Be the first to like this

Parallel programming: how new language features help

  1. 1. Mehran Davoudi Head of Development Department, Carane Resource Planning Systems Parallel Programming Towards Efficient Cloud Computing
  2. 2. Presentation Overview ? • Why to move towards parallel programming? • What’s the most concerns successful applications to implement parallel? • How to handle challenges using new coming technologies
  3. 3. The Moore’s Law  The number of transistors on integrated circuits doubles approximately every two years. 2x every 2 year!
  4. 4. Cloud Hardware Infrastructure Are they really used? Or just one part is doing the job!?
  5. 5. Why is it so hard? Debugging Error Management Cancellation Continuation Shared Memory
  6. 6. Shared Memory The most famous problem in parallel computing Makes everything very complicated Heard about them at the university Very important but not the topic of this presentation
  7. 7. Debugging Single Current Statement Multiple Current Statements
  8. 8. Error Management 100 threads are working In the middle, 3 of them fail What to do now!? Continue? Throw Exception? What about remained threads?
  9. 9. Cancellation 100 threads are working 30 done, 20 doing, 50 waiting User cancels! What to do now!? Finish doings? Cut the doings? Don’t allow to cancel!?
  10. 10. How the technology helps to manage Async/Await Immutable collections Lambdas Tasks Aggregated Exceptions Threads Isolated Types
  11. 11. Task instead of Thread A better abstraction • Task hides most of unnecessary complicated details of threads Managed by .NET • Thread pooling, resource management and many others are controlled by the framework A well shaped API • It has a Fluent API • Well integrated with Lambdas
  12. 12. TPL, PLINQ TPL (Task Parallel Library) Cancellation Continuation Error Management Cancellation Token Next line is not the next! Aggregate Exception PLINQ High level parallelizing tools Based on the famous LINQ Parallel.For() Enumerable .AsParallel()
  13. 13. Async/Await: A real magic! TPL Native Threads
  14. 14. Debugging Tools Parallel Stack Parallel Watch
  15. 15. A totally different thinking style A totally different terminology for developers Next statement ≠ Next Line It takes about 6 months to teach and prepare a professional development team
  16. 16. Resources  Andres Heijlsberg conference on BUILD  Patterns of Parallel Programming, Stephen Toub, 2010  Erik Meyer and Joe Duffy talk on Chanel 9  Eric Lippert weblog on Parallel Programming  Joseph Albahari weblog on Parallel Programming  Wikipedia page of Moore’s Law
  17. 17. Thanks QUESTIONS!?  Also you can contact me at:  Mail:  LinkedIn:  Facebook: