Mark Russinovich Technical Fellow Windows Platform and Services Microsoft Corporation Content of this talk was co-developed with Dave Solomon (www.solsem.com)

Slides:



Advertisements
Similar presentations
Microsoft Windows NT Embedded 4.0
Advertisements

Powerful and convenient management for Windows Mobile ® 6.1 devices in an enterprise environment. These features include: Centralized, over-the-air device.
The System Center Family Microsoft. Mobile Device Manager 2008.
SSRS 2008 Architecture Improvements Scale-out SSRS 2008 Report Engine Scalability Improvements.
Securing. Agenda  Hard Drive Encryption  User Account Permissions  Root Level Access  Firewall Protection  Malware Protection.
MCTS GUIDE TO MICROSOFT WINDOWS 7 Chapter 10 Performance Tuning.
Configuring Windows Vista Security Chapter 3. IE7 Pop-up Blocker Pop-up Blocker prevents annoying and sometimes unsafe pop-ups from web sites Can block.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 10: Collect and Analyze Performance Data.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Ruston Panabaker Architect Windows Hardware Innovation Group
MDOP 2010: Diagnostic and Recovery Toolset (DaRT) Speaker Fabrizio Grossi
Operating Systems.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
Windows 7 Windows Server 2008 R2 VirtualizationVirtualization Heterogeneous Server Environment Inventory Linux, Unix & VMware Windows 7 & Server 2008.
Maintaining Windows Server 2008 File Services
Understanding Active Directory
SP2 Mikael Nystrom. Agenda Översikt Installation.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 14: Problem Recovery.
Microsoft Desktop Virtualization Migrating to Windows 7 With MED-V.
Purpose Intended Audience and Presenter Contents Proposed Presentation Length Intended audience is all distributor partners and VARs Content may be customized.
Slide 1 Windows PC Accelerators Reporter :吳柏良. Slide 2 Outline l Introduction l Windows SuperFetch l Windows ReadyBoost l Windows ReadyDrive l Conclusion.
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
Hands-On Microsoft Windows Server 2008
WINDOWS XP PROFESSIONAL Bilal Munir Mughal Chapter-1 1.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 11 Case Study 2: Windows Vista Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
WLC402 Windows Vista: Kernel Changes Mark Russinovich Technical Fellow, Platform and Services Division Microsoft Corporation
MCTS Guide to Microsoft Windows 7
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 2: Managing Hardware Devices.
CN1176 Computer Support Kemtis Kunanuraksapong MSIS with Distinction MCT, MCTS, MCDST, MCP, A+
Week #7 Objectives: Secure Windows 7 Desktop
Chapter Fourteen Windows XP Professional Fault Tolerance.
Purpose Intended Audience and Presenter Contents Proposed Presentation Length Intended audience is all distributor partners and VARs Content may be customized.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
University of Management & Technology 1 Operating Systems & Utility Programs.
Ch 6. Performance Rating Windows 7 adjusts itself to match the ability of the hardware –Aero Theme v. Windows Basic –Gaming features –TV recording –Video.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Troubleshooting Windows Vista Security Chapter 4.
Section 1: Introducing Group Policy What Is Group Policy? Group Policy Scenarios New Group Policy Features Introduced with Windows Server 2008 and Windows.
Module 7: Fundamentals of Administering Windows Server 2008.
Mark Aslett Microsoft Introduction to Application Compatibility.
Session objectives Discuss whether or not virtualization makes sense for Exchange 2013 Describe supportability of virtualization features Explain sizing.
Week #3 Objectives Partition Disks in Windows® 7 Manage Disk Volumes Maintain Disks in Windows 7 Install and Configure Device Drivers.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
Connect with life Vinod Kumar Technology Evangelist - Microsoft
CSC190 Introduction to Computing Operating Systems and Utility Programs.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Chapter 6A Operating System Basics PART I.
Service Pack 2 System Center Configuration Manager 2007.
4.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 12: Implementing Security.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
Praveen Srivatsa Director| AstrhaSoft Consulting blogs.asthrasoft.com/praveens |
© ExplorNet’s Centers for Quality Teaching and Learning 1 Explain the importance of security and encryption. Objective Course Weight 2%
Windows Vista Configuration MCTS : Maintenance and Optimization.
Module 3: Operating-System Structures
Maintaining Windows Server 2008 File Services
5/28/2018 9:16 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or.
Chapter 2: System Structures
A Fast Track into Device Guard
Operating System Structure
TechEd /9/ :26 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
I/O Manager, 64-bit Porting, and New Driver Models
Device Guard: AppLocker on steroids
11/11/2018 Desktop Virtualization Corey Hynes Kyle Rosenthal President Technical Lead HynesITe Inc Spider Consulting @windowspcguy.
Windows xp professional
Chapter 3: Operating-System Structures
TechEd /2/2018 5:42 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Presentation transcript:

Mark Russinovich Technical Fellow Windows Platform and Services Microsoft Corporation Content of this talk was co-developed with Dave Solomon (

Introduction Processes and Threads I/O and File System Memory Management Startup and Shutdown Reliability and Recovery Security

This talk covers enhancements to the Windows Vista kernel and related core components Many other significant improvements in other kernel areas not covered (e.g. Networking, Graphics, Window Manager, Installation, Management, and Monitoring) Many of the Windows Server codenamed “Longhorn” enhancements I covered this morning were introduced in Windows Vista I/O Completion port performance improvements Cycle-time scheduler 32-bit Dynamic Address Space Clean service shutdown Kernel Transaction Manager Process error handling ASLR Service security improvements

Introduction Processes and Threads I/O and File System Memory Management Startup and Shutdown Reliability and Recovery Security

New service that boosts thread priorities of multimedia applications to support glitch-free audio and video streaming Implemented in Mmcss.dll (runs in a Svchost) Used by Windows Media Player 11 Threads declare themselves as multimedia Type of activity (AvSetMmThreadCharacteristics) Relative importance (AvSetMmThreadPriority) Threads boosted into real-time for 80% of a task’s clock rate If they consume that time, they are lowered so others can run 80% can be reconfigured at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile Realtime boost Other work Realtime boost Other work

Introduction Processes and Threads I/O and File System Memory Management Startup and Shutdown Reliability and Recovery Security

Before, opens could not be cancelled Example: You browse to an off-line network share in a File Save dialog and hang for the duration of the network timeout In Windows Vista, opens and other synchronous I/O can be cancelled CancelSynchronousIo cancels a pending synchronous I/O issued by another thread CancelIoEx permits canceling all or individual I/Os from any thread (CancelIo could only cancel all I/Os issued by the calling thread) Windows Vista common control file open/save dialogs all implement cancellation Threads processing I/O can now be notified of process termination

Background I/O (e.g. AV scans, disk defragmenting) interferes with foreground interactive tasks (e.g. reading ) Before, only way to prioritize work was based on thread CPU priority Windows Vista introduces two types of I/O prioritization I/O priority I/O bandwidth reservation I/O prioritization implemented by ATAPI and USB storage drivers

I/O priority is based on the priority of the issuing thread or the explicitly set I/O priority Five levels: Critical, High, Normal, Low, Very Low High not implemented Critical only for use by memory manager Stored in Flags field of I/O Request Packet (IRP) At least one Low or Very Low I/O is processed every second Processes and threads can lower their I/O priority with SetPriorityClass, SetThreadPriority “Background mode” Used by Windows Vista background tasks like indexing and Windows Defender scans

Streaming applications (e.g. Windows Media Player - WMP) can request I/O bandwidth guarantees Specified on individual files I/O system reports back to application Optimal transfer size Number of outstanding I/Os they should maintain WMP Walk-in I/O Reserved I/O WMPWMPWMP

Introduction Processes and Threads I/O and File System Memory Management Startup and Shutdown Reliability and Recovery Security

Before Memory was not proactively populated Memory often did not contain optimal content Windows XP improved population with the logical prefetcher, but only prefetched a single process at process startup

In Windows Vista, SuperFetch prefetches across a set of applications Takes into account frequency of page usage, usage of page in context of other pages in memory Adapts to memory usage patterns, including complex usage scenarios (e.g. the “after lunch” usage) Scenarios SuperFetch improves include Application launch Resume from hibernate and suspend Performance after infrequent or low priority tasks execute

SuperFetch includes kernel and user- mode components Page usage data collected in kernel mode SuperFetch service (Sysmain.dll) implements storage and prefetch algorithms Stores scenario files in \Windows\Prefetch\Ag*.db Calls kernel to retrieve paging histories and pre- populate page lists Also prefetches private virtual memory (Windows XP prefetcher only did file and image data) Uses low-priority I/O for pre-fetching and pre- population Uses memory priorities (0-7) to prioritize prefetched data

RAM is ideal for caching, but it's expensive and difficult to add External flash is cheaper and is up to 10x faster to random access (not as fast as a disk for sequential I/O) ReadyBoost uses flash to create a write-through cache between disk and RAM Supported devices include USB keys, SD cards, Compact Flash, and internal PCI express cards Data is compressed (typical 2x compression ratio) File is encrypted with random per-boot session key Implemented by ReadyBoost service and Ecache.sys volume filter driver You can look at device statistics under HKLM\Software\Microsoft\Windows NT\CurrentVersion\EmdMgmt

On systems with more than 700 MB boot prefetch is done by ReadyBoot instead of Windows XP-style prefetch ReadyBoot is implemented by the same driver and services as ReadyBoost Service analyzes last 5 boots and derives boot plan that it stores in HKLM\System\CurrentControlSet\Services\Ecache\ Parameters At boot, the driver implements RAM cache Cache is populated as the system boots by ReadyBoost service Cache does not update to reflect disk writes Cache is torn down 90 seconds after boot Performs optimized just-in-time prefetch Typically 20% improvement over Windows XP-style boot prefetch

Hybrid Hard Drive (H-HHD) include a nonvolatile cache (NV Cache) Cached data can be read and written when disk is spun down Data remains in cache even when disk is powered down Cache is 50 MB – 2 TB (typically 256 MB) Host OS support required to use Cache may contain SuperFetch data, boot data, (part of) hibernate file OEM can pin data On battery, used as a write cache NV Cache OS

Introduction Processes and Threads I/O and File System Memory Management Startup and Shutdown Reliability and Recovery Security

Windows boot manager \Bootmgr (no extension) Launched by boot sector code Replaces first half of NTLDR (reading Boot.ini) Launches other Windows pre-boot applications Supports UEFI on Windows Server Longhorn OS loader \Systemroot\System32\Winload.exe Replaces 2nd half of NTLDR (loading OS image, boot drivers, and System registry hive) One per OS installation

Windows memory diagnostic \Boot\Memtest.exe Third-parties can add boot executables Winboot can run other executables Resume loader \Systemroot\System32\Winresume.exe Used to be implemented in Ntldr

Session Manager (SMSS) created Winlogon and Csrss for each session Session creation was done serially Was bottleneck for Terminal Services Winlogon, the interactive logon manager, created Local Security Authority (Lsass.exe) Service Control Manager (Services.exe)

In Windows Vista Initial Smss.exe creates an instance of itself to initialize each session Permits parallel session creation Minimum parallel session startups is 4 Maximum is number of processors Session 0 Smss runs Wininit.exe (new) Wininit starts what Winlogon used to start: Services, Lsass Also starts a new process, Local Session Manager (Lsm.exe) Session 1-n Smss’s create initialize interactive sessions Session-specific instance of Csrss.exe and Winlogon.exe

Before, the console user ran in session 0 Names created by console user could collide with service and system object names Services that presented windows on the console could open the door for privilege elevation (“shatter” attacks) Session 1 Application D Application E Application F Session 0 Service A Service B Service C Application B Application A Application C

In Windows Vista, the console user starts in session 1 and cannot connect to session 0 Eliminates name collisions Poorly written services can’t display windows to the user Session 1 Application A Application B Application C Session 0 Service A Service B Service C Session 2 Application D Application E Application F

Credential Providers replace GINAs Plug into Logonui.exe Easier to write than GINAs Multiple concurrent providers are supported User selected or event driven Used to capture elevation credentials Inbox Credential providers PasswordSmartcard WinLogon LogonUI Credential Provider 1 Credential Provider 2 Credential Provider 3

Before, autostart services could severely impact login performance In Windows Vista, services can request delayed autostart Set by new ChangeServiceConfig2 API Stores new DelayedAutoStart value in service Registry key Service Control Manager (SCM) starts these services after the automatic start services I/O priority set to Very Low during startup Services configured this way include BITS, Windows Update client, Ehome…

Before, application or driver could block standby or hibernate Often caused by bug or overly aggressive power policy User might not know and system power drain causes data loss Windows Vista does not query processes when entering sleep states User-mode notification (PBT_APMSUSPEND) timeout reduced from 20 seconds to 2 seconds Drivers can’t veto sleep transitions

Introduction Processes and Threads I/O and File System Memory Management Startup and Shutdown Reliability and Recovery Security

Before No way to undo file overwrites or accidental deletes System Restore only protected against changes to system files that it knew about Windows Vista uses Volume Shadow Copy for System Restore and Previous Versions Creates point-in-time copy-on-write snapshots of live volumes Introduced in Windows XP to solve open file and consistent backup problems Used by Windows Backup Previous Versions tab introduced as Server 2003 Shadow Copies for Shared Folder feature Unified data/system protection Used by System Restore

Introduction Processes and Threads I/O and File System Memory Management Startup and Shutdown Reliability and Recovery Security

Before, physical access to a system could compromise even domain accounts 3rd-party utilities allow access to all unencrypted data Domain credential verifiers cached in Registry In Windows Vista, entire OS volume can be encrypted with BitLocker BitLocker requirements Trusted Platform Module (TPM) v1.2 or USB device and USB-capable BIOS 1.5 GB unencrypted system volume

Several supported modes for storing decryption key TPM locked with signature of boot files And optionally user-specified PIN And optionally key on USB On external USB flash device Components Tpm.sys for accessing TPM Fvevol.sys filter driver transparently encrypts/decrypts File System Driver Fvevol.sys Volume Manager Application User Mode Kernel Mode

The OS loader and kernel performs code signature checks On 64-bit x64 platforms All kernel mode code must be signed in order to load Identity of all kernel mode binaries is verified System audit events for integrity check failures On 32-bit platforms Load-time checks done on all kernel mode binaries, unsigned code allowed to load But to play protected hi-def content, all loaded kernel mode drivers must be signed Event log logging of driver loads

Protected Processes prevent unauthorized access to media content Can only be created through new Protected Media Path APIs (part of Media Foundation) Used to enforce a secure path to output devices Only signed images can be mapped into a secure process Images must be signed by Microsoft 3rd Party codecs loaded into a Protected Process must be signed with Windows Media DRM certificate Can query integrity of kernel-mode Standard processes have limited access to protected processes (even with SeDebugPrivilege)

Goal Have users run as standard user Problem Users run as administrators Some applications only run as administrator Solution Make previously admin operations non-admin e.g. setting the time zone Badly-behaved non-admin apps get private virtualized views of portions of the file system and Registry Administrators run as normal users Convenient to access administrative rights

Images that don’t opt out (in their manifest) are virtualized Virtualization implemented in the kernel File system: File system filter driver (luafv.sys) Registry: Built-in Redirected file system locations \Program Files, \Windows, \Windows\System32 Exceptions System Write Protected Exe’s and DLLs Files that have executable extensions (.exe,.bat,.vbs,.scr, etc) Redirected Registry locations HKLM\Software Exceptions: Many subkeys under Microsoft

Writes: Redirect to per-user area \Users\ \AppData\Local\ Virtual Store HKCU\Software\Classes\VirtualStore Reads: unless an exception applies per- user area is attempted first and then global location

An executable can be marked for elevation in four ways In its manifest file In the system’s application compatibility data-base Heuristic installer detection User explicitly asks for elevation

Two types of elevation Admin Approval Mode: Continue/cancel At logon LSASS creates admin and Limited User Account (LUA) version of admin token Winlogon creates first process (e.g. Userinit) with LUA token Over the Shoulder: prompt for admin credentials User is running in a standard user account Consent.exe presents consent/password dialog on secure desktop Child of AppInfo service (in a Service Host)

Specified as new Mandatory Integrity Level (IL) SIDs in process token Low: Protected-mode IE Medium: LUA processes High: Elevated processes System: System processes

Object ILs stored as IL ACE in SACL Processes, threads and tokens always have an IL ACE Files and Registry keys without an IL ACE have an implicit level of Medium Objects created by medium or higher processes are marked as medium IL Objects created by low IL processes (e.g. Protected-mode IE) are marked as low IL

IL checked before DACL A thread can only open an object for write access if its IL is equal to or higher than that of the object A thread can open any object for read access if It’s a non-process object If a process, thread IL must be equal or higher than process IL (prevents sensitive information leakage via memory reads) The Windows subsystem also honors integrity levels: User Interface Privilege Isolation (UIPI) Only query messages can be sent to the windows of elevated processes from UAC processes Prevents “shatter” attacks

Changes that I didn’t have time to cover New synchronization primitives Initialize-once Shared reader/writer locks New thread pooling infrastructure Service thread tagging Support for large-sector disks On-line NTFS chkdsk and NTFS volume resizing New kernel Advanced Local Procedure Call IPC mechanism

Lots of exciting changes in Windows Vista kernel in the areas of performance, scalability, reliability, and security

Web Resources Kernel Enhancements for Windows Vista and Windows Server codenamed “Longhorn” Windows Vista developer resources on MSDN Windows Hardware Developer Central WinHEC 2006 presentations Related Sessions SVR-T331: Windows Memory Management Advances SVR-T332: NUMA I/O Optimizations Questions and Comments

© 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.