`
`
`
`Petitioner Microsoft Corporation, Ex. 1008, Cover
`
`
`
`Ille inside story Ilellinll llle Ilesinn, nllilnsnnlw,
`
`architecture, and Iulnne oi Mien-usnlI's
`
`nexl uenel-alien operating system
`
`Petitioner Microsoft Corporation, Ex. 1008, Cover
`
`
`
`oSs
`
`INS
`
`NT
`
`Petitioner Microsoft Corporation, Ex. 1008, Title
`
`
`
`ls
`
`IT
`
`MIcUSOtt
`
`it
`
`HELEN CUSTER
`
`FOREWORD BY DAVID
`
`CUTLER
`
`Petitioner Microsoft Corporation, Ex. 1008, Title
`
`
`
`PUBLISHED BY
`Microsoft Press
`Division of Microsoft Corporation
`One Microsoft Way
`Redmond Washington 98052-6399
`
`1993 by Microsoft Press
`Copyright
`All rights reserved No part of the contents of this book may be reproduced or
`transmitted in any form or by any means without the written permission of the publisher
`
`Library of Congress Cataloging-in-Publication Data
`Custer Helen 1961
`Inside windows NT
`cm
`Includes bibliographical references and index
`ISBN 1-55615-481-X
`
`Helen Custer
`
`Operating systems Computers
`1992
`QA76.76.063C89
`005.4469-- dc2O
`
`Windows NT
`
`Printed and bound in the United States of America
`AGAG 8765
`
`Title
`
`92-26231
`CIP
`
`Distributed to the book trade in Canada by Macmillan of Canada
`of Canada Publishing Corporation
`
`division
`
`Distributed to the book trade outside the United States and Canada by
`Penguin Books Ltd
`
`Penguin Books Ltd Harmondsworth Middlesex England
`Penguin Books Australia Ltd Ringwood Victoria Australia
`Penguin Books N.Z Ltd 182190 Wairau Road Auckland 10 New Zealand
`
`British Cataloging-in-Publication Data available
`3Com is
`registered trademark of 3Com Corporation Apple and Macintosh are
`registered trademarks of Apple Computer Inc Banyan and VINES are registered trade
`marks of Banyan Systems Inc DEC PDP-II VAX and VMS are registered trademarks
`and DECnet and MicroVAX are trademarks of Digital Equipment Corporation Intel is
`registered trademark and 1nte1386 and Intel486 are trademarks of Intel Corporation
`Microsoft MS-DOS and XENIX are registered trademarks and Windows and Windows
`NT are trademarks of Microsoft Corporation OS/2 is
`registered trademark licensed
`to Microsoft Corporation NetWare and Novell are registered trademarks of Novell Inc
`Sun Sun Microsystems and Sun Workstation are registered trademarks of Sun Microsystems
`Incorporated UNIX is
`registered trademark of UNIX Systems Laboratories
`
`Acquisitions Editor Dean Holmes
`Manuscript Editor Nancy Siadek
`Project Editors Nancy Siadek and Deborah Long
`Technical Editor Jeff Carey
`
`Petitioner Microsoft Corporation, Ex. 1008, Copyright
`
`
`
`This book is dedicated to the members of the Windows NT team
`
`many of whom have made considerable personal sacrifices
`
`to design and construct
`
`this operating system
`
`Long may she run
`
`Petitioner Microsoft Corporation, Ex. 1008, Dedication
`
`
`
`Contents Summary
`
`Foreword
`
`Preface
`
`CHAPTER ONE
`THE MISSION
`
`CHAPTER TWO
`SYSTEM OVERVIEW
`
`CHAPTER THREE
`THE OBJECT MANAGER AND OBJECT SECURITY...
`
`CHAPTER FOUR
`PROCESSES AND THREADS
`
`CHAPTER FIVE
`WINDOWS AND THE PROTECTED SUBSYSTEMS
`
`CHAPTER SIX
`THE VIRTUAL MEMORY MANAGER
`
`CHAPTER SEVEN
`THE KERNEL
`
`CHAPTER EIGHT
`THE 1/OSYSTEM
`
`CHAPTER NINE
`NETWORKING
`
`Epilogue
`Glossary of Terms and Acronyms
`
`Bibliography
`
`Index
`
`xv
`
`xxi
`
`15
`
`49
`
`83
`
`115
`
`165
`
`203
`
`241
`
`285
`
`327
`
`333
`
`363
`
`373
`
`Petitioner Microsoft Corporation, Ex. 1008, Contents Summary
`
`
`
`Table of Contents
`
`Foreword
`
`Preface
`
`CHAPTER ONE
`THE MISSION
`
`1.1 An Operating System for the 990s
`Design Goals
`
`1.2.1 Extensibility
`
`.2.2 Portability
`
`Reliability
`
`1.2.4 Compatibility
`
`1.2.5 Performance
`
`1.3 TheTeam
`
`1.4 The Restof
`
`the Book
`
`CHAPTER TWO
`SYSTEM OVERVIEW
`
`2.1 Windows NT Models
`
`2.1.1 Client/Server Model
`
`2.1.2 Object Model
`
`2.1.3 Symmetric Multiprocessing
`2.2 Windows NT Structure
`
`2.2.1 Protected Subsystems
`
`2.2.2 Executive
`
`2.2.3
`
`Brief Tour
`
`2.2.3.1
`
`Logon Session
`
`Environment Subsystems
`Native Services
`
`2.2.3.4 Objects
`
`Virtual Memory
`
`I/O and File Systems
`
`xxi
`
`10
`
`11
`
`12
`
`13
`
`15
`
`16
`
`16
`
`21
`
`23
`
`25
`
`25
`
`27
`
`30
`
`30
`
`32
`
`34
`
`35
`
`37
`
`38
`
`Petitioner Microsoft Corporation, Ex. 1008, p. ix
`
`
`
`2.3 Additional Windows NT Architectures
`
`2.3.1
`
`Internationalization
`
`2.3.1.1
`
`Locales
`
`2.3.1.2 Unicode
`
`2.3.2 Structured Exception Handling
`
`2.4 In Conclusion
`
`CHAPTER THREE
`THE OBJECT MANAGER AND OBJECT SECURITY...
`
`3.1
`
`NT Executive Objects
`
`3.1.1 Using Objects
`3.1.1.1 File-Based Model
`
`3.1.1.2 NTObjectModel
`
`3.1.2 Object Structure
`
`3.1.3 Object Types
`
`3.2 Managing Objects
`3.2.1 Object Names
`3.2.1.1 Object Directories
`3.2.1.2 Object Domains
`
`3.2.1.3 Symbolic Links
`
`3.2.2 Object Handles
`
`3.2.2.1 Object Retention
`
`3.2.2.2 Resource Accounting
`
`3.2.3 Object Methods
`
`3.3 Protecting Objects
`
`3.3.1 Access Tokens
`
`3.3.2 Access Control Lists
`
`3.3.3 Putting It All Together
`
`3.4 In Conclusion
`
`CHAPTER FOUR
`PROCESSES AND THREADS
`
`4.1 What
`
`Is Process7
`
`4.1.1 Address Space
`
`4.1.2 Collection of Resources
`
`4.1.3 Process Object
`
`40
`
`40
`
`41
`
`42
`
`44
`
`48
`
`49
`
`50
`
`51
`
`53
`
`54
`57
`
`59
`
`61
`
`61
`
`63
`
`65
`
`66
`
`68
`
`70
`
`71
`
`72
`
`74
`
`76
`
`78
`
`79
`
`81
`
`83
`
`84
`
`85
`
`86
`
`87
`
`Petitioner Microsoft Corporation, Ex. 1008, p. x
`
`
`
`4.2 WhatAre Threads2
`4.2.1 Multitasking and Multiprocessing
`
`4.2.2 Multithreading
`4.2.3 Thread Object
`
`4.2.4 Synchronization
`4.2.5 Alerts and Asynchronous Procedure Calls
`
`4.3 Process Structure
`
`4.3.1 Environment Subsystem Requirements
`4.3.2 Native Process Structure
`
`4.3.2.1 Managing Client Processes
`4.3.2.2 Preventing Misuse
`
`4.4 InConclusion
`
`CHAPTER FIVE
`WINDOWS AND THE PROTECTED SUBSYSTEMS
`
`5.1 Protected Subsystems Overview
`5.1.1 Why Use
`Client/Server ModeI2
`5.1.1.1 Providing Multiple Environments
`
`5.1.1.2 Memory Protection
`
`5.1.2 Performance Considerations
`5.2 Interacting with Windows NT Subsystems
`
`5.2.1 Logon
`
`5.2.2 Running Applications
`
`5.3 Win32 Subsystem
`5.3.1 32-Bit API
`532 Structure
`5.3.3 Design Changes
`5.4 MS-DOS and the 16-Bit Windows API
`5.4.1 Virtual DOS Machines VDM5
`5.4.2 Windows on Win32 WOW
`Message Passing with the Local Procedure Call LPC Facility
`5.5.1 Port Object
`Types of LPC Message Passing
`5.5.2.1 Copying Message to
`5.5.2.2 Passing Message in Shared Memory
`5.5.2.3 Callbacks
`
`Port
`
`5.5.2.4 Quick LPC
`
`5.6 In Conclusion
`
`90
`
`91
`
`94
`
`97
`
`100
`
`103
`
`104
`
`105
`
`109
`
`110
`
`112
`
`113
`
`115
`
`117
`
`119
`
`120
`
`123
`
`126
`
`130
`
`131
`
`133
`
`136
`
`137
`
`140
`
`141
`
`147
`
`149
`
`152
`
`155
`
`156
`
`158
`
`158
`
`159
`
`161
`
`162
`
`164
`
`xi
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xi
`
`
`
`CHAPTER SIX
`THE VIRTUAL MEMORY MANAGER
`
`6.1 Virtual Memory
`
`6.2 User-Mode Features
`
`6.2.1 Managing Memory
`6.2.2 Sharing Memory
`6.2.2.1 Sections Views and Mapped Files
`6.2.2.2 Section Object
`
`6.2.3 Protecting Memory
`
`6.2.3.1 Process-Private Memory
`6.2.3.2 Shared Memory
`6.3 Virtual Memory Implementation
`
`6.3.1 Address Space
`
`6.3.2 Paging
`6.3.2.1 Paging Mechanisms
`6.3.2.2 Paging Policies and Working Sets
`6.3.3 Page Frame Database
`6.3.4 Virtual Address Descriptors
`
`6.3.5 Multiprocessing Considerations
`
`6.3.6 Portability Considerations
`
`6.4 In Conclusion
`
`CHAPTER SEVEN
`THE KERNEL
`
`7.1 Overview
`
`7.2 Thread Scheduling and Dispatching
`7.2.1 Kernel Process and Thread Objects
`7.2.2 Scheduling Priorities
`7.2.3 Context Switching
`
`7.3 ntrrupt and Exception Handling
`7.3.1 Trap Handler
`
`7.3.2
`
`Interrupt Dispatching
`Interrupt Types and Priorities
`
`7.3.2.1
`
`7.3.2.2 Interrupt Processing
`7.3.2.3 Software Interrupts
`
`7.3.3 Exception Dispatching
`7.3.4 System Service Dispatching
`
`xii
`
`165
`
`167
`
`171
`
`172
`
`174
`
`174
`
`177
`
`179
`
`180
`
`182
`
`184
`
`184
`
`186
`
`187
`
`191
`
`194
`
`198
`
`200
`
`201
`
`202
`
`203
`
`204
`
`206
`
`206
`
`210
`
`213
`
`215
`
`216
`
`217
`
`218
`
`220
`
`222
`
`227
`
`229
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xii
`
`
`
`7.4 Multiprocessor Synchronization
`
`7.4.1 Kernel Synchronization
`
`7.4.2 Executive Synchronization
`
`7.5 Power Failure Recovery
`
`7.6 In Conclusion
`
`CHAPTER EIGHT
`THE I/O SYSTEM
`
`8.1 An Overview of NT I/O
`
`8.1.1
`
`I/O System Components
`8.1.2 Design Features
`
`8.1.2.1 NTObjectModel
`8.1.2.2 Uniform Driver Model
`
`8.1.2.3 Asynchronous Operation
`8.1.2.4 Mapped File I/O and File Caching
`
`8.2 I/O Processing
`
`8.2.1 File Objects
`
`8.2.2
`
`I/O Request
`
`to
`
`Single-Layered Driver
`
`8.2.2.1 Queuing an I/O Request
`
`8.2.2.2 Servicing an Interrupt
`
`8.2.2.3 Completing an I/O Request
`
`8.2.3
`
`I/O Requests to Layered Drivers
`
`8.2.4 Considerations in Using Asynchronous I/O
`
`8.3 Layered Driver Model
`
`8.3.1 Structure of
`
`Driver
`
`8.3.2 Driver Object and Device Object
`
`8.3.3
`
`I/O Request Packet
`
`8.3.4 Adding Layered Drivers
`
`8.3.5
`
`Issues in Driver Development
`
`8.3.5.1 Multiprocessing
`8.3.5.2 Power Failure Recovery
`
`8.4 In Conclusion
`
`CHAPTER NINE
`NETWORKING
`
`9.1 Background
`
`9.1.1 History
`
`231
`
`232
`
`234
`
`237
`
`239
`
`241
`
`242
`
`243
`
`244
`
`245
`
`247
`
`249
`
`252
`
`253
`
`253
`
`257
`
`257
`
`260
`
`262
`
`265
`
`269
`
`271
`
`272
`
`273
`
`275
`
`275
`
`278
`
`278
`
`281
`
`282
`
`285
`
`287
`
`288
`
`xiii
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xiii
`
`
`
`9.1.2 OSI Reference Model
`
`9.2 Built-In Networking
`
`9.2.1 Network APIs
`
`9.2.2 Built-In Networking Components
`
`9.2.2.1 Redirector
`
`9.2.2.2 Server
`9.2.3 Name Resolution
`
`9.3 Open Architecture
`9.3.1 User-Mode Access to Remote File Systems
`9.3.1 .1 Multiple Provider Router for the WNet API
`9.3.1.2 Multiple UNC Provider for Win32 File I/O
`9.3.2 Transport Protocols
`9.3.3 NDIS Environment
`
`for Network Drivers
`
`9.4 Distributed Application Environment
`9.4.1 Remote Procedure Call
`9.4.2 Named Pipes
`9.5 Corporation-Wide Networking and Distributed Security
`9.6 In Conclusion
`
`Epilogue
`Glossary of Terms and Acronyms
`
`Bibliography
`
`Index
`
`289
`
`292
`
`294
`
`297
`
`298
`
`300
`
`302
`
`304
`
`305
`
`305
`
`307
`
`309
`
`312
`
`314
`
`315
`
`320
`
`321
`
`326
`
`327
`
`333
`
`363
`
`373
`
`xiv
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xiv
`
`
`
`FOREWORD
`
`In 1965
`B.A in mathematics minor in
`graduated from colleg with
`physics and an overwhelming desire to be an engineer and to build things
`took ajob with DuPont
`in Wilmington Delaware as materials testing
`So
`year of absolute boredom was lent to the mathemat
`engineer After about
`ics and statistics group and assigned to construct
`computer simulation
`the Scott Paper Company was de
`model for
`new foam-making process that
`veloping Working with machines that never did what meant them to was
`had shunned
`humiliating but within six months was hooked and what
`coming out of schoolcomputersturned into my lifes vocation
`Soon after
`transferred to DuPonts engineering department where
`small group that built online com
`time DuPont had
`could program full
`puter system applications My real motivation forjoining this group was to get
`closer to computers and in fact wanted to work on implementing an operat
`had the good fortune to work on several
`ing system While in this group
`stand-alone real-time systems where the project involved writing the central
`control program that scheduled the various tasks and monitored system ac
`tivity as well as writing the actual application code
`It soon became apparent
`that the only way was going to get the oppor
`tunity to work on implementing real operating system was to join company
`that made computers its business And so in 1971
`left DuPont
`for
`job in
`Maynard Massachusetts with Digital Equipment Corporation As it
`turned
`out this put me in the operating system business for quite some time to come
`Little did know that would be fortunate enough to develop several operat
`ing systems in my lifetime developing one is
`rare opportunity for anyone
`My first operating system project was to build real-time system called
`ran on Digitals PDP-11 16-bit series of minicomputers At the
`RSX-11M that
`time our goals seemed very ambitious We were asked to build multitasking
`operating system that would run in 32 KB of memory with
`hierarchical
`system application swapping real-time scheduling and
`set of development
`utilities The operating system and utilities were to run on the entire line of
`PDP-11 platforms from the very small systems up through the PDP-11/70
`which had memory-mapping hardware and supported up to MB of memory
`had
`havemany fond memories of how RSX-11M took shape
`rubber
`stamp made that proclaimed Size Is the Goal and proceeded to stamp ev
`to make sure that all
`the programmers
`ery last bit of project correspondence
`
`file
`
`xv
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xv
`
`
`
`INSIDE WINDOWS
`
`NT
`
`and product managers understood how important it was to achieve our goals
`We also learned the power of conditional assembly high-level
`language use
`in operating systems was in its infancy at this time and whenever someone
`added
`feature we Just made it
`system generation option
`While developing RSX 11M we spent most of our time engineering solu
`tions to memory problems Because the system had to run in 32 KB we gener
`that divided available memory equally between the
`ated memory budget
`operating system and the utility programs That
`left mere 16 KB for utility
`programs and led to long hours tuning overlay structures to achieve accept
`able performance for many of the RSX-11M system programs
`Although RSX-11M had some very stringent size and performance con
`straints of the systems Ive worked on it was probably the easiest one to de
`involved re-implementing an existing system but allowed us the
`velop It
`freedom to change and subset the programming interfaces as long as applica
`tions could be reassembled or recompiled with minimal source code changes
`RSX 11M was introduced in 1973 18 months after we had started building it
`proved to be very successful and helped make the PDP-11 the most popular 16-
`bit minicomputer of its time
`than mainframes was
`The PDP 11 provided better price/performance
`level and along with other popular mini
`the departmental
`affordable at
`computers of the same era led to the first wave of downsizing in the com
`bring down mainframe
`industry Downsizing was an attempt
`to
`puter
`applications to the minicomputer systems Many of the mainframe programs
`were larger than the PDP-11 could easily accommodate and almost immedi
`ately Digital was up against what Gordon Bell has deemed the single most im
`reason that computer architectures become obsolete the lack of
`portant
`enough address bits
`Out of this need the VAX architecture was born and it became one of
`70s and remained popular
`the late
`the most popular architectures of
`the 80s The VAX architecture provided 32 bits of virtual address
`throughout
`space and eliminated the need to wrestle programs into what seemed to be an
`ever decreasing amount of virtual address space
`My second opportunity to develop an operating system arrived with the
`VAX was very fortunate to be chosen to lead the operating system effort for
`the VAX 11 architecture the result of which was the VMS operating system
`VMS was Digital
`second general purpose time sharing system devel
`oped specifically for the VAX architecture Because the VAX architecture had
`grown out of the tremendous success of the PDP 11 however
`this time it was
`mandatory to provide more than source level compatibility for applications
`
`It
`
`xvi
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xvi
`
`
`
`Foreword
`
`PDP-1l compatibility mode in which
`Thus the VAX-il architecture included
`PDP-li instructions were executed directly by hardware At that time it was
`single operating system could support more than one
`inconceivable
`that
`the best known of the
`compatibility environment Although it wasnt
`PDP-1i operating systems amazingly Digital had no fewer
`than 10 PDP-ll
`operating systems at one time or another RSX-11M was chosen as the operat
`ing system interface that would be emulated in PDP-il compatibility mode on
`the VAX This decision probably didnt make sense to number of people out
`side the company but RSX-11M had the largest number of application devel
`tools had the most general-purpose operating system features
`opment
`file system structure that could be com
`supported multitasking and had
`patibly extended Ultimately the VAX-li system ran RSX-ilM binaries right
`it allowed RSX-11M volumes to be directly mounted
`off the distribution kit
`and their files to be accessed and shared between RSX-11M compatibility-
`mode programs and native VMS programs
`From technical perspective the biggest mistake we made in VMS was
`language At the time we had
`group of very
`not writing it
`in
`high-level
`size con
`assembly language programmers some stringent
`accomplished
`straints and no compiler with the appropriate quality for operating system
`development So to ensure that we would ship the system in marketable
`in assembly language Looking back on what hap
`time frame we wrote it
`pened it would still be hard to make the decision to write VMS in high-level
`language Moral The right thing to do technically isnt always the best thing
`to do financially
`Early in the 80s while minicomputers were busy absorbing mainframe
`and other new applications two important technologies were emerging the
`personal computer PC and workstations After the VMS project
`few
`spent
`compilers and then led
`group that built Digitals first
`years developing
`MicroVAX workstationthe MicroVAX
`Workstations like the MicroVAX provided individual high-performance
`computing for applications such as computer-aided design CAD whereas
`PCs supported business applications aimed at personal productivity
`such as
`spreadsheets and word processorstwo very successful early PC products
`Although workstations were relatively pricey personal computers had to be
`affordable to small businesses
`In order to meet price objectives
`the original PCs were built with 8-bit
`and later with 16-bit microprocessors They were constrained in much the
`same way RSX-11M had been and required considerable effort on the part of
`programmers and operating system designers to accommodate
`their limita
`tions Hardware
`that operating systems existed
`resources were so scarce
`
`xvii
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xvii
`
`
`
`INSIDE WINDOWS
`
`NT
`
`file
`
`few low-level hardware functions and to provide
`set of
`mainly to handle
`system libraries But
`the personal computer offered something that
`minicomputers did nota market in which independent software developers
`result the breadth and
`high volume As
`could sell
`their programs at
`variety of applications that run on PCs and exploit their capabilities is truly
`amazing
`In the mid-80s microprocessors gained 32-bit addressing and worksta
`tions were quick to take advantage of this capability However because of the
`very large installed base of personal computers and their applications it was
`in another computer and then recompile and relink all
`not easy to simply roll
`the application software End users of PCs simply didnt have the source code
`for their programs and they demanded binary compatibility
`In the summer of 1988
`received an interesting call from Bill Gates at
`Microsoft He asked whether Id like to come over and talkabout building
`the time
`for personal computers At
`new operating system at Microsoft
`wasnt
`too interested in working on personal computers but
`this
`thought
`good opportunity to meet Bill and discuss what he had in mind
`would be
`What Bill had to offer was the opportunity to build another operating system
`one that was portable and addressed some of the concerns people had about
`computers to run mission-critical applications For me it
`using personal
`meant the chance to build another operating system
`Bill finally convinced me that this was an opportunity
`couldnt pass up
`and in October of 1988 came to Microsoft and started to build the team that
`would build the new operating system didnt realize it at the time but this
`had ever
`would be the most ambitious operating system project on which
`embarked
`Our goals for the system included portability security POSIX com
`pliance compatibility scalable performance multiprocessor support ex
`tensibility and ease of internationalization Of all
`these goals by far the one
`to achieve and that had the most profound effect on the
`that was hardest
`the system was compatibility Hundreds of thousands of PDP-11
`structure of
`systems had been sold but tens of millions of personal computers were in
`operation As if that werent enough we needed to compatibly support three
`separate 16-bit operating environments and add new 32-bit capabilities to free
`personal computer applications from the same kind of virtual address con
`straints that had existed for the PDP-11 To top it off we wanted to support the
`called POSIX
`UNIX standard interface specification
`Now almost four years later we are on the brink of bringing this system
`Windows NT to market Helen Custer started work on this book when the
`
`xviii
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xviii
`
`
`
`Foreword
`
`It
`
`operating system design began As our design has matured the book has
`undergone continual change to track the operating system architecture This
`has been an arduous taskkeeping up-to-date and writing and rewriting the
`various chapters of the book as the design evolved Although it
`is our design
`Helen is the one who has captured the essence of that design and made it
`understandable to more than just serious operating system implementers For
`this we owe Helen
`great debt
`the people who contributed to the
`is impossible to acknowledge all
`did not design Windows NTI was
`design of Windows NT must say that
`merely one of the contributors to the design of the system As you read this
`book you will be introduced to some but not all of
`the other contributors
`team effort and has involved several hundred person-years of
`This has been
`effort Perhaps the most important contribution of all was that made by the
`their effort Win
`people who have tested and stressed the system Without
`dows NT could not have achieved the level of quality that it has achieved
`hope you enjoy this book about Windows NT as much as we enjoyed
`designing the system
`
`Dave Gutkr
`Director Windows NT Development
`
`xix
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xix
`
`
`
`PREFACE
`
`began writing this book to now
`bug road from 1989 when
`It has been
`Nothing could have prepared me for the all-consuming immersion in operat
`ing system theory design implementation and lore that began whenI ac
`cepted this challenge Before starting reread Tracy Kidders Soul of New
`Machine for inspiration and for
`sense of kinship with at least one other per
`son who had traveled
`path similar to the one was about
`In many
`to travel
`respects the construction of Windows NT was
`software version of the hard
`ware construction documented in Kidders book and my experience
`suspect bore some resemblance to his
`is an oppor
`Creating an operating system like creating
`computer
`tunity few engineers ever get Most operating system engineers spend their
`entire careers enhancing or modifying existing operating systems or design
`ing new ones that are never built or are never marketed Computer com
`that
`regularly or undergo financial or managerial difficulties
`panies fail
`require them to cancel projects before they are completed Those systems
`that are completed often dont catch on in the marketplace or are largely
`irrelevant because existing applications require the old systems to be sup
`ported throughout eternity Even fewer writers get the opportunity to write
`book such as this one which documents
`significant new
`the design of
`operating system It has been an unusual privilege to do so
`The background information in this book is not new Most of it has been
`written before in many forms and often with more eloquence than
`have
`book that
`mustered in these pages However my goal was not
`to write
`teaches operating system principles better presented in other books but to
`place Windows NT within the context of existing systems Although
`have
`not belabored the often complex reasoning behind implementation deci
`have tried to provide glimpses into some of
`the operating system
`sions
`history and research that have influenced Windows NTs final form
`This book is not written for operating system designers who are likely to
`the inner workings of Windows NT than this forum
`want more detail about
`is for the rest of us those who know something about
`can provide Rather it
`computers and who want
`to understand the internal design of this system in
`order to write better applications or to simply demystify that black box called
`an operating system
`
`xxi
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xxi
`
`
`
`INSIDE WINDOWS
`
`NT
`
`Inside Windows NT was completed several months before
`the final
`snapshot of Windows NT was taken Therefore some of
`the features de
`in the first release some
`scribed in this book might not ultimately appear
`might be postponed until subsequent releases and others might be dropped
`long-term vision of Windows NT
`entirely attempted however
`to provide
`without resorting to too much
`pie in the sky and without relying too heavily
`on implementation details that are likely to change Everything described
`herein either is already in the system or exists but might be withheld until it
`can be tested further or until the proper mix of software products exists to
`complement it Some topics are necessarily omitted either because they were
`introduced into the system late in its development or because they are likely
`to be documented elsewhere Other topics such as security and the internal
`notable example is the Win32
`design of each subsystem are abbreviated
`Windows and the Protected
`subsystem which is described in Chapter
`Subsystems but whose internal details would fill another volume Rather
`than documenting the Win32 API which other authors have already begun to
`do this book focuses on the design of Windows NT and on how the Win32
`plug into the NT executive
`and other API environments
`is not necessary to read the book from cover to cover
`is constructed
`two chapters and then jump into whatever
`so that you can read the first
`topic
`you prefer Terminology and theory tend to build upon themselves however
`so reading the book from front to back will
`increase your comprehension in
`certain areas
`
`It
`
`it
`
`have talked to cajoled listened to and
`three years
`Over
`the last
`argued with many people all of whom deserve my thanks My greatest
`thanks
`go to Dave Cutler for wanting this book to be written and for giving me the
`opportunity to write it His technical and editorial comments
`unprecedented
`were also extremely valuable to me
`the only person who read every
`also owe great thanks to Lou Perazzoli
`draft of everything wrote along the way even when his impossible schedule
`difficult endeavor This book would not exist without Lous as
`made this
`sistance and support
`thanks go to Ron Burk and Gary Kimura for suggesting appro
`Special
`could organize the enormous amount of in
`priate frameworks within which
`this project progressed Finding an editorial
`formation
`collected
`as
`framework and squeezing such multifaceted system into it was one of
`the
`toughest hurdles in writing this book
`Thanks also to the software engineers who allowed me to freely borrow
`and who were patient as
`text from their technical specifications
`tried to
`
`xxii
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xxii
`
`
`
`Preface
`
`reflect their views from perspective that was not theirs Although it might
`this book is really their
`not be written exactly as they would have written it
`book it chronicles the source of theirjoy anxiety frustration and inspiration
`privilege and
`for four years It has been
`challenge to work with them and to
`share this unique experience In addition to those listed above special thanks
`for technical editorial or moral support go to Darryl Havens Steve Wood
`Mark Lucovsky Jim Kelly Scott Ludwig Matthew Felton Mark Zbikowsky
`Chandan Chauhan Chuck Lenzmeier Mary Hutton Asmus Freytag Dave
`Thompson Larry Osterman SanjayJejurikar David Gilman Robert Reichel
`Chad Schwitters Bryan Wiliman Eric Kutter Lee Smith Steve Rowe Paul
`Leach Bruce Hale Roberta Leibovitz Gregory Wilson David Treadwell
`Sudeep Bharati Chuck Chan Manny Weiser Leif Pederson Dan Hinsley
`Bob Rinne David McBride Richard Barth John Balciunas Rick Rashid
`Therese Stowell Dave Hart Matthew Bradburn Cliff Van Dyke David
`Thacher Jane Howell Lorelei Seifert Bob Muglia and Paul Maritz
`My personal
`thanks to Callie Wilson for handling the internal distribu
`tion of the book and to Carl Stork for running interference for me as news of
`the manuscripts existence leaked out
`great pleasure to work
`It was also
`with Microsoft Press staff including Nancy SiadekJeff Carey Deborah Long
`Judith Bloch Connie Little Katherine Erickson Peggy Herman Jean Tren
`ary Barb Runyan Kim Eggleston Wallis Bolz and Dean Holmes Thanks to
`them for meeting
`challenging publication schedule and handling with
`aplomb the intricacies of this large and detailed book
`extend my gratitude to the Microsoft library staff for acquiring all the
`used as background and reference mate
`articles and many of the books that
`let me down when
`submitted esoteric requests and they
`rial They never
`never yelled at me for keeping anything too long also owe
`belated thanks
`to Daniel CaƱas my operating systems instructor at the University of Kansas
`who sparked my interest in operating systems and who taught me the value of
`research
`
`this book you will see the names of designers and imple
`Throughout
`menters of Windows NT Many names are omitted but the omissions are ran
`dom reflecting only that certain parts of
`the operating system are not
`described in this book or that
`there were too many contributors to particu
`to mention everyone And although this text cites him pri
`lar component
`marily as the developer of the NT kernel Dave Cutler the chief architect of
`Windows NT and one of
`its most prolific coders provided code or at
`least
`direction for nearly every part of the operating system
`
`xxiii
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xxiii
`
`
`
`INSIDE WINDOWS
`
`NT
`
`certain beauty in well designed operating systems an under
`There is
`standable order beneath the seemingly endless details its implementation
`in writing this book was to examine this very large body of
`comprises My goal
`its inner order The
`software and peel away enough of the details to reveal
`paradox of that difficult venture isperhaps best revealed in brief anecdote
`office one afternoon while he described to me
`sat in Lou Perazzoli
`the ins and outs almost literally of working-set trimming component of
`listened intently and formed in
`the virtual memory system As he explained
`my mind an abstraction of his description one that would fit within the scope
`of this book When he finished summarized what he had said from my point
`of view and then asked Is that right He responded earnestly Yes thats
`exactly what we sort of do
`balancing act between detailed truth and or
`This book represents
`result it documents
`the developers
`exactly what
`dered beauty As
`sort
`owe them my thanks for sharing with me the contents of their
`of did
`heads Any errors in transcribing those contents are mine
`
`Helen
`
`Custer
`
`September1992
`
`xxiv
`
`Petitioner Microsoft Corporation, Ex. 1008, p. xxiv
`
`
`
`CHAPTER ONE
`
`THE MISSION
`
`In the world of operating systems the wheels of progress turn slowly Operat
`ing systems take years to develop Once complete they remain lifeless until
`applications are written to exploit their capabilities Even after applications
`exist people must learn how to use them through documentation training
`and experience This coupled with the delays common in developing appli
`cations for operating systems means that ordinary users often own and use
`10- or 20-year-old operating system technology
`While operating
`hardware
`technology
`systems await acceptance
`marches forward Computers with faster processors more memory and even
`multiple processors become commonplace while operating system devel
`opers scurry to extend their existing systems to take advantage of the new
`features
`The Intel 80386 and 80486 chips along with many other popular pro
`cessors are known as complex instruction set computers CISC Their chief char
`large number of machine instructions
`each of which is
`acteristic is
`elaborate and powerful In the last few years Intel has made major advances
`in the speed and power of its processors and other manufacturers have devel
`oped multiprocessor machines based on the Intel CISC technology
`In the mid-1980s the hardware industry created another type of pro
`instruction set computers RISC RISC chips
`cessor architecture called reduced
`differ from CISC chips primarily in the small number of simple machine in
`structions RISC chips provide Because of the simplicity of their instruction
`sets the RISC processors run at increased clock speeds and achieve very fast
`execution times
`
`Petitioner Microsoft Corporation, Ex. 1008, p. 1
`
`
`
`INSIDE WINDOWS
`
`NT
`
`In both the CISC and RISC arenas promising processor
`technologies
`these and other
`have emerged rapidly Microsoft saw that in order to exploit
`hardware advancesit needed to produce an operating system for the 1990s
`one that was portable and able to move easily from one hardware platform to
`another Although Microsoft and IBM created the OS/2 operating system in
`recognized that the system had many shortcomings the
`the 1980s Microsoft
`most obvious being that OS/2 is not p