Memory Address:
Logical Address
Segment + Offset
Linear address
Physical Address
Linux memory addressing is-get physical address from linear address from logical address.
A picture from <understanding the Linux kernel>:
To understand Logical/linear/physical address:
logical addresses (Logical address) are the part of the offset address that is generated by the program that is related to the segment. For example, you can read the pointer variable itself (& operation) in the C language pointer programming, which is actually the logical address, which is relative to the address of the data segment of your current process and is not coherent with the absolute physical address. Only in Intel Real mode will the logical address be equal to the physical address (because there is no fragmentation or paging mechanism for the real mode, the CPU does not perform automatic address translation), and the logic is the offset address of the code snippet in Intel protected mode (assuming that the code snippet, the data segment is exactly the same). The application programmer only has to deal with logical addresses, and the segmentation and paging mechanisms are completely transparent to you, and are only covered by system programmers. While the application programmer can manipulate the memory directly, it will only operate on the memory segments assigned to you by the operating system.
linear addresses (Linear address) are the middle tier between logical addresses and physical address transformations. The program code generates a logical address, or an offset address in a segment, and a linear address is generated with the base address of the corresponding segment. If the paging mechanism is enabled, the linear address can then be transformed to produce a physical address. If the paging mechanism is not enabled, then the linear address is directly the physical address. The Intel 80386 has a linear address space capacity of 4G (2 of 32 address bus addressing).
The physical address is the address signal addressing physical memory that appears on the external address bus of the CPU and is the final address of the address transformation. Physical If the paging mechanism is enabled, the linear address is transformed into a physical address using the items in the page directory and the page table. If the paging mechanism is not enabled, then the linear address becomes the physical address directly.
virtual memory refers to the amount of memory that a computer presents that is much larger than the actual memory it has. So it allows programmers to compile and run programs that are much larger in memory than the actual system. This enables many large projects to be implemented on systems with limited memory resources. A very proper analogy is that you don't need a long track to get a train from Shanghai to Beijing. You only need long enough rails (say 3 km) to complete this task. The way to do this is to put the rear rails immediately in front of the train, as long as your operation is fast enough to meet the requirements, the train will be able to run like a complete track. This is the task that virtual memory management needs to accomplish. In the Linux 0.11 kernel, each program (process) is divided into a total capacity of 64MB of virtual memory space. So the program's logical address range is 0x0000000 to 0x4000000.
From page Http://zhidao.baidu.com/link?url=hjYKY12YZPaMYNR-PQ_aDHNt_ Efpwcxqcjyjjk-p-wtzm4lngofhfiiupxpb2g42hbqjcmfio3nhxuzzuwsphk
Linux Memory addressing