tim - fsharp

Post on 10-May-2015

823 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Timothy Ng

F# Lead

Microsoft Corporation

Parallel Pattern Library

Resource Manager

Task Scheduler

Task Parallel Library

Parallel LINQ

Threads

Operating System

Native Concurrency Runtime

Managed Libraries

ThreadPool

Da

ta S

tructu

res D

ata

Str

uct

ure

s

Tools

AsyncAgentsLibrary

UMS Threads

MicrosoftResearch

Visual Studio 2010

ParallelDebugger Windows

Profiler Concurrency

Analysis

Race Detection

Fuzzing

AxumVisual F#

Managed Languages

Rx

Native Libraries

Managed Concurrency Runtime

DryadLINQ

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

HPC ServerOperating System

Shared State

Code Locality

I/O Parallelism

Scaling to Multi-Machine

Shared State

Code Locality

I/O Parallelism

Scaling to Multi-Machine

oDifficult to maintain and testoVery difficult to parallelize!o Locking is fundamentally error prone:

oMust guess where parallelism will be neededoAll consumers need to participate

Immutable Lists

Immutable Records

Immutable Sets

Immutable Objects

Immutable Tuples

Immutable Dictionaries

Immutable Unions

Lots of language features to encourage immutability

Shared StateCode Locality

I/O Parallelism

Scaling to Multi-Machine

oWe’re used to expressing algorithms linearlyoAsync requires logical division of algorithmsoVery difficult to

oCombine multiple asynchronous operationsoDeal with exceptions and cancellation

Shared StateCode Locality

I/O Parallelism

Scaling to Multi-Machine

o Software is often I/O-bound o Leveraging web servicesoWorking with data on disk

oNetwork and disk speeds increasing slowero I/O resources are inherently parallel

oHuge opportunity for performance

Shared StateCode Locality

I/O Parallelism

Scaling to Multi-Machine

oTo scale up, must to go beyond a single machineoMulti-machine resources becoming common

o Roll-you-own clusters with cheap hardwareoOn-demand cloud compute with Azure

o Buto Shared memory doesn’t scale

Shared State

Code Locality

I/O Parallelism

Scaling to Multi-Machine

immutability

async { … }

async { … }

agents

Simple, powerful, and productive

Ready for production use with VS2010

F# + .NET 4.0 radically simplify parallelism

Parallelism and asynchrony – for today

and tomorrow

F#

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.

top related