Visual Studio 2010 Beta 2
About Me
• Microsoft MVP• Intel Blogger• TechEd Israel, TechEd Europe• Expert C++ Book
• http://AsyncOp.com• http://Asaf.Shelly.co.il
Task Parallel Library - TPL
• .Net Framework 3.5• See TechEd 2008• VS2010 with .Net 4.0• Language Extensions• Lambda Expressions• C#, VB, F#, C++
From for to Parallel.For
for (int i=0; i<100; i++){ int x = i + i;}
Parallel.For(0, 100, i =>{ int x = i + i;});
C++ parallel_for
parallel_for(0, 100, [&] i{ int x = i + i;});
Visual Studio 2010
• Multi-Core Programming• Tasks• Agents• Parallel Loops• Parallel Algorithms• Parallel Replacement for STL• Seamless Task Usage
Task Oriented Design
Modify
Write
Open
Modify
Scan ScanScanScan ScanScan
PLINQ – Parallel LINQ
VS2010 DemoC# Parallel.For
Keep an eye for…
• Shared are Globals• Parallel Loops are not loops• Define data as Loop internal• Race Conditions are still here• Locks!!• I/O – Disk, Network, etc.
VS2010 DemoC++ Parallel_For
VS2010 DemoUnderstanding Lambda and parallel_for
Visual Studio Parallel Debugger
• Parallel Task List• Parallel Task Stack• Built-in Profiler
Parallel Pattern Library
Resource Manager
Task Scheduler
Task Parallel Library
PLINQ
Managed Library Native LibraryKey:
ThreadsOperating System
Concurrency Runtime
Programming Models
AgentsLibrary
ThreadPool
Task Scheduler
Resource Manager
Data Structures
Dat
a St
ruct
ures
Integrated Tooling
Tools
ParallelDebugger
Toolwindows
Profiler Concurrency
Analysis
Programming Models
Concurrency Runtime
Advanced Parallel In VS2010
• Agents – Resource Owners• Task Groups• Task Cancellation• Task Cleanup (CancelIo)
VS2010 DemoNew F# Application
Hints for the future
• http://msdn.microsoft.com/en-us/devlabs/dd795202.aspx
• AXUM – Language for parallel computing• STM.Net - Software Transactional Memory for
concurrent memory separation• Spec Explorer – Graphical analysis of software
behavior• … and more
A bit nostalgia
• TechEd 2008 Israel
Do we really want Parallel Code?Do users even care?
2005 2007 2008 2010
Change In MindsetEverything is stopped. Waiting for the photographer
Everyone is working independently
Change In MindsetDevelopers are writing functions
Developers are managing tasks
Change In MindsetDoing things the way we always have
Things are going to be different
Thank You
Top Related