Home > Articles > Operating Systems, Server > Microsoft Servers

  • Print
  • + Share This

User Mode

Software in the user mode cannot access hardware directly. The user mode-protected subsystem has four primary responsibilities:

  • Special system support processes, such as the logon process and the session manager.

  • Windows 2000 services that are server processes, such as the Event Log and Schedule services.

  • Environment subsystems that provide an operating system environment by exposing the native operating system services to user applications. They include Win32, POSIX, and OS/2 subsystems.

  • User applications—either Win32, Windows 3.1, MS-DOS, POSIX, or OS/2.

User applications do not call the native Windows 2000 operating system services directly; instead, they go through subsystem dynamic link libraries (DLLs). The subsystem dynamic link libraries translate a documented function into the appropriate undocumented Windows 2000 system service calls. The protected subsystems are divided into two groups—environment subsystem and integral subsystem—which are described in the following sections.

Environment Subsystem

The environment subsystems are services that provide application programming interfaces (APIs) that are specific to an operating system.

The three environment subsystems are the POSIX, OS/2, and Win32 subsystems. Applications and subsystems form a client/server relationship, in which the applications are the clients and the subsystems are the servers. One of the benefits of this type of architecture is that you can include support for other types of applications to Windows 2000 simply by adding subsystems.

Applications cannot interfere with each other because they run in separate address spaces. Operating system code and data in the subsystems are protected from applications because subsystems also reside in their own address spaces. The Executive shares address space with running processes, but it is protected by the wall between kernel mode and user mode. It is impossible for an application to corrupt code or store data in the Executive because the processor notifies the operating system of invalid memory access before these things occur.

Integral Subsystem

The integral subsystems are services that provide the APIs that Win32 applications call to perform important operating system functions, such as creating windows and opening files. It has five main components, which utilize four main support functions:

  • Process and thread manager. The process manager sees processes as objects. Its responsibility is to create and terminate processes and threads. It also suspends and resumes the execution of threads, and stores and retrieves information about processes and threads.

  • Virtual Memory Manager. The Virtual Memory Manager (VMM) performs three essential functions: managing the virtual address space of each process, sharing memory between processes, and protecting each process's virtual memory. It is also the underlying support for the cache manager. Each processor that Windows 2000 supports implements virtual memory through hardware differently; therefore, the portion of Windows 2000 that directly interfaces with virtual memory hardware is not portable and must be recorded when moving to another platform to minimize headaches. This code is small and well-isolated in Windows 2000. Windows 2000 supports 4GB of virtual memory. According to the Microsoft white paper Windows 2000 Reliability and Availability Improvements, "The upper 2GB is reserved for kernel-mode processes and the lower 2GB is shared by kernel-mode and user-mode processes." Figure 2, also taken from the Microsoft white paper, shows a graphical representation of the Virtual Memory Manager.

  • Figure 2

    Virtual Memory Manager.

  • Security reference monitor. The security reference monitor is responsible for controlling which objects have permissions to which resources. Each object has an Access Control List (ACL) that is queried when the object makes a service request. Access to resources is allowed or disallowed according to the rights the module has in the ACL.

  • I/O system manager. The I/O manager is responsible for dispatching all system I/O requests. All I/O devices, network ports, printers, drives, and so on are mapped to virtual files. These virtual files are referred to as file objects and are managed by the object manager just like any other object.

  • Cache manager. The cache manager improves the performance of file-based I/O by causing recently referenced disk data to reside in main memory for quick access. It also defers disk writing by holding the updates in memory for a short time before sending them to disk.

The support functions are the following:

  • Object manager. The object manager creates, manages, and deletes Executive objects. Executive objects are created in the Executive, and are accessible to the Executive and protected subsystems. They can be thought of as message packets that represent items such as processes, threads, semaphores, and other low-level objects.

  • LPC facility. Local Procedure Calls (LPCs) are used to pass messages between processes running on a single Windows 2000 system. Because LPC message-passing requires quite a bit of overhead, the LPC facility is utilized only when an API must change global data. Otherwise, API routines can be implemented directly in a private Dynamic Link Library (DLL).

  • Run-time library functions. Similar to string processing, arithmetic operations, data type conversion, and security structure processing.

  • Executive support routines. Similar to system memory allocation and interlocked memory access.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.