Linux 0.11 memory address space concept

Source: Internet
Author: User

In Linux 0.11 kernel, when performing address ing, we need to first distinguish the three addresses and their transformation concepts:
A. Virtual and logical address of the Program (process); B. Linear address of the CPU; C. Actual physical memory address.
A virtual address is an address generated by a program consisting of a segment selection character and an offset address in the segment.
Because the addresses composed of these two parts are not directly used to access the physical memory, they need to be processed or mapped through the address translation mechanism.
0 640 K 1 m
Kernel module High-Speed Buffer
Primary memory area of the Virtual Disk
Memory and bios Rom
It corresponds to the physical memory address, so this address is called a virtual address. The virtual address space is mapped by the gdt global address space and by the LDT
The local address space of the ing. The index part of the selector is represented by 13 BITs, plus one bits that distinguish gdt from LDT,
Therefore, Intel 80x86 CPUs can index A total of 16384 selector characters. If the maximum length of each segment is 4 GB, the maximum virtual address space is used.
The value range is 16384*4G = 64 t.
A logical address is a segment-related offset generated by a program. In intel protection mode
It refers to the offset address within the maximum length of the code segment that the program executes (assuming that the code segment and data segment are exactly the same ). The application programmer only needs to work with the logical address.
Segment and paging mechanisms are completely transparent to him and are only involved by system programmers.
Linear address is the intermediate layer between Logical Address and physical address transformation, and is the memory space that the processor can address.
An address in a linear address space. The program code will generate the logical address, or the offset address in the segment, plus the base of the corresponding segment
The address generates a linear address. If the paging mechanism is enabled, linear addresses can be transformed to generate a physical address. If
If the paging mechanism is not enabled, linear addresses are physical addresses. Intel 80386 linear address space is 4 GB.
Physical address refers to the address signal indicating the addressing physical memory on the CPU external address bus, which is the address
The final result address of the transformation. If the paging mechanism is enabled, linear addresses are converted to physical addresses using the items in the page Directory and page table.
If the paging mechanism is not enabled, the linear address directly becomes a physical address.
Virtual Memory refers to the amount of memory displayed on a computer that is much larger than the actual memory. Therefore, it allows
The sequencer compiles and runs programs with much larger memory than the actual system. This allows many large projects to have limited memory resources
System implementation. An appropriate analogy is that you don't need a long track to drive a train from Shanghai to Beijing. You only need
Long enough rails (for example, 3 kilometers) can complete this task. The method is to immediately overlay the rails behind the train.
A train can run on a complete track if your operations are fast enough to meet your requirements. This means that the virtual memory management needs to be completed.
. In the Linux 0.11 kernel, each program (process) is divided into a virtual memory with a total capacity of 64 MB. Therefore, the program
The logical address range of is 0x0000000 to 0x4000000.
Sometimes we call logical addresses as virtual addresses. Because it is similar to the concept of virtual memory space, the logical address is also in the physical
Memory capacity is independent.

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.