User mode and kernel mode

Source: Internet
Author: User

https://msdn.microsoft.com/zh-cn/library/windows/hardware/ff554836

The processor in the computer running Windows has two different modes: User mode and kernel mode. Depending on the type of code running on the processor, the processor switches between two modes. The application runs in user mode, and the core operating system components run in kernel mode. Multiple drivers run in the kernel mode, but some drivers run in user mode.

When you start a user-mode application, Windows creates a "process"for the application. The process provides a dedicated "virtual address space" and a dedicated "handle table"for the application. Because the application's virtual address space is private, an application cannot change data that belongs to other applications. Each application runs in isolation, and if an application is corrupted, the damage is limited to that application. Other applications and operating systems are not affected by this corruption.

The virtual address space of a user-mode application is limited in addition to the private space. A processor that is running in user mode cannot access the virtual address reserved for that operating system. Restricting the virtual address space of a user-mode application prevents application changes and may damage critical operating system data.

All code running in kernel mode shares a single virtual address space. This means that the kernel-mode driver does not separate from the other drivers and the operating system itself. If the kernel-mode driver unexpectedly writes the wrong virtual address, data that is part of the operating system or other drivers may be corrupted. If the kernel-mode driver is corrupted, the entire operating system is corrupted.

This figure illustrates the communication between a user-mode component and a kernel-mode component.

Actually read here, we will think, then the virtual address space is how to allocate it? Take a look at the next section.

User mode and kernel mode

Related Article

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.