What are the differences among flat address space,linear addresses,base address,effective address calculations
Asked Answered
A

1

1

What are the differences among all these things : flat addresses ,base address , linear addresses , effective addresses, physical address , effective address calculations ???

Amygdalin answered 23/10, 2019 at 7:22 Comment(0)
L
4

80x86 has both segmentation and paging; where virtual addresses (that software use) are converted into physical addresses (that hardware like memory controller) uses. For the full conversion:

  • first CPU determines the effective address/offset (e.g. for an instruction like "mov eax,[eax+ebx*4+99]" the CPU calculates the result of "eax+ebx*4+99")

  • then the CPU applies segmentation (by adding segment base address, after checking segment limit) to get a linear address.

  • then the CPU uses the linear address and page tables (and/or TLBs) to convert the linear address into a physical address.

Note: If the segment base addresses are all always zero (and segment limits are set to max.), then segmentation is effectively disabled (because it does nothing). This is often called "flat addressing" (and is what most operating systems do).

Libau answered 23/10, 2019 at 8:11 Comment(1)
In case it's not obvious: if paging is disabled then linear addresses already are physical addresses. But yes, with paging enabled, it happens after segmentation. Segmentation does not enable using more than 4GiB of memory in a single process's virtual address-space; linear address-space is only 32-bit in 32-bit mode. (64-bit in 64-bit mode.)Divide

© 2022 - 2024 — McMap. All rights reserved.