虚拟内存:进程一和系统一
本文http://msdn.microsoft.com/ en-us/library/aa366912(v=vs.85).aspx 指出 win32 环境中的虚拟内存(假定为 32 位)一半专用于用户模式进程,一半专用于用户模式进程到内核模式进程。
如果我记得分页,每个进程都应该有自己的地址空间,从 0 到任何值(根据文章,最大为 0x7FFFFFFF)。但是内核驱动程序又如何呢?每个内核驱动程序/程序的内核地址空间都在 0x80000000 到 0xFFFFFFFF 之间吗?
或者我只是错了?
This article http://msdn.microsoft.com/en-us/library/aa366912(v=vs.85).aspx states that virtual memory in a win32 environment (32 bit supposed) half is dedicated to user mode processes, half to kernel mode processes.
If I recall from pagination, every process should have its own address space from 0 to whatsoever (max 0x7FFFFFFF according to the article). But what for a kernel driver? Does every kernel driver/program has its kernel address space from 0x80000000 through 0xFFFFFFFF?
Or I'm just getting wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我相信您的印象是驱动程序是独立的进程;对于整体内核和混合内核(NT 被认为是混合内核),它们不是。将驱动程序视为内核在环 0 中加载到自身中的模块。实际上,它们成为内核的一部分。
该地址空间的部分内容可能会在进程之间发生变化,但大部分内核地址空间将在所有进程之间共享。
I believe that you are under the impression that drivers are separate processes; with monolithic and hybrid kernels (NT is considered a hybrid), they are not. Think of drivers as modules that the kernel loads into itself in ring 0. In effect, they become part of the kernel.
Parts of that address space may change between processes, but most of the kernel address space would be shared between all processes.
据我所知,只有一个内核。 :-)
不过,地址范围似乎没问题,除非系统配置为 3GB 用户空间。
As far as I know, there is only one kernel. :-)
The address ranges seems ok though, unless the system is configured for 3GB user space.
在 Windows 中,内核模式驱动程序驻留在内核中并共享内核的地址空间。
In Windows, kernel mode drivers live in the kernel and share the kernel's address space.