平面地址空间、线性地址、基地址、有效地址计算有什么区别 [英] What are the differences among flat address space,linear addresses,base address,effective address calculations

查看:49
本文介绍了平面地址空间、线性地址、基地址、有效地址计算有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有这些东西之间有什么区别:平面地址,基址地址,线性地址,有效地址,物理地址,有效地址计算???

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

推荐答案

80x86 既有分段又有分页;其中虚拟地址(该软件使用)被转换为物理地址(该硬件如内存控制器)使用.完整转换:

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:

  • 第一个 CPU 确定有效地址/偏移量(例如,对于像mov eax,[eax+ebx*4+99]"这样的指令,CPU计算结果"eax+ebx*4+99")

  • 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")

然后 CPU 应用分段(通过添加段基地址,在检查段限制后)以获得线性地址.

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

然后 CPU 使用线性地址和页表(和/或 TLB)将线性地址转换为物理地址.

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).

这篇关于平面地址空间、线性地址、基地址、有效地址计算有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆