The concept of high-end memory and low-end memory in Linux "turn"

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/hdujinhuihui/article/details/8686817

High-end memory is an important concept in Linux, a concept that was very confusing when it came to Linux. In fact, this concept is relatively simple, understanding the concept, it is necessary to trace the memory management of Linux.

Previously, the address bus for the CPU was only 32 bits. 32 of the address bus, both logically and physically can only describe the 4G address space, in the physical theoretically up to 4G memory (in addition to the IO address space, the actual memory capacity is less than 4G), the logical space can only describe the linear address space 4G. In order to make reasonable use of 4G space, Linux employs a 3:1 strategy, that is, the kernel occupies 1G of linear address space, the user occupies 3G of linear address space. So the address range of the user process from 0~3g, the kernel address range from 3g~4g, that is, kernel space can only manage 1G of memory. For such a tense linear address resource, kernel space and user space of wanton partition, resulting in memory management problems: When the physical memory is greater than 1G, the kernel linear address space is less than the actual physical memory capacity, how the kernel to achieve greater than 1G of memory management? In this case, you need to mention the kernel space-to-memory management method. On the one hand, in order to improve the management efficiency of kernel space to memory, on the other hand, in order to simplify the kernel space memory management method, the kernel uses the linear mapping method to realize the memory management, from the Linux implementation method, the physical address and the kernel's virtual address is only an offset. Therefore, when physical memory is greater than 1G, physical memory does not fully map to the kernel linear address space, which creates the problem.

As can be seen from the above description, the address space greater than 1G memory area called high-end memory, in the same vein, less than 1G of memory area called low-end memory. The management of high-end memory requires a non-linear mapping, for which a 128M space is reserved in the kernel linear address space, at the high end of the linear address space. Today, the address bus of the CPU expands to 64 bits, the linear address resource is very rich, so, can give the kernel space to reserve enough linear address resource, in the most recent time, the contradiction between the kernel linear address resource and the physical memory capacity is no longer outstanding, the concept of high-end memory disappears on the 64-bit CPU.

The concept of high-end memory and low-end memory in Linux "turn"

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.