SlideShare una empresa de Scribd logo
1 de 30
Dave Probert, Ph.D. -  Windows Kernel Architect Microsoft Windows Division Copyright Microsoft Corporation
About Me ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
UNIX vs NT Design Environments Copyright Microsoft Corporation Environment which influenced  fundamental design decisions   UNIX  [1969] Windows (NT)  [1989] 16-bit program address space Kbytes of physical memory Swapping system with memory mapping Kbytes of disk, fixed disks Uniprocessor State-machine based I/O devices Standalone interactive systems  Small number of friendly users  32-bit program address space Mbytes of physical memory Virtual memory Mbytes of disk, removable disks Multiprocessor (4-way) Micro-controller based I/O devices Client/Server distributed computing  Large, diverse user populations
Effect on OS Design Copyright Microsoft Corporation NT vs UNIX Although both Windows and Linux have adapted to changes in the environment, the original design environments (i.e. in 1989 and 1969) heavily influenced the design choices: Unit of concurrency: Process creation: I/O: Namespace root: Security: Threads vs processes CreateProcess() vs fork() Async vs sync Virtual vs Filesystem ACLs vs uid/gid Addr space, uniproc Addr space, swapping Swapping, I/O devices Removable storage User populations
Today’s Environment  [2009] Copyright Microsoft Corporation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Convergence:  Smartphone / Netbook / Laptop / Desktop / TV / Web / Cloud
Windows Architecture hardware interfaces (buses, I/O devices, interrupts,  interval timers, DMA, memory cache control, etc., etc.) System Service Dispatcher Object Mgr. Windows USER, GDI File  System  Cache I/O Mgr Environment  Subsystems System Processes Services Applications System Threads NTDLL.DLL Device & File Sys. Drivers Session  Manager POSIX Windows DLLs Plug and Play Mgr. Power Mgr. Security Reference Monitor Virtual Memory Processes & Threads Local Procedure Call Graphics Drivers Kernel Hardware Abstraction Layer (HAL) (kernel mode callable interfaces) Configura- tion Mgr (registry) OS/2 Windows Copyright Microsoft Corporation Task Manager Explorer SvcHost.Exe WinMgt.Exe SpoolSv.Exe Service Control Mgr. LSASS User Application Subsystem DLLs User Mode Kernel Mode WinLogon Services.Exe
Kernel-mode Architecture of Windows Copyright Microsoft Corporation NT API stubs (wrap sysenter)  --  system library (ntdll.dll) user mode kernel mode NTOS executive layer Trap/Exception/Interrupt Dispatch CPU mgmt:  scheduling, synchr, ISRs/DPCs/APCs Drivers Devices, Filters, Volumes, Networking, Graphics Hardware Abstraction Layer (HAL):  BIOS/chipset details firmware/ hardware CPU, MMU, APIC, BIOS/ACPI, memory, devices NTOS kernel layer Caching Mgr Security Procs/Threads Virtual Memory IPC glue I/O Object Mgr Registry Copyright Microsoft Corporation
Kernel/Executive layers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
NT (Native) API examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
Windows Vista Kernel Changes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
Windows 7 Kernel Changes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
MinWin ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MinWin Layering Shell, Graphics, Multimedia, Layered Services, Applets,  Etc. Kernel,  HAL, TCP/IP, File Systems, Drivers, Core System Services MinWin
Timer Coalescing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],MarkRuss
Broke apart the Dispatcher Lock ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
Removed PFN Lock ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
The Silicon Power Wall ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Approaches to HW parallelism ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
User Mode Scheduling (UMS)  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
Windows 7 User-Mode Scheduling ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
Normal NT Threading kernel user KT 0 KT 1 KT 2 UT 2 UT 1 UT 0 Kernel-mode Scheduler NTOS executive trap code ,[object Object],[object Object],[object Object],[object Object],x86 core Copyright Microsoft Corporation
User-Mode Scheduling (UMS) kernel user Thread Parking KT 0 KT 1 KT 2 UT Completion list Primary Thread UT 0 UT 1 UT 0 User-mode Scheduler trap code NTOS executive KT 0  blocks Only primary thread runs in user-mode Trap code switches to parked KT KT blocks    primary returns to user-mode KT unblocks & parks    queue UT completion Copyright Microsoft Corporation
UMS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
UMS Thread Roles ,[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
Thread Scheduling vs UMS Core 2 Core 1 Core 2 Core 1 MarkRuss Thread 3 Non-running threads Thread 4 Thread 5 Thread 1 Thread 2 Thread 6 User Thread 2 Kernel Thread 2 User Thread 1 Kernel Thread 1 User Thread 3 Kernel Thread 3 User Thread 4 Kernel Thread 4 User Thread 5 Kernel Thread 5 User Thread 6 Kernel Thread 6
Win32 compat considerations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
Futures: Master/Slave UMS? remote kernel Remote x86 Thread Parking KT 0 KT 1 KT 2 UT 2 UT 1 Remote Scheduler trap code NTOS executive Kernel-mode Scheduler Syscall Completion Queue Syscall Request Queue UT 0 x86 core UTs (can) run on accelerators or x86s KTs run on x86s, syscalls remoted/batched Pagefaults are just like syscalls Accelerator never “loses the CPU” (implicit primary) Copyright Microsoft Corporation
Operating Systems Futures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
Windows Academic Program ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Copyright Microsoft Corporation
muchas gracias

Más contenido relacionado

La actualidad más candente

SCSI Protocol
SCSI ProtocolSCSI Protocol
SCSI Protocol
Rakesh T
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharing
myrajendra
 
Operating system notes
Operating system notesOperating system notes
Operating system notes
SANTOSH RATH
 
Fonctionnement d’un système d’exploitation
Fonctionnement d’un système d’exploitationFonctionnement d’un système d’exploitation
Fonctionnement d’un système d’exploitation
Imane Bellali
 

La actualidad más candente (20)

Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
Bios
BiosBios
Bios
 
SCSI Protocol
SCSI ProtocolSCSI Protocol
SCSI Protocol
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Virtual Machines - Virtual Box
Virtual Machines  - Virtual BoxVirtual Machines  - Virtual Box
Virtual Machines - Virtual Box
 
An AI accelerator ASIC architecture
An AI accelerator ASIC architectureAn AI accelerator ASIC architecture
An AI accelerator ASIC architecture
 
Uefi and bios
Uefi and biosUefi and bios
Uefi and bios
 
BIOS PRESENTATION
BIOS PRESENTATIONBIOS PRESENTATION
BIOS PRESENTATION
 
Motherboard
MotherboardMotherboard
Motherboard
 
Bios vs uefi
Bios vs uefiBios vs uefi
Bios vs uefi
 
BOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTBOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPT
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharing
 
BIOS AND OS
BIOS AND OSBIOS AND OS
BIOS AND OS
 
Operating system notes
Operating system notesOperating system notes
Operating system notes
 
Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commands
 
Linux Usb overview
Linux Usb  overviewLinux Usb  overview
Linux Usb overview
 
Fonctionnement d’un système d’exploitation
Fonctionnement d’un système d’exploitationFonctionnement d’un système d’exploitation
Fonctionnement d’un système d’exploitation
 
[오픈소스컨설팅]Session Clustering
[오픈소스컨설팅]Session Clustering[오픈소스컨설팅]Session Clustering
[오픈소스컨설팅]Session Clustering
 
Detailed iSCSI presentation
Detailed iSCSI presentationDetailed iSCSI presentation
Detailed iSCSI presentation
 

Destacado

Presentación power point sistemas operativos
Presentación power point sistemas operativosPresentación power point sistemas operativos
Presentación power point sistemas operativos
spursua
 
40 Tools in 20 Minutes: Hacking your Marketing Career
40 Tools in 20 Minutes: Hacking your Marketing Career40 Tools in 20 Minutes: Hacking your Marketing Career
40 Tools in 20 Minutes: Hacking your Marketing Career
Eric Leist
 

Destacado (20)

Windows Architecture
Windows ArchitectureWindows Architecture
Windows Architecture
 
Window architecture
Window architecture Window architecture
Window architecture
 
Historia so
Historia soHistoria so
Historia so
 
Windows OS Architecture in Summery
Windows OS Architecture in SummeryWindows OS Architecture in Summery
Windows OS Architecture in Summery
 
Prueba dos versiones de Firefox al mismo tiempo
Prueba dos versiones de Firefox al mismo tiempoPrueba dos versiones de Firefox al mismo tiempo
Prueba dos versiones de Firefox al mismo tiempo
 
Windows kernel
Windows kernelWindows kernel
Windows kernel
 
Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)
 
Arquitectura de los sistemas operativos
Arquitectura de los sistemas operativosArquitectura de los sistemas operativos
Arquitectura de los sistemas operativos
 
Presentacion sistemas operativos diapositivas
Presentacion sistemas operativos diapositivasPresentacion sistemas operativos diapositivas
Presentacion sistemas operativos diapositivas
 
No BS, Vendor Neutral Comparison of Application Layering Solutions
No BS, Vendor Neutral Comparison of Application Layering SolutionsNo BS, Vendor Neutral Comparison of Application Layering Solutions
No BS, Vendor Neutral Comparison of Application Layering Solutions
 
Kernel mode vs user mode in linux
Kernel mode vs user mode in linuxKernel mode vs user mode in linux
Kernel mode vs user mode in linux
 
Presentación power point sistemas operativos
Presentación power point sistemas operativosPresentación power point sistemas operativos
Presentación power point sistemas operativos
 
Sistemas operativos presentacion diapositivas
Sistemas operativos presentacion diapositivasSistemas operativos presentacion diapositivas
Sistemas operativos presentacion diapositivas
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
20 Tweetable Quotes to Inspire Marketing & Design Creative Genius
20 Tweetable Quotes to Inspire Marketing & Design Creative Genius20 Tweetable Quotes to Inspire Marketing & Design Creative Genius
20 Tweetable Quotes to Inspire Marketing & Design Creative Genius
 
40 Tools in 20 Minutes: Hacking your Marketing Career
40 Tools in 20 Minutes: Hacking your Marketing Career40 Tools in 20 Minutes: Hacking your Marketing Career
40 Tools in 20 Minutes: Hacking your Marketing Career
 
2015 Travel Trends
2015 Travel Trends 2015 Travel Trends
2015 Travel Trends
 
How to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfs
How to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfsHow to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfs
How to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfs
 
Build a Better Entrepreneur Pitch Deck
Build a Better Entrepreneur Pitch DeckBuild a Better Entrepreneur Pitch Deck
Build a Better Entrepreneur Pitch Deck
 
What REALLY Differentiates The Best Content Marketers From The Rest
What REALLY Differentiates The Best Content Marketers From The RestWhat REALLY Differentiates The Best Content Marketers From The Rest
What REALLY Differentiates The Best Content Marketers From The Rest
 

Similar a Evolution of the Windows Kernel Architecture, by Dave Probert

Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
Pradeep Kumar TS
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
Pradeep Kumar TS
 
CSE 370 - Introduction to Operating Systems
CSE 370 - Introduction to Operating SystemsCSE 370 - Introduction to Operating Systems
CSE 370 - Introduction to Operating Systems
Dev Khare
 
Embedded System
Embedded SystemEmbedded System
Embedded System
surendar
 
Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2
mona_hakmy
 
Operating System 4
Operating System 4Operating System 4
Operating System 4
tech2click
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)
Sri Prasanna
 

Similar a Evolution of the Windows Kernel Architecture, by Dave Probert (20)

2337610
23376102337610
2337610
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
 
Principles of operating system
Principles of operating systemPrinciples of operating system
Principles of operating system
 
CSE 370 - Introduction to Operating Systems
CSE 370 - Introduction to Operating SystemsCSE 370 - Introduction to Operating Systems
CSE 370 - Introduction to Operating Systems
 
Embedded System
Embedded SystemEmbedded System
Embedded System
 
Visual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & VirtualisationVisual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & Virtualisation
 
Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2
 
Operating System 4
Operating System 4Operating System 4
Operating System 4
 
Distributed Computing
Distributed ComputingDistributed Computing
Distributed Computing
 
Walking around linux kernel
Walking around linux kernelWalking around linux kernel
Walking around linux kernel
 
01.osdoc
01.osdoc01.osdoc
01.osdoc
 
intro.ppt
intro.pptintro.ppt
intro.ppt
 
Embedded Intro India05
Embedded Intro India05Embedded Intro India05
Embedded Intro India05
 
Sioux Hot-or-Not: The future of Linux (Alan Cox)
Sioux Hot-or-Not: The future of Linux (Alan Cox)Sioux Hot-or-Not: The future of Linux (Alan Cox)
Sioux Hot-or-Not: The future of Linux (Alan Cox)
 
.ppt
.ppt.ppt
.ppt
 
intro.ppt
intro.pptintro.ppt
intro.ppt
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & Containers
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)
 
Operating system
Operating systemOperating system
Operating system
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Evolution of the Windows Kernel Architecture, by Dave Probert

  • 1. Dave Probert, Ph.D. - Windows Kernel Architect Microsoft Windows Division Copyright Microsoft Corporation
  • 2.
  • 3. UNIX vs NT Design Environments Copyright Microsoft Corporation Environment which influenced fundamental design decisions UNIX [1969] Windows (NT) [1989] 16-bit program address space Kbytes of physical memory Swapping system with memory mapping Kbytes of disk, fixed disks Uniprocessor State-machine based I/O devices Standalone interactive systems Small number of friendly users 32-bit program address space Mbytes of physical memory Virtual memory Mbytes of disk, removable disks Multiprocessor (4-way) Micro-controller based I/O devices Client/Server distributed computing Large, diverse user populations
  • 4. Effect on OS Design Copyright Microsoft Corporation NT vs UNIX Although both Windows and Linux have adapted to changes in the environment, the original design environments (i.e. in 1989 and 1969) heavily influenced the design choices: Unit of concurrency: Process creation: I/O: Namespace root: Security: Threads vs processes CreateProcess() vs fork() Async vs sync Virtual vs Filesystem ACLs vs uid/gid Addr space, uniproc Addr space, swapping Swapping, I/O devices Removable storage User populations
  • 5.
  • 6. Windows Architecture hardware interfaces (buses, I/O devices, interrupts, interval timers, DMA, memory cache control, etc., etc.) System Service Dispatcher Object Mgr. Windows USER, GDI File System Cache I/O Mgr Environment Subsystems System Processes Services Applications System Threads NTDLL.DLL Device & File Sys. Drivers Session Manager POSIX Windows DLLs Plug and Play Mgr. Power Mgr. Security Reference Monitor Virtual Memory Processes & Threads Local Procedure Call Graphics Drivers Kernel Hardware Abstraction Layer (HAL) (kernel mode callable interfaces) Configura- tion Mgr (registry) OS/2 Windows Copyright Microsoft Corporation Task Manager Explorer SvcHost.Exe WinMgt.Exe SpoolSv.Exe Service Control Mgr. LSASS User Application Subsystem DLLs User Mode Kernel Mode WinLogon Services.Exe
  • 7. Kernel-mode Architecture of Windows Copyright Microsoft Corporation NT API stubs (wrap sysenter) -- system library (ntdll.dll) user mode kernel mode NTOS executive layer Trap/Exception/Interrupt Dispatch CPU mgmt: scheduling, synchr, ISRs/DPCs/APCs Drivers Devices, Filters, Volumes, Networking, Graphics Hardware Abstraction Layer (HAL): BIOS/chipset details firmware/ hardware CPU, MMU, APIC, BIOS/ACPI, memory, devices NTOS kernel layer Caching Mgr Security Procs/Threads Virtual Memory IPC glue I/O Object Mgr Registry Copyright Microsoft Corporation
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. MinWin Layering Shell, Graphics, Multimedia, Layered Services, Applets, Etc. Kernel, HAL, TCP/IP, File Systems, Drivers, Core System Services MinWin
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. User-Mode Scheduling (UMS) kernel user Thread Parking KT 0 KT 1 KT 2 UT Completion list Primary Thread UT 0 UT 1 UT 0 User-mode Scheduler trap code NTOS executive KT 0 blocks Only primary thread runs in user-mode Trap code switches to parked KT KT blocks  primary returns to user-mode KT unblocks & parks  queue UT completion Copyright Microsoft Corporation
  • 23.
  • 24.
  • 25. Thread Scheduling vs UMS Core 2 Core 1 Core 2 Core 1 MarkRuss Thread 3 Non-running threads Thread 4 Thread 5 Thread 1 Thread 2 Thread 6 User Thread 2 Kernel Thread 2 User Thread 1 Kernel Thread 1 User Thread 3 Kernel Thread 3 User Thread 4 Kernel Thread 4 User Thread 5 Kernel Thread 5 User Thread 6 Kernel Thread 6
  • 26.
  • 27. Futures: Master/Slave UMS? remote kernel Remote x86 Thread Parking KT 0 KT 1 KT 2 UT 2 UT 1 Remote Scheduler trap code NTOS executive Kernel-mode Scheduler Syscall Completion Queue Syscall Request Queue UT 0 x86 core UTs (can) run on accelerators or x86s KTs run on x86s, syscalls remoted/batched Pagefaults are just like syscalls Accelerator never “loses the CPU” (implicit primary) Copyright Microsoft Corporation
  • 28.
  • 29.