Windows Driver Fundamentals (iii) Windows system Fundamentals

Source: Internet
Author: User

Windows Driver Basic Series, reproduced please indicate the source: http://blog.csdn.net/ikerpeng/article/details/38778375


Windows Runtime Mode: User mode and kernel mode

Windows is generally divided into: kernel mode and user mode, Intel's I386 series CPU logic concept has 4 privileged layers: RING0 (highest privilege), Ring1,ring2,ring3. Kernel mode runs on RING0, and user mode runs on Ring3.

Windows components running under kernel mode are secure (the driver is running on this ) and are not exposed to malicious attacks, and programs running in user mode are unsafe and vulnerable to attack.

The driver runs under kernel mode and has the highest permissions. so there is no other protection , so it is very careful to write the driver, which is likely to cause the system to crash directly.


The architecture of the Windows operating system:

Modern operating systems are designed on the basis of layered thinking. is generally the "client-server" structure.


Windows architecture diagram (Iker production)

The WIN32 subsystem is the purest Windows subsystem that provides a large number of APIs. The application implements the operation of the computer by calling it. And most of the WIN32 subsystem APIs are implemented through NATIVEAPI. the settings for NATIVEAPI are based on version compatibility considerations. It enters into kernel mode by means of software interrupts.


Here are a few important concepts:


Virtual Memory Management: The concept of virtual memory is introduced into Windows, and then the physical memory and virtual memory are associated with some kind of mapping. Each process has 4G of virtual memory, which is then divided into two parts: the first half, 0~0x7fffffff as the user-mode address, and the second half as the kernel-mode address. In addition, Windows specifies that the virtual memory in memory mode is mapped in the same way that the data at the top of the kernel-mode address is consistent .

I/O Manager: Responsible for initiating I/O requests and managing these requests. Whether the port reads and writes, the access to the keyboard, or the operation of the disk file is unified as an IRP (I/O Request Packages). The driver is responsible for the completion of these IRP.


The driver is the appropriate action after receiving these IRP requests.


The end of this section.


Bibliography:


A detailed description of the Windows driver Development technology


Windows Driver Fundamentals (iii) Windows system Fundamentals

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.