Abstract
This chapter provides a crash course on Windows NTs design and its most important features and technologies.
WINDOWS NT IS A unique and powerful operating system. Right out of the box, Windows NT offers you a high degree of performance and a wealth of capabilities and features. These features can be categorized into six areas: reliability, performance, portability, compatibility, scalability, and security.
To better understand Windows NT, well examine these capabilities and features more closely, and find out what they mean and how theyre implemented inside Windows NT.
RELIABILITY
Windows NT is an exceptionally robust operating system that provides superior reliability. This particular aspect of NT makes it an excellent foundation for running mission-critical applications, and makes it a direct competitor to workstation-level operating systems such as UNIX. NTs reliability makes it an especially ideal client workstation and network server, because both systems need to avoid downtime. Reliability in Windows NT takes many forms, from its inherent memory protection to its native fault tolerance capabilities.
Memory protection
Windows NT prevents user applications from interfering with NTs core operating system services (known collectively as the Windows NT Executive) by running these services in a protected layer called Kernel Mode. To understand how and why NTs Kernel Mode is protected under NTs design, we must first understand a little about the ring protection model used in modern processor design. In the ring architecture model, a CPU (Central Processing Unit) defines different levels or rings of execution, each with its own level of privilege and protection. Both Intel and RISC-based processor designs support this design, with RISC-based CPUs supporting two rings, and Intel-based CPUs supporting four. To effectively support both RISC and Intel CPUs, Windows NT uses only two rings in its design, Rings 0 and 3. Of these, Ring 0 (also known as supervisor mode) is the most highly protected ring in which an application or service can run. It is physically impossible for applications running in Ring 3 to interfere with those running in Ring 0.
As we examine Windows NTs architecture more closely, we see that NTs Kernel Mode and its services operate in the processors Ring 0, whereas user applications (running in NTs User Mode) run in the processors Ring 3. This is what prevents user applications from interfering with core NT operating system services. Instead, these applications are forced to communicate with NTs low-level services using a message-passing methodology: no direct physical access of the memory space used by these services is allowed. This design makes it virtually impossible for user applications to violate the integrity of the operating system. Although this method of communication between processes provides an enormous increase in overall system reliability, it also incurs some performance penalties due to the overhead of the continual message passing between User and Kernel modes. Each transition from one mode to the other requires a processor context-switch, which in turn burns additional CPU cycles.
In addition to being isolated from the operating system itself, individual 32-bit Windows applications are also protected from one another. This is because each application running under NT is capable of running in its own private address space. This prevents one program from overwriting anothers memory space accidentally, the most common cause of system lockups. NTs system architecture is depicted in Figure 1-1.
32-bit flat memory model
As a true 32-bit operating system, Windows NT provides a 32-bit flat memory model that allows the operating system to access 4GB (over 4 billion bytes) of memory, and individual applications up to 2GB of private address space. As mentioned earlier, this address space is also private to each application, keeping individual applications physically protected from one another in memory.
NOTE: The next version of Windows NT, version 5.0, will have a 64-bit memory model that will take better advantage of the capabilities of newer 64-bit processors such as the DEC Alpha and the upcoming Merced Processor from Intel.
Preemptive multitasking
Windows NT uses preemptive multitasking, a multitasking methodology that ensures all running applications adequate access to the systems CPU(s). It also prevents individual applications from monopolizing the CPU or halting the entire system should an application become unstable or cease execution. This allows NT to continue functioning in circumstances that would bring other operating systems to a grinding halt.
NOTE: Although NT offers superior reliability, a recent discovery was made that challenged the long-standing assertion that the NT O/S is impervious to User Mode applications. Dr. Mark Russinovich, a Windows NT developer and author, uncovered a flaw in NT that was exploited using a tiny application called NTCrash. When this program is run, it makes continual random calls to either of two Win32 APIs (Application Programming Interfaces), quickly causing the system to crash. After bringing the matter to Microsofts attention, Microsoft responded by releasing Windows NT 4.0 Service Pack 2, which effectively closes the holes found by Dr. Russinovich (for more information, see the NT Internals web site at :http://www.ntinternals.com/).
Robust, transactional file system (NTFS)
Windows NTs native transactional file system (NTFS) is an advanced and extremely robust file system that provides superior reliability. As a transactional file system, NT is able to reverse incomplete or invalid write operations that occur as a result of hardware or software failure (for example, a power outage in the middle of writing a file). As a result of this design, NT is far less susceptible to corruption or damage by errant applications than other file systems.
Fault tolerance
Windows NT also includes significant fault tolerance features that increase its reli-ability. Fault tolerance refers to a systems capability to withstand various kinds of failures or malfunctions. Windows NT includes several features that help to protect the computer and its data in the event of such failures. The first is its software support (in NT Server) for several types of RAID (Redundant Array of Independent Disks), which offer data-redundancy on hard disks using technologies such as disk mirroring and duplexing (RAID Level 1), or disk striping with parity (RAID Level 5). With RAID, drive information can be recovered in the event of a failed hard disk. In addition to fault-tolerant RAID levels, NT also supports RAID 0, which offers no fault tolerance features but does provide for faster disk performance by striping data across multiple hard drives, which can be accessed more quickly than a single, larger drive.
NTFS also includes its own internal fault tolerance capabilities, by maintaining a log of filewrite operations that can be used to recover an NTFS volumes integrity in the event of power loss or other abnormal system termination. In addition to disk fault tolerance features, NT also provides fault tolerance in the form of Uninterruptible Power Supply (UPS) support. NTs UPS support enables the system to communicate with the UPS and perform such tasks as notifying users and automatically shutting down the system in the event of a power outage.
PERFORMANCE
Although reliability is certainly an important feature of Windows NT, lets not forget that NT was also designed to be a high-performance operating system (after all, thats what were here to discuss). In this section, we discuss some of NTs inherent performance-related features.
True 32
Windows NT was developed using 100% 32-bit code, which translates to better performance and an inherent speed advantage over operating systems such as Windows 95 that contain 16-bit technology. From low-level drivers to high-level applications, everything in Windows NT is 32-bit. User applications benefit from this because they are able to access a larger address space (Windows NT provides a virtual 4GB address space for every application2GB for the application and 2GB for the system) and are able to take advantage of Win32 API features such as multithreading.
Multitasking, multiprocessing, and multithreading
Performing multiple tasks simultaneously is an area in which Windows NT excels. As you already know, Windows NT uses a preemptive multitasking model that provides superior system stability. However, in addition to its reliability benefits, preemptive multitasking also offers performance benefits. Preemptive multitasking means that all running applications are executed in a smooth and even fashion, which translates into better overall system performance. In preemptive multitasking, the system retains control of the multitasking process, allocating CPU time to running processes as needed. After an applications allotted CPU time has expired, Windows NT automatically shifts control to the next application.
NT also offers a symmetric multiprocessing (SMP) feature similar to that found in the UNIX operating system that can take advantage of systems using multiple processors. This feature allows the operating system to become instantly more powerful by executing multiple processes and even individual threads of execution within a process across multiple CPUs.
Finally, in addition to its excellent multitasking capabilities, Windows NT also provides a multitasking-related feature called multithreading. A thread is defined as an individual series of processor instructions within a running process (user application or system service). Applications can be written to spawn multiple threads of execution for greater speed and efficiency.
Multithreading is like multitasking within an application. Normally, when individual tasks within an application are carried out, the program must wait for the process to complete before returning control to the user. This is the case with all 16-bit (and many 32-bit) Windows applications. When an application uses multithreading, an individual task can be embodied within a thread and executed independently of the main process. For example, a request to print a document in a word processing application might result in a separate thread of execution that runs independently of the main program.
RISC CPU support
NT was designed from the outset to support several different types of high-powered RISC (Reduced Instruction Set Computing) processors such as the PowerPC, DEC Alpha AXP, and MIPS CPUs. This allows Windows NT to run not only on Intel-based personal computers, but on high-performance workstation-level systems as well.
Presently, Windows NT supports all of the aforementioned RISC platforms in addition to the Intel x86 family of processors. Unfortunately, however, recent changes in the industry and announcements by Microsoft have shortened the lifetime for two of these platforms: the MIPS processor family and the PowerPC chip. Microsoft announced that future versions of Windows NT will not support these platforms. It should also be noted that the decision to discontinue support for MIPS and PowerPC has much to do with internal industry politics and very little to do with technical issues or limitations regarding the chips themselves.
Currently, it appears as though the future of RISC on NT seems to be solely in the hands of the DEC Alpha family of processors. Luckily, the prospects for the Alphas future appear goodDEC is closely allied with Microsoft and has an enormous amount of development resources invested in Alpha technology. DEC recently released the newest member of the Alpha family, the Alpha 21164a, which offers a host of powerful features: 64-bit processing, execution of up to four CPU instructions simultaneously, a 128-bit or 256-bit data path, a 64-bit PCI bus (with a maximum throughput of 264MB/sec), a high-speed system bus capable of running at speeds of up to 133MHz, and CPU speeds of up to 500MHz (a future version will be faster yet). Why would you want to choose RISC over Intels more popular CISC (Complex Instruction Set Computing) based chips such as the Pentium and Pentium Pro? In a word: power. The fastest DEC Alpha processor is able to deliver up to 50% higher performance for integer operations and up to 80% higher performance for floating point operations than the fastest Intel Pentium Pro processor.
WinConnections Conference Fall 2008 Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).
Master SharePoint with 3 eLearning Seminars Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!
SharePointConnections Conference Fall 2008 Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).
VMworld 2008 - Sign Up Today! Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.
Microsoft® Tech•Ed EMEA 2008 IT Professionals Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.
Order Your Fundamentals CD Today! Gain an introduction to Exchange, learn server security requirements, and understand how unified communications can play a role in your messaging strategies with this free Exchange CD.
Are You Really Compliant with Software Regulations? View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.
Virtualization Congress Oct. 14-16 in London Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16 in London.