不同进程的相同虚拟地址如何映射到不同的物理地址 [英] How are same virtual address for different processes mapped to different physical addresses

查看:101
本文介绍了不同进程的相同虚拟地址如何映射到不同的物理地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我参加了有关操作系统设计和概念的课程,现在我正在尝试彻底研究 Linux 内核.我有一个无法摆脱的问题.在现代操作系统中,每个进程都有自己的虚拟地址空间 (VAS)(例如,32 位系统中的 0 到 2^32-1).这提供了许多优点.但在实施中,我在某些方面感到困惑.我举个例子来解释一下:

I have taken a course about Operating System design and concept and now I am trying to study Linux kernel thoroughly. I have a question that I cannot get rid of. In modern operating systems each process has own virtual address space(VAS) (eg, 0 to 2^32-1 in 32-bit systems). This provides many advantages. But in the implementation I am confused at some points. Let me explain it by giving an example:

假设我们有两个进程 p1、p2;p1 和 p2 有自己的 VAS.一个地址0x023f4a54映射到不同的物理地址(PA),怎么可能?如何以这种方式完成此翻译.我的意思是我知道转换机制,但我不明白当涉及到不同进程的地址空间时,相同的地址被映射到不同的物理地址.

Let's say we have two processes p1, p2; p1 and p2 have their own VASes. An address 0x023f4a54 is mapped to different physical addresses(PA), how can it be? How is done this translation in this manner. I mean I know translation mechanism but I cannot understand that same address is mapped to different physical address when it comes different processes' address space.

0x023f4a54 in p1's VAS => PA 0x12321321
0x023f4a54 in p2's VAS => PA 0x23af2341 # (random addresses)

推荐答案

感谢所有回答.我不知道的实际问题是不同进程的相同虚拟地址如何不与彼此的物理通信者发生冲突.我在下面的链接中找到了答案,每个进程都有自己的页表.

Thanks for all answers. The actual point that i dont know is that how same virtual address of different processes does not clash with each other's physical correspondent. I found the answer in the link below, each process has its own page table.

http://tldp.org/LDP/tlk/mm/memory.html

这篇关于不同进程的相同虚拟地址如何映射到不同的物理地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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