Download presentation
Presentation is loading. Please wait.
Published byJose Harnett Modified over 9 years ago
1
Niklas Gustafsson Software Architect Microsoft Corporation TL22
7
Parallel Pattern library Resource manager Task scheduler Task Parallel library Task Parallel library PLINQ Managed library Native library Key: Threads Operating system Concurrency runtime Programming models Agents library Agents library Thread pool Task scheduler Resource manager Data structures Tools Parallel Debugger Toolwindows Parallel Debugger Toolwindows Profiler concurrency analysis Profiler concurrency analysis
8
Parallel Pattern library Resource manager Task scheduler Task Parallel library Task Parallel library PLINQ Managed library Native library Key: Threads Operating system Concurrency runtime Programming models Agents library Agents library Thread pool Task scheduler Resource manager Data structures Tools Parallel Debugger Toolwindows Parallel Debugger Toolwindows Profiler concurrency analysis Profiler concurrency analysis
10
Resource manager Task scheduler Threads Operating system Concurrency runtime Programming models Intel Parallel Studio tools OpenMP Threading building blocks Parallel Pattern library Parallel Pattern library Agents library … …
13
Processor 0 Resource manager Scheduler A Scheduler B Processor 1
16
ThreadPool Queue Worker thread 1 Worker thread p Program thread Item 1 Item 2 Item 3 Item 4 Item 5 Item 6
17
Work-stealing scheduler Global queue Global queue Local queue Local queue Local queue Local queue Worker thread 1 Worker thread p Program thread Task 1 Task 2 Task 3 Task 5 Task 4 Task 6
18
Context Pool of free contexts Schedule group List of schedule groups Context Virtual processor
19
Context Unblocked contexts Chore Per-context work-stealing queues Chore LWT FIFO tasks LWT
20
HRESULT Dispatch(IThreadProxy *pProxy) { bool stop = false; while( !stop ) { for each (group in groups) { bool foundSomething = false; do { while (Task *tsk = group->GetUnblockedWork() != NULL) { tsk->Run(); foundSomething = true; } while (Task *tsk = group->GetNewWork()) { tsk->Run(); foundSomething = true; } while (Chore *chre = group->Steal() != NULL) { chre->Run(); foundSomething = true; } } while (foundSomething); } stop = WaitForMoreWork(); }
22
Resource manager Native task scheduler Native task scheduler Parallel Pattern library Asynchronous agents
26
Resource manager Native task scheduler Native task scheduler Parallel Pattern library Asynchronous agents
28
SchedulerResource manager IResourceManager::RequestInitialThreads IScheduler::GetPolicyValues IVirtualProcessor::Activate IExecutionContext::Dispatch CreateResourceManager
33
MSDN.com/concurrency And download Parallel extensions to the.NET framework!
34
Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
36
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.