Kernel Mode environment composition of Win2k OS

Source: Internet
Author: User

The kernel-mode environment has actually implemented a general underlying software platform for the operating system. The kernel mode environment consists of three main code modules.
1. Hardware Abstraction Layer (Hal, hardwareabstractlayer)
The hardware abstraction layer (HAL) is a thin layer of software. It is an interface between hardware and other parts of the operating system, and an abstraction of physical hardware resources. Hal is implemented through the dynamic link library (DLL, dynamcilinklibrary). device drivers using Hal routines can have the same CPU
System Structure Platform to achieve binary code compatibility.
2. kernel (kemel)
If Hal represents the abstraction of the hardware platform, the kernel is the nerve hub of the entire operating system. It provides mechanisms for managing the following functions: interrupt and exception handling, thread scheduling and synchronization, multi-processor synchronization, timed control, and kernel objects. Through these kernel services, the upper part of the operating system can ignore the architecture of the underlying CPU. The kernel provides an object-based interface. Kernel objects can be divided into two categories: scheduler objects and control objects. Because the scheduler object is mainly responsible for synchronization performance and changes or affects thread scheduling, device drivers seldom use such objects. However, it is often used to control the behavior control objects of the operating system in some way. For example, the system thread used by the device driver belongs to the scheduler object, and the call and interrupt objects of the delay process belong to the control object.
3. Executive)
Executive is actually composed of several different software modules. They are completely independent and communicate only through defined interfaces. Executive provides services for user-mode processes and communication between them.
(1) System Service Interface (SSI, System Service Interface)
Because Win2k OS provides hardware-privileged protection measures, user-mode applications cannot directly perform operations on the underlying layer, such as directly operating memory units or directly accessing peripherals. However, as an operating system, the user mode program must have some permissions to perform underlying operations. To solve this problem, the System Service Interface provides a solution from user mode to Kernel Mode Controlled path.
In Win2k OS, the system service scheduler uses a CPU-based hardware exception mechanism technology to provide user mode code with access to exeuctive services. The communication between the two modes is better solved.
(2) Object Manager (OM, objeetmnaager)
The execution body provides services to user-mode processes through an object-based interface. These execution objects represent objects such as files, processes, threads, and memory segments. The Object Manager manages all the work of the execution body object, including creating and deleting objects, and recording the number of pending references to the specified object.
(3) Configuration Manager (CM, configurationmnager)
From the driver developer's perspective, the main task of the Configuration Manager is to use the registry database to maintain the model of all hardware and software resources installed on the machine.
(4) Process Manager (PM, poreessmnaager)
A process is the unit of resource record and security check in Win2k OS. Each process has its own virtual address space and security identifier. PM processes the creation, management, and destruction of processes and threads.
(5) Security Reference Monitor (sqm, security quote Monitor)
This component enforces system security policies. The driver generally does not deal with it. The fo manager handles this kind of work before calling any routine in the driver.
(6) Virtual Memory Manager (vmm, virtualmemory Manager)
The task of vmm is to use the on-demand paging virtual memory management technology to maintain the address space image. From the driver developer's point of view, it is responsible for maintaining the heap space of the system. In Win2k OS, A vmm task is to manage and maintain a 4 GB virtual address space for each process.
(7) Local process controller (LPC)
LPC is a message transmission mechanism used for communication between processes on the same machine. LPC is mainly used by protected subsystems and their customer programs. device drivers do not have access to the LPC mechanism. Therefore, we do not need to care about LPC when developing device drivers.
(8) I/O manager (I/O manager)
Developers of the device driver must have an understanding of the I/O manager in the executive component because it is inseparable from the driver. The actuator component converts I/O requests from user mode and kernel mode threads to calls in the appropriate sequence of various driver routines. The I/O manager provides a set of well-defined interfaces, which makes communication between drivers, user-mode programs, and other kernel-mode programs easier. At the same time, the I/O manager can communicate with all drivers in the same way. In driver development, we only need to know the Calling Interface of the I/O manager, rather than how the I/O manager deals with other executive components.
(9) plug-and-play Manager (PNPM, Plug and Play Manager)
The PnP Manager consists of the core-mode PnP Manager and the user-mode PnP Manager. The core-mode PnP Manager interacts with operating system components and kernel drivers to dynamically maintain, configure, and manage devices. The user-mode PnP Manager interacts with the user-installed components to configure
Set and install the device. The user-mode PnP Manager also interacts with the application.
(10) Power Manager (PM, Power Manager)
The Power Manager is responsible for managing the power usage of the system, maintaining a power strategy within the system, and transferring the path in the system using powerl. The Power Manager determines the status of the system-light sleep, deep sleep, close or operate normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.