1 / 19

The Free Lunch is Over

The Free Lunch is Over. Getting good at Parallel with .NET 4.0. jtwist@microsoft.com. www.thejoyofcode.com. @ joshtwist. But first…. You could have been at the PDC!. An apology …. The Free Lunch is Over.

urban
Download Presentation

The Free Lunch is Over

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Free Lunch is Over Getting good at Parallel with .NET 4.0 jtwist@microsoft.com www.thejoyofcode.com @joshtwist

  2. But first… You could have been at the PDC! • An apology…

  3. The Free Lunch is Over …the big theme of the 2004 In-Stat/MDR Fall Processor Forum was multicore devices, as many companies showed new or updated multicore processors. Looking back, it’s not much of a stretch to call 2004 the year of multicore. http://www.gotw.ca/publications/concurrency-ddj.htm Published in March 2005

  4. 10,000,000 1,000,000 100,000 10,000 1,000 Clock Speed (MHz) Transistors (000s) 100 Moore’s Law 10 1 0 1990 2010 2000 1995 2005 1975 1980 1985 1970

  5. The free lunch ended in 2005; why am I still eating? Web Servers Many concurrent requests Batch Processing Virtualisation Desktops Low Hanging Fruit Many Processes To Run

  6. But soon… PFX team in Redmond – 128 cores! Our labs – 24 cores New desktops – 8 cores Me – 2 cores 

  7. The Free Lunch is Over Concurrency is the next major revolution in how we write software… … The vast majority of programmers today don’t grok concurrency, just as the vast majority of programmers 15 years ago didn’t yet grok objects http://www.gotw.ca/publications/concurrency-ddj.htm

  8. Why? Tools for concurrency before .Net 4 APM (Asynchronous Programming Model) EAP (Event-based Asynchronous Programming) new Thread() ThreadPool & QueueUserWorkItem Sync Primitives: ResetEvents, Semaphores, WaitHandles, Monitors, Slims etc. ThreadStatic & CallContext

  9. Two challenges Logically rethink the processing in your application to support concurrency – tough! Rewrite the application using these basic primitives – tough!

  10. In .Net 4 • Parallel Extensions • Tasks • Parallel • PLINQ • ThreadLocal / Lazy • Visual Studio 2010 Concurrency Debugging Support

  11. Two primary types Task Parallelism Data Parallelism

  12. Task Parallelism New Credit Application Store Request Validate Address Get Credit References Get Internal Credit Data Decide!

  13. Task Parallelism DEMONSTRATION

  14. Two primary types Data Parallelism

  15. Data Parallelism DEMONSTRATION

  16. Some things not covered BlockingCollections and Pipelines FromSynchronizationContext Visual Studio Debugging Tools and much more…

  17. Q&A 1. Your questions? 2. My go! 

  18. My questions • Who uses WF (Workflow)? • Version 4? • Those who don’t – why not? • Those who do… • What are your impressions? • Any feedback?

  19. Thank you! Want help from people like me? Ask about PSfD. Questions also accepted by Twitter. Follow me or else. jtwist@microsoft.com www.thejoyofcode.com @joshtwist

More Related