操作系统,Unix
基于此事实,该进程处于用户模式或内核模式,我想问当用户模式下的进程无法访问 uarea 时,如何将虚拟地址映射到物理地址。
The process is in either user mode or kernel mode based on this fact i want to ask that how process in user mode can map virtual address to physical address when it has no access to uarea.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
用户模式进程不应该知道物理地址。这就是虚拟内存的全部意义。
编辑:
您似乎在问用户空间程序如何知道将其数据放在哪里。事实并非如此。它假装拥有整个地址空间(x86 上为 0-4GB),操作系统会执行任何必要的地址转换,让进程假装拥有整个地址空间。
A user-mode process isn't supposed to know about physical addresses. That's the whole point of virtual memory.
EDIT:
It seems you're asking how a userspace program knows where to put it's data. It doesn't. It pretends it has the whole address space (0-4GB on x86) and the Operating System does whatever address translation is necessary to let the process pretend that.