Timothy Ng
F# Lead
Microsoft Corporation
Tools            Managed Languages

 Visual Studio        Visual F#          Axum
     2010

    Parallel
                  Managed Libraries                                                                                  Native Libraries
   Debugger
   Windows
                        DryadLINQ                                                                 Parallel                  Async
     Profiler
                                                                                                  Pattern                   Agents
   Concurrency        Parallel LINQ             Rx




                                                           Data Structures



                                                                             Data Structures
     Analysis                                                                                     Library                   Library

   Microsoft
                         Task Parallel Library
                                                                                                       Native Concurrency Runtime
   Research
    Race                                                                                                  Task Scheduler
  Detection       Managed Concurrency Runtime
   Fuzzing                      ThreadPool                                                              Resource Manager


                                                                                                                             Operating
    HPC Server                           Threads                                                  UMS Threads                System



Operating Key:   Research / Incubation   Visual Studio 2010 / .NET 4                           Windows 7 / Server 2008 R2
System
Shared State

Code Locality

I/O Parallelism

Scaling to Multi-Machine
Shared State
 o Difficult to maintain and test
 o Very difficult to parallelize!
 o Locking is fundamentally error prone:
    o Must guess where parallelism will be needed
    o All consumers need to participate


Code Locality
I/O Parallelism
Scaling to Multi-Machine
   Immutable Lists        Immutable Tuples

   Immutable Records      Immutable Dictionaries

   Immutable Sets         Immutable Unions

   Immutable Objects      Lots of language features
                            to encourage immutability
Shared State
Code Locality
 o We’re used to expressing algorithms linearly
 o Async requires logical division of algorithms
 o Very difficult to
    o Combine multiple asynchronous operations
    o Deal with exceptions and cancellation


I/O Parallelism
Scaling to Multi-Machine
Shared State
Code Locality
I/O Parallelism
 o Software is often I/O-bound
    o Leveraging web services
    o Working with data on disk
 o Network and disk speeds increasing slower
 o I/O resources are inherently parallel
    o Huge opportunity for performance

Scaling to Multi-Machine
Shared State
Code Locality
I/O Parallelism
Scaling to Multi-Machine
 o To scale up, must to go beyond a single machine
 o Multi-machine resources becoming common
    o Roll-you-own clusters with cheap hardware
    o On-demand cloud compute with Azure
 o But
    o Shared memory doesn’t scale
Shared State               immutability

Code Locality              async { … }

I/O Parallelism            async { … }

Scaling to Multi-Machine   agents
Simple, powerful,            Ready for production
   and productive                use with VS2010


                          F#
                                  Parallelism and
F# + .NET 4.0 radically
                               asynchrony – for today
 simplify parallelism
                                   and tomorrow
http://fsharp.net
© 2007 Microsoft Corporation. All rights reserved.
  This presentation is for informational purposes only.
  MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.

Tim - FSharp

  • 1.
  • 3.
    Tools Managed Languages Visual Studio Visual F# Axum 2010 Parallel Managed Libraries Native Libraries Debugger Windows DryadLINQ Parallel Async Profiler Pattern Agents Concurrency Parallel LINQ Rx Data Structures Data Structures Analysis Library Library Microsoft Task Parallel Library Native Concurrency Runtime Research Race Task Scheduler Detection Managed Concurrency Runtime Fuzzing ThreadPool Resource Manager Operating HPC Server Threads UMS Threads System Operating Key: Research / Incubation Visual Studio 2010 / .NET 4 Windows 7 / Server 2008 R2 System
  • 4.
    Shared State Code Locality I/OParallelism Scaling to Multi-Machine
  • 5.
    Shared State oDifficult to maintain and test o Very difficult to parallelize! o Locking is fundamentally error prone: o Must guess where parallelism will be needed o All consumers need to participate Code Locality I/O Parallelism Scaling to Multi-Machine
  • 7.
    Immutable Lists  Immutable Tuples  Immutable Records  Immutable Dictionaries  Immutable Sets  Immutable Unions  Immutable Objects  Lots of language features to encourage immutability
  • 8.
    Shared State Code Locality o We’re used to expressing algorithms linearly o Async requires logical division of algorithms o Very difficult to o Combine multiple asynchronous operations o Deal with exceptions and cancellation I/O Parallelism Scaling to Multi-Machine
  • 10.
    Shared State Code Locality I/OParallelism o Software is often I/O-bound o Leveraging web services o Working with data on disk o Network and disk speeds increasing slower o I/O resources are inherently parallel o Huge opportunity for performance Scaling to Multi-Machine
  • 12.
    Shared State Code Locality I/OParallelism Scaling to Multi-Machine o To scale up, must to go beyond a single machine o Multi-machine resources becoming common o Roll-you-own clusters with cheap hardware o On-demand cloud compute with Azure o But o Shared memory doesn’t scale
  • 13.
    Shared State immutability Code Locality async { … } I/O Parallelism async { … } Scaling to Multi-Machine agents
  • 14.
    Simple, powerful, Ready for production and productive use with VS2010 F# Parallelism and F# + .NET 4.0 radically asynchrony – for today simplify parallelism and tomorrow
  • 15.
  • 16.
    © 2007 MicrosoftCorporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.