![]() |
Up Close And Personal With Windows NT's ArchitectureCompared to its main competitors (especially the various flavors of UNIX), Windows NT is a young operating system. Thanks to Microsoft's gigantic efforts, though, it has quickly evolved to the point of being a reasonably mature environment for serious corporate applications. Moreover, steadily increasing funds have allowed the Redmond-based juggernaut to continue investing in cranking out state-of-the-art technologies geared toward enterprise development, making it an attractive platform for high-end business scenarios at competitive costs. While learning about the latest subsystems and APIs remains an imperative for cutting-edge software engineers, it is arguable that a solid understanding of the hidden workings of the operating system remarkably improves both their debugging skills and their ability to recognize how each novel addition fits in the big picture. A direct consequence of the relatively short time Windows NT has been in use in the industry is represented by the lack of punctual and accurate information about the internals of the system, as opposed to the abundance of texts treating higher level themes. The first edition of Inside Windows NT, written by Helen Custer of Microsoft and based on version 3.1 of the product, was indeed one of the best titles falling into the first category. From that solid ground David Solomon has jumped in, updated the contents, and also added a lot of new insights on those topics that characterize the latest releases of Windows NT. The result is not only an up-to-date reproposition of the former book -- it is a largely restructured and organically reorganized manual, whose focus is on Windows NT 4.0 with Service Pack 3. Frequent marginal notes and the entire final chapter also anticipate what to expect from the upcoming Windows NT 5.0. After spending some pages delineating its target and introducing the basic elements that make up the foundation of NT, the book digs deeper and unveils the logic of most aspects of the system. Processes and threads, the mythical memory manager (whose vivisection turned out particularly well), the cache manager, the HAL (acronym for Hardware Abstraction Layer) and the Executive, kernel mode components, and security are just some of the myriad topics covered throughout the chapters. Things like GDI, USER, networking and COM are deliberately left out, as each of them would deserve an entire book. The level of detail is excellent, but I was just as impressed by the high degree of readability and, in general, by the ability of the author to follow a progressive approach in presenting new material without losing sight of the organic whole. The strength of this books educational aspect is a big upside considering the innate complexity of the subject, and renders Inside Windows NT an extraordinary candidate as a textbook in support of professional seminars and academic courses. As per the target, the author geared the majority of the chapters toward advanced system administrators and developers of systems software. Some chapters deal intensively with intimate aspects of Win32 and therefore will more likely interest the hardcore software engineer than the administrator. The focus always stays on the logic and implementation of the components being analyzed. Don't expect direct coverage of programming with the API or any source code to cut and paste into your next application. This is not to say Inside Windows NT is solely theoretical: several exercises (called "experiments") guide the reader in the personal verification of some concepts, and many of them even help familiarize you with the low-level debugging and monitoring tools provided by the SDK and the resource kit. Solomons background reveals his extensive experience with Windows NT and previously with VMS (to which the very first NT version owes a lot) and in communicating his results to others. In this book, his already ample knowledge is complemented by the special privilege of unlimited access to the source code of the operating system that the Windows NT development group in Microsoft granted to the author . The strict collaboration with Microsoft also led to some inevitable bias. Although the internals of the system are analyzed quite exhaustively, there is little room for undocumented tricks, critiques on questionable design or implementation choices (sticking to the text it would seem as if there weren't any), or anything else that might put the company in a bad light. If you previously read Andrew Schulman's Undocumented Windows, or Matt Pietrek's Windows 95 Systems Programming Secrets, you will notice the difference. It's a trade-off; what it misses in impartiality it makes up in detail. Ultimately, the reader has the final word on whether it was worth it. -- Davide Marcato (marcato@programmers.net) Excerpts from Inside Windows NT, 2nd EditionFrom Chapter 3 ("System Mechanisms"), page 127 "Executive software outside the kernel also needs to synchronize access to global data structures in a multiprocessor environment. For example, the memory manager has only one page frame database, which it accesses as a global data structure, and device drivers need to ensure that they can get exclusive access to their devices. By calling kernel functions, the executive can create a spinlock, acquire it, and release it. Spinlocks only partially fill the executive's needs for synchronization mechanisms, however. Because waiting on a spinlock literally stalls a processor, spinlocks can be used only under the following strictly limited circumstances [...]" From Chapter 5 ("Memory Management"), page 228 "There are two types of nonpaged pools: one for general use and a small one (four pages) reserved for emergency use when nonpaged pool is full and the caller can't tolerate allocation failures. Uniprocessor systems have two paged pools; multiprocessor systems have four. Having more than one paged pool reduces the frequency of system code blocking on simultaneous calls to pool routines. Both nonpaged and paged pool grow automatically to a system-defined maximum computed at system boot time. The initial size of these pools is also calculated on system initialization and depends on memory size. You can override the initial size of these pools by changing HKLM\System...\Control \Session Manager\Memory Management\NonPagedPoolSize or \PagedPoolSize from 0 (which causes the system to compute the size) to the size desired in bytes. You can't, however, increase the system-defined maximum size." From Chapter 9 ("Windows NT File System (NTFS)"), page 428-429 "A recoverable file system tries to exceed the safety of a careful write file system while achieving the performance of a lazy write file system. A recoverable file system ensures volume consistency by using logging techniques originally developed for transaction processing. If the operating system crashes, the recoverable file system restores consistency by executing a recovery procedure that accesses information that has been stored in a log file. Because the file system has logged its disk writes, the recovery procedure takes only seconds, regardless of size of the volume. The NTFS recovery procedure is exact, guaranteeing that the volume will be restored to a consistent state. None of the inadequate restorations associated with lazy write file systems can happen with NTFS."
Table Of Contents
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Glossary 483 Index 505
Quick Rating
Explanation of ERCB rating scale: No stars = unacceptable, 1 Star = marginal, 2 Stars = average, 3 Stars = above average, 4 Stars = exceptional. Copyright ©1998 Electronic Review of Computer Books Created 11/17/98 / Last modified 11/20/98 / webmaster@ercb.com |