Windows NT Operating System Overview

Windows NT is an operating system that is based on design principles often referred to as a microkernel architecture. In order to ensure higher levels of performance, the design time for Windows NT modified the microkernel design by eliminating the clearly defined break between the kernel code and other system components. In most cases, this distinction is not significant and users get the benefit of a microkernel design with better performance.

The basic architecture of Windows NT uses a layered design composed of a number of components that are working in concert to provide the basic services that a user or application need to accomplish their tasks. Working from the inside out, these components are: the kernel, the hardware abstraction layer, the executive, device drivers, and environment subsystems. The picture at left displays an architectural diagram of Windows NT.

The Kernel

The kernel is the core of the Windows NT operating system. It is a dispatcher, not a scheduler, and is responsible for handling events within the system. Note that this process is very complex and it's difficult to characterize specific performance numbers for interrupt delivery time or dispatch timing. The Windows NT kernel is fairly lightweight╤it efficiently performs a limited set of functions, freeing CPU cycles for other processing. These functions would be of little interest to a traditional application program; for instance, the kernel neither knows nor cares about file I/O. Still, the primitives offered by the kernel are the foundation of the operating system services used by applications.

Hardware Abstraction Layer (HAL)

Windows NT is designed to run with a variety of CPUs and hardware platforms. This places a heavy burden on the kernel to efficiently reconcile kernel processing with the need to handle interrupts, cache management, memory handling, register assignments, and other hardware-specific implementations. To solve this portability issue, Windows NT isolates the kernel code from the hardware using an isolation layer referred to as the Hardware Abstraction Layer or HAL. The HAL presents a "virtual machine" to the kernel, executive, and device drivers. It maps this virtual machine onto the underlying hardware in an efficient manner and eliminates the need for Windows NT to provide hardware specific kernels, which improves overall efficiency. The HAL presents a single mechanism for device driver and kernel components to use on any hardware platform.

Example: In Intel-based systems, device drivers use the INP and OUTP instructions to directly access the I/O Port Registers. Other CPU architectures use different mechanisms for accessing device I/O registers. Windows NT resolves this difference with macros (read_port_uchar and write_port_uchar) that do the right thing for each supported CPU.
The Windows NT Executive

The Windows NT Executive provides services that allow the operating system to perform operations that may span various systems or managers and kernel operations. It provides services to user applications, subsystems, and some device drivers. The executive includes many systems and managers, each of which fulfills a particular function. In traditional mini-computer operating systems these services are known as system services. In Windows NT, major systems include: the Cache Manager, Security Monitor, Object Manager, network access, and other functions. The I/O management and process management routines are probably of most interest to real-time engineers. The I/O system has a rich set of I/O operations that are exported to other components. These operations range all the way from traditional, synchronous buffered read-and-write operations up to high speed buffer-mapped asynchronous I/O operations. Except for creation of the I/O channel itself, all internal I/O operations in Windows NT are asynchronous╤that is, they are not expected to be complete upon return from the I/O operation request. This is a major break from mainstream operating systems, and is a major reason for Windows NT's responsiveness to user inputs and interrupts. Within Windows NT, user applications are defined as processes. Windows NT is a pre-emptive, multi-tasking operating system that allows multiple processes (i.e., applications) to run within the system at the same time. A process has a number of properties, including the priority of the process, that are associated with it. Each process maintains a private address space to ensure that it will not interfere with other processes. Each process has associated with it, within the same address space, one or more threads where each thread represents an independent portion of that process. Threads are independently scheduled by the executive based on their priority. There is also a single system process that runs all device drivers, the kernel, and the executive. These components share a single address space. A device driver or the kernel can create a new system thread at any time. This technique of running a thread within the context of the system, where it has direct access through the HAL to device hardware might be of interest to real-time engineers.

Device Drivers
Device drivers in Windows NT are kernel-level code that extend the capabilities of the kernel and executive to control new devices or, in some cases such as File Systems, that provide new services to user- level components. Generally, these services are very constrained and consist of nothing more than the ability to use a new device of an already supported kind. However, device drivers for totally new types of devices can be written and integrated into the system. Windows NT also has a rich set of DMA handling support routines; it is beyond the scope of this paper to go into them in any depth, but they support conventional DMA as well as scatter-gather DMA.

Environment Subsystems

Subsystems in Window NT are used to provide user environments for applications. Examples of Windows NT subsystems are the Windows 32 subsystem and the POSIX subsystem. Each of these subsystems provides a set of primitives that are specific to that user environment, built upon the primitives provided by the Windows NT executive and kernel.


















Previous Page    Home    Next Page