Parallel Programming and F#

Uploaded on

Best of PDC08, parallel programming and F# introductions

Best of PDC08, parallel programming and F# introductions

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide
  • 06/06/09 06:24 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


  • 1. Lynn Langit – Developer Evangelist Daniel Moth - Parallel Computing Platform Luca Bolognese
  • 2. Threads Operating System Concurrency Runtime Programming Models Task Scheduler Resource Manager Integrated Tooling Programming Models Concurrency Runtime Parallel Pattern Library Resource Manager Task Scheduler Task Parallel Library PLINQ Managed Library Native Library Agents Library ThreadPool Data Structures Data Structures Tools Parallel Debugger Toolwindows Profiler Concurrency Analysis
  • 3.  
  • 4.  
  • 5. Program Thread CLR Thread Pool Global Queue Worker Thread 1 Worker Thread p
  • 6. Program Thread Task 1 Task 2 Task 3 Task 5 Task 4 Task 6 CLR Thread Pool: Work-Stealing Worker Thread 1 Worker Thread p Global Queue Local Queue Local Queue
  • 7.  
  • 8. ThreadPool ThreadPool .QueueUserWorkItem(…); System.Threading.Tasks Task .StartNew(…); Starting var p = Task .StartNew(() => { var t = Task .StartNew(…); }); Parent/Child var f = Future .StartNew(() => C()); … int result = f.Value; Tasks with results Task t = Task .StartNew(…); Task p = t.ContinueWith(…); t.Wait(2000); t.Cancel(); Continue/Wait/Cancel
  • 9.  
  • 10.  
  • 11.  
  • 12.  
  • 13. var q = from p in people          where p.Name == queryInfo.Name && p.State == queryInfo.State && p.Year >= yearStart && p.Year <= yearEnd         orderby p.Year ascending          select p;
  • 14.  
  • 15. Area Descriptions Example Scenarios Imperative Data Parallelism Apply the same operation to common collections/sets in parallel. Looping, data partitioning, reductions, scans, etc. Medical imaging Bond pricing Task Parallelism Simultaneously perform multiple independent operations. Divide-and-conquer, tasks, threads, fork/join, futures, etc. Process control automation Shared Resources
      • Building blocks for implementing concurrent components. Scalable and thread-safe collections, locks, etc.
    Middle-tier configuration/state management Declarative Data Parallelism Define what computation needs to be done, without the how. Selections, filters, joins, aggregations, groupings, etc. Statistical modeling Coordination
      • Exploit latent operations by doing work while waiting for data. Asynch I/O, async interaction points, message passing, etc.
    Streaming audio Task Parallel Library Parallel Pattern Library OpenMP, Cluster SOA Coordination Data Structures Transactional Memory MPI,, CCR Native Agents and Messaging Maestro PLINQ
  • 16.
    Visual Studio 2010 & Framework 4.0
  • 17. all PDC sessions Overview - why and how parallelism PLINQ screencast Other Ch9 PLINQ screencasts PLINQ MSDN article MSDN concurrency VS 2010 on Ch9 VS 2010 week Parallel Computing - Vision Daniel Moth blog
  • 18.
    • Fewer side effects
    • More opportunities for parallelism
    • Used for advanced computation, math, data mining, financial
    • More concise, fewer bugs
  • 19.  
  • 20.
      • Improvements to the F# research release
    April 2008 Microsoft Research refresh release
      • Broadly improved VS 2008 integration
      • Simplifications in language and libraries
    Just Released September 2008 CTP
      • Full product-quality release
      • Fully stable and supported language
      • Aligned with future VS releases
    2009 Supported Release
  • 21. F# tutorials F# MSDN Developer Center F# for Windows Azure F# Samples Expert F# book and code samples
  • 22.
    • On the Web:
    • Books:
  • 23. Thanks vets!