Multi-core and many-core systems In general, a “multi-core” chip refers to eight or less homogeneous cores in one microprocessor package, whereas a “many-core” chip has more than eight possibly heterogeneous cores in one microprocessor package. In a many-core system, all cores share the resources and services, including memory and disk access, provided by the Operating System. Microsoft and industry partners anticipate the advent of affordable general-purpose “many-core” systems in a few years.
Herb Sutter, Microsoft Software Architect and C++ Standards Committee Chairman, made this statement in a recent Dr. Dobb’s Journal article: http://www.ddj.com/architect/208200273)What Herb meant is that developer can no longer count upon processor speed improvements (i.e. Moore’s Law) to effectively speed-up their serial applications. Developers must now deal with Parallel Computing in order to achieve application scaling.This talk is about how Windows Server 2008 R2 and complementary tools within Visual Studio 2010 dramatically improve the situation for developers new to Parallel Computing concepts.
Many-core systems hold the promise of delivering 10 to100 times the processing power in the next few years. Developing applications that harness the full power of many-core systems is difficult and requires software developers to transition from writing serial programs to writing parallel programs. Applications must scale up or down according to the capabilities of the system and must adapt to changing resources and power availability.
Let’s start with the Platform.
A primary platform technology enhancement is Scalability. R2 is the first Windows release to run on more than 64 processors. No previous Windows Operating System could run on greater than 64 processors at once.Here you see a snapshot of Task Manager from a system with 256 processors. This is the biggest system we could find to test with. But, systems of this size are going to be commodity in the near future. R2 is the platform of choice when that hardware trend comes to fruition.What this means for developers is that you’ll have a great Parallel Computing Platform upon which to build new and powerful solutions. Our second session today addresses this topic in much more detail.And yes, you can tell the difference in performance… even on systems with much less resources. R2 is very fast.
The primary motivating factor for general-purpose parallel computing is that commodity computing hardware has changed. Multi-core systems are now available at commodity prices and the trend is that even more ‘many-core‘ systems will be available in the near future.<click>The Operating System is now tasked with much greater system resource management requirements.And Programmers are now tasked with making the most of multi-core Systems.
Windows Server 2008 R2 Dev Session 02
Windows® Server 2008 R2: Develop With New Parallel Computing Technologies<br />Clint Edmonson<br />Architect Evangelist<br />firstname.lastname@example.org<br />
Moore’s LawOur Old Friend Gordon Moore<br />From http://www.intel.com/technology/mooreslaw/<br />“The number of transistors on a chip will double about every 2 years”<br />Typically manifested as clock-speed increases<br />We mistakenly associate Moore’s Law with CPU speed<br />
Why Can’t We Continue to Scale Up?Heat!<br />Increased clock speed == increases power usage<br />Increased power usage == increased heat output<br />Image courtesy of http://www.phys.ncku.edu.tw/~htsu/humor/fry_egg.html<br />
Solution: Scale OutMulti-core / Many-core<br />Multi-core<br />Two or more independent cores (or CPUs)<br />Homogenous architecture<br />May be integrated onto a single integrated circuit die<br />May be integrated onto multiple dies in a single chip package<br />Many-core<br />Number of processors exceeds traditional multi-processor techniques<br />Heterogeneous architecture<br />All cores share resource and services like memory and disk access<br />
How to Program for Parallel ComputingThe “Many-core Shift”<br />Platform must manage resources effectively<br />Programs must be written differently<br />More than just managing threads<br />Applications must scale up or down<br />
Windows Server 2008 R2Platform Hardware Trends<br />Power Efficiency<br />Multicore & NUMA<br />64-bit<br />Virtualization<br />
Helpful Terminology<br />Logical processor (a.k.a. thread execution engine)<br />Core<br />A processing unit<br />With hyper-threading, it can consists of 2 or 4 logical processors <br />Socket(a.k.a. processor, package, CPU)<br />Physical processor<br />Consists of one or more cores<br />NUMA node<br />Set of logical processors and cache that are close to one another<br />Group <br />1 or more NUMA nodes<br />Set of up to 64 processors<br />
Windows Organizes Many-Cores via GroupNew with Windows 7 and Windows Server 2008 R2<br />Group<br />NUMA = Non-Uniform Memory Access<br />LP = Logical Processor<br />NUMA Node<br />Socket<br />Socket<br />Core<br />Core<br />LP<br />LP<br />LP<br />LP<br />Core<br />Core<br />NUMA Node<br />
Demystifying Parallel Programming<br />Parallel Extensions Make It Easy<br />demo<br />
3 Ways to Express Parallelism in Your Apps<br />Imperative Task Parallelism (fine grained)<br />Imperative Data Parallelism (structured)<br />Declarative Data Parallelism (PLINQ)<br />
Imperative Task Parallelism<br />Fine-grained parallelism<br />Express potential parallelism via expressions and statements that take the form of lightweight tasks<br />You have fine-grained control<br />Semantic is similar to how threads and the threadpool work today<br />
Imperative Data Parallelism<br />Structured parallelism<br />Mechanisms used to express common imperative data-oriented operations <br />For loops<br />For each loop<br />Invoke<br />Think in terms of blocks of code<br />Parallelize loops<br />
Declarative Data Parallelism<br />PLINQ<br />Implementation of LINQ-to-objects that execute queries in parallel<br />Express what you want to accomplish, rather than how you want to accomplish it<br />Minimal impact to existing queries<br />
Debugging Parallel ApplicationsNew in Visual Studio®2010<br />Two new debugger tool windows:<br />“Parallel Tasks”<br />“Parallel Stacks”<br />
Demystifying Parallel Programming<br />Debugging A Parallel Application<br />demo<br />
Parallel Performance AnalyzerCore Utilization View<br />Profiling tools support multi-core/parallel execution<br />Identify parallelism opportunities<br />Enable performance tuning for parallel apps<br />Improving the productivity of parallel development and performance tuning<br />Integrated with the IDE<br />Providing better visualizations<br />Showing temporal relationships<br />Illustrating Interactions with OS, libraries and I/O<br />Exposing causes of inefficiency<br />Providing actionable data by linking behavior to source code whenever possible<br />Analysis Views<br />Core utilization and concurrency<br />Thread blocking<br />Cross-core thread migration<br />Platforms<br />Windows Vista ®, Server 2008, and Windows 7<br />32 and 64-bit<br />Native and managed environments<br />Core Utilization / Concurrency<br />View<br />Other processes<br />Number of cores<br />Idle time<br />Your process<br />
Parallel Performance AnalyzerThread Blocking View<br />Measure time for interesting segments<br />Hide uninteresting threads<br />Zoom in and out<br />Detailed thread analysis<br />(one channel per thread)<br />Legend<br />Thread execution <br />breakdown<br />
Parallel Performance AnalyzerCore Execution / Thread Migration View<br />Each core in a swim lane<br />One color per thread<br />This thread migrates across all four cores<br />Red indicates cross-core migrations<br />
SummaryCall-to-Action<br />Start learning to think in parallel<br />Consider how your solution will scale on multi-core systems<br />Utilize the parallel programming platform and tools to maximize your application scalability <br />
Learn More About Windows Server 2008 R2<br />Resources<br /><ul><li>Microsoft.com
http://www.danielmoth.com/Blog/labels/ParallelComputing.html</li></li></ul><li>Visual Studio 2010 with MSDNand The Ultimate Offer<br />Presenter Name Jerry Flynn<br />Presenter Title Developer Solution Specialist<br />Microsoft Corporation<br />presenter Email email@example.com<br />