存储在通用寄存器中的内存地址是相对的吗?
Are the memory addresses stored in the general purpose registers relative?
当程序在通用寄存器中存储内存地址时,该地址 local/virtual 是进程的地址吗?
两个完全不同的程序做不同的事情是否可能将相同的内存地址加载到通用寄存器中?
CPU 使用虚拟地址。如果两个不同的进程在寄存器中放置相同的虚拟地址,这无关紧要,因为每个虚拟地址都会转换为不同的物理地址(在 OS* 的帮助下)。
*更多详情:
OS 负责在一个特殊寄存器中分配一个地址,该地址指向地址转换的开始 table。 table(及其地址)对于每个进程都是唯一的。
Are the memory addresses stored in the general purpose registers relative?
没有。它们是平行的。 内存管理单元将一种地址翻译成第二种地址。
When a program stores a memory address within a general purpose register is that address local/virtual to the process?
这只是GPR中的一个值。该值可用于访问用户进程中的 虚拟地址 地址。该地址对于每个进程都是唯一的。
Is it likely that two completely different program doing different things would load the same memory address into the general purpose registers?
两个不同的程序可以使用 GPR 中的相同地址来访问两个不同的物理内存位置。从虚拟地址到物理地址的地址转换由MMU.
完成
计划 1:
Virtual address ^ Physical address
0x04000000 = 0x00001234
计划 2:
Virtual address ^ Physical address
0x04000000 = 0x12345678
两个进程的虚拟地址相同。
物理地址不是。
两者之间的差异由 MMU 处理,MMU 将一个翻译成另一个每个进程。
当程序在通用寄存器中存储内存地址时,该地址 local/virtual 是进程的地址吗?
两个完全不同的程序做不同的事情是否可能将相同的内存地址加载到通用寄存器中?
CPU 使用虚拟地址。如果两个不同的进程在寄存器中放置相同的虚拟地址,这无关紧要,因为每个虚拟地址都会转换为不同的物理地址(在 OS* 的帮助下)。
*更多详情: OS 负责在一个特殊寄存器中分配一个地址,该地址指向地址转换的开始 table。 table(及其地址)对于每个进程都是唯一的。
Are the memory addresses stored in the general purpose registers relative?
没有。它们是平行的。 内存管理单元将一种地址翻译成第二种地址。
When a program stores a memory address within a general purpose register is that address local/virtual to the process?
这只是GPR中的一个值。该值可用于访问用户进程中的 虚拟地址 地址。该地址对于每个进程都是唯一的。
Is it likely that two completely different program doing different things would load the same memory address into the general purpose registers?
两个不同的程序可以使用 GPR 中的相同地址来访问两个不同的物理内存位置。从虚拟地址到物理地址的地址转换由MMU.
完成计划 1:
Virtual address ^ Physical address
0x04000000 = 0x00001234
计划 2:
Virtual address ^ Physical address
0x04000000 = 0x12345678
两个进程的虚拟地址相同。
物理地址不是。
两者之间的差异由 MMU 处理,MMU 将一个翻译成另一个每个进程。