2 个虚拟地址何时可以映射到同一个物理地址? [英] When could 2 virtual addresses map to the same physical address?

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

问题描述

这里有一个操作系统/计算机架构问题.我正在阅读有关缓存的内容,关于如何虚拟索引缓存是减少地址转换时间的一种选择.我遇到了以下情况:

An operating system/computer architecture question here. I was reading about caches, about how virtually indexing the cache is an option to reduce address translation time. I came across the following:

"Virtual cache difficulties include:
    Aliasing
        Two different virtual addresses may have the same physical address."

我想不出什么情况会发生这种情况.自从我的 O/S 天以来已经有一段时间了,我正在画一个空白.

I can't think of a scenario when this can occur. It's been a while since my O/S days and I'm drawing a blank.

有人可以举个例子吗?谢谢

Could someone provide an example? Thanks

推荐答案

两个进程可能有一个共享的mapping.例如,在 Unix 中,可执行代码通常映射到执行同一程序的所有进程之间共享的区域.(事实上​​,一个单个进程可能有多个相同底层内存的映射,例如当它mmap两次是同一个文件时.)

Two processes might have a shared mapping. E.g., in Unix, executable code is typically mapped into a region shared between all processes that execute the same program. (In fact, a single process might have several mappings of the same underlying memory, e.g. when it mmap's the same file twice.)

这篇关于2 个虚拟地址何时可以映射到同一个物理地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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