Pedro Miguel Teixeira Senior Software Developer Microsoft Corporation

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Windows 7 Training. Windows ® 7 Compatibility Session 0 Isolation Isolation of Windows 7 Services.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
demo Default WANGPSLookup Default WANGPS.
 Nishant Gupta Program Manager Live Services Microsoft Corporation BB51.
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training. Windows ® 7 Compatibility Installer Detection.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Multitenant Model Request/Response General Model.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Announcing Demo Announcing.
Feature: OLE Notes Migration Utility
Feature: SmartList Usability Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
WinHEC /22/2017 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
 Chaitanya Sareen Senior Program Manager Microsoft Corporation PC24.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Connect with life Connect with life
NEXT: Overview – Sharing skills & code.
demo Receive Inventory Export Parse and Normalize.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
 Paul Vick Principal Architect Microsoft Corporation  Lucian Wischik Software Engineer Microsoft Corporation.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

MIX 09 4/17/2018 4:41 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
DoRon Motter Development Lead Microsoft Corporation
Возможности Excel 2010, о которых следует знать
Title of Presentation 11/22/2018 3:34 PM
Baseline: How Are We Doing Now?
Title of Presentation 12/2/2018 3:48 PM
F# for Parallel and Asynchronous Programming
28 days.
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Windows 8 Security Internals
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
SharePoint 2013 Authentication with Azure – Part 2
Title of Presentation 5/24/2019 1:26 PM
5/24/2019 6:44 PM 1/8/18 Bell #10 In a world governed by the gods, is there any room for human will? Do human choices make a difference? EXPLAIN © 2007.
Why is it important to follow an order of operations?
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
Coming Together in the Cloud
Building Data-Driven Applications Using "Quadrant" and "M"
WCL425 App Compat for Nerds Chris Jackson.
Presentation transcript:

Pedro Miguel Teixeira Senior Software Developer Microsoft Corporation 1/15/2019 6:44 AM SVR18 Developing Applications for Scale-Up Servers Running Windows Server 2008 R2 Pedro Miguel Teixeira Senior Software Developer Microsoft Corporation © 2007 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.

Agenda Developing Applications for Scale-Up 1/15/2019 6:44 AM Agenda Developing Applications for Scale-Up Processes and Threads in systems with more than 64 Logical Processors* Processor Groups and CPU distribution Processes and Threads System Topology New and revised APIs User Mode Scheduling Writing a User-Mode Scheduler User Mode Scheduler API © 2007 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.

Processor Groups for Scale Up 1/15/2019 6:44 AM Processor Groups for Scale Up Segmented specification – “groups” of CPUs Windows 7/R2 Supports more than 64 Logical Processors CPUs identified in software by Group#: CPU# Allows backward compatibility with 64-bit affinity New applications have full CPU range using new APIs © 2007 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.

Processor Group Assignment Maximum 64 LPs per Group Minimum possible that fits all LPs Currently a Maximum of 4 LPs distributed by proximity: All LPs (e.g., hyper-threads) in a Core; All Cores in a Socket; Closer Sockets*; NUMA Nodes**; Closer NUMA Nodes;

Processor Groups Example: 4 LPs/core, 4 cores/socket, 2 sockets/node, 4 nodes: 128 LPs Group NUMA Node Socket Core LP Group NUMA Node Socket Core LP

Processes and Threads Each Thread can only be in one Group Threads can be assigned to Groups: CreateRemoteThreadEx SetThreadGroupAffinity Processes are assigned to Groups in Round Robin* By default: Threads inherit the Group from the Parent Thread First thread inherits the Group from its Process

System Topology Processor topology exposed Memory topology exposed Groups  NUMA nodes  Sockets  Cores  Logical Processors (e.g., hyper-threads) Includes details of CPU caches (L0/L1/L2) Memory topology exposed Device location exposed (e.g., network and storage controllers)

New APIs GetActiveProcessorCount GetActiveProcessorGroupCount GetMaximumProcessorCount GetMaximumProcessorGroupCount GetProcessGroupAffinity GetProcessorSystemCycleTime GetThreadGroupAffinity SetThreadGroupAffinity GetNumaNodeNumberFromHandle

Revised APIs CreateRemoteThreadEx GetCurrentProcessorNumberEx GetLogicalProcessorInformationEx GetNumaAvailableMemoryNodeEx GetNumaProcessorNodeEx GetNumaProximityNodeEx GetNumaNodeProcessorMaskEx GetThreadIdealProcessorEx SetThreadIdealProcessorEx QueryIdleProcessorCycleTimeEx

User Mode Scheduling (UMS) Provide a comprehensive infrastructure for Applications to implement their own thread scheduling Support both Kernel and User synchronization events* Maximize CPU time spend executing application’s work Complete Win32 compatibility* UMS solves thread state problem by separating user-mode thread and kernel-mode thread

Cooperative Scheduling Avoiding lock contention gives the best scaling Cooperative scheduling in user-mode avoids contention and context switches Non-running threads User Thread 3 User Thread 4 User Thread 5 User Thread 6 Core 1 Core 1 Core 2 Core 2 User Thread 1 Thread 1 User Thread 2 Thread 2 Thread 3 Thread 4 Thread 5 Thread 6 Kernel Thread 1 Kernel Thread 2 Kernel Thread 3 Kernel Thread 4 Kernel Thread 5 Kernel Thread 6 Thread Scheduling

User Mode Scheduling Reason: Yield Reason: Yield Reason: Blocked Scheduler’s Ready List Wait Reason: Yield Reason: Yield Reason: Blocked Reason: Created Core 1 Core 2 UMS completion list W1 W2 W3 W4 S1 S2 User Kernel Scheduler Threads Blocked Worker Threads

UMS API CreateUmsCompletionList DeleteUmsCompletionList GetUmsCompletionListEvent DequeueUmsCompletionListItems GetNextUmsListItem CreateUmsThreadContext DeleteUmsThreadContext EnterUmsSchedulingMode ExecuteUmsThread UmsThreadYield GetCurrentUmsThread QueryUmsThreadInformation SetUmsThreadInformation

Scheduler writing No locks should be shared between Scheduler Threads and Worker Threads Adds complexity to writing user-mode synchronization objects/primitives Includes not only application locks but also OS implicit (and maybe internal) locks, reducing the operations that can be performed within the scheduler* Schedulers may need to create auxiliary worker threads for housekeeping tasks

YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com

channel9.msdn.com/learn 1/15/2019 6:44 AM Learn More On Channel 9 Expand your PDC experience through Channel 9 Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses channel9.msdn.com/learn Built by Developers for Developers…. © 2007 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.

1/15/2019 6:44 AM © 2009 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.

1/15/2019 6:44 AM © 2009 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.