关于kernel object的问题!!帮忙
最近正在看programming applications with microsoft windows这本书,以前对于这些知识所知太少!!
呵呵,汗!
问题如下:
主要是我对下面这一段话,不是很理解,原文贴上
Because the kernel object data structures are accessible only by the kernel, it is impossible for an application to locate these data structures in memory and directly alter their contents. Microsoft enforces this restriction deliberately to ensure that the kernel object structures maintain a consistent state. This restriction also allows Microsoft to add, remove, or change the members in these structures without breaking any applications.
If we cannot alter these structures directly, how do our applications manipulate these kernel objects? The answer is that Windows offers a set of functions that manipulate these structures in well-defined ways. These kernel objects are always accessible via these functions. When you call a function that creates a kernel object, the function returns a handle that identifies the object. Think of this handle as an opaque value that can be used by any thread in your process. You pass this handle to the various Windows functions so that the system knows which kernel object you want to manipulate. We'll talk a lot more about these handles later in this chapter.
To make the operating system robust, these handle values are process-relative. So if you were to pass this handle value to a thread in another process (using some form of interprocess communication), the calls that this other process would make using your process's handle value would fail.
-----------------------------------------------------------------------------------
1.既然核心对象只能由核心层进行管理,那么为什么句柄又和进程相关呢(To make the operating system robust, these handle values are process-relative.)为什么这样就具有鲁棒性啦?
2.还有核心对象和核心(kernel)究竟应当怎么理解呢?这本书还提到file也是核心对象,怎么我感觉我可以操作它啊,以该文的意思,我必须得通过句柄访问,不可以直接进行操作吗?
呵呵,谢谢。
呵呵,汗!
问题如下:
主要是我对下面这一段话,不是很理解,原文贴上
Because the kernel object data structures are accessible only by the kernel, it is impossible for an application to locate these data structures in memory and directly alter their contents. Microsoft enforces this restriction deliberately to ensure that the kernel object structures maintain a consistent state. This restriction also allows Microsoft to add, remove, or change the members in these structures without breaking any applications.
If we cannot alter these structures directly, how do our applications manipulate these kernel objects? The answer is that Windows offers a set of functions that manipulate these structures in well-defined ways. These kernel objects are always accessible via these functions. When you call a function that creates a kernel object, the function returns a handle that identifies the object. Think of this handle as an opaque value that can be used by any thread in your process. You pass this handle to the various Windows functions so that the system knows which kernel object you want to manipulate. We'll talk a lot more about these handles later in this chapter.
To make the operating system robust, these handle values are process-relative. So if you were to pass this handle value to a thread in another process (using some form of interprocess communication), the calls that this other process would make using your process's handle value would fail.
-----------------------------------------------------------------------------------
1.既然核心对象只能由核心层进行管理,那么为什么句柄又和进程相关呢(To make the operating system robust, these handle values are process-relative.)为什么这样就具有鲁棒性啦?
2.还有核心对象和核心(kernel)究竟应当怎么理解呢?这本书还提到file也是核心对象,怎么我感觉我可以操作它啊,以该文的意思,我必须得通过句柄访问,不可以直接进行操作吗?
呵呵,谢谢。
...全文
相关推荐
kernel—based object tracking
### Kernel-Based Object Tracking#### 概述Kernel-Based Object Tracking是一种用于非刚性物体跟踪的新方法,该方法在视觉跟踪领域具有重要的应用价值
OOPS,kernel panic问题解决方法
本文档深入探讨了在Linux内核中遇到"OOPS"和"kernel panic"问题时的定位与解决方法。OOPS(Operation Offloading Out Of Supervision)是内核
Windows Kernel Internals - Object Manager-计算机科学
"Windows Kernel Internals - Object Manager"在Windows操作系统中,内核对象管理器(Object Manager)是实现系统核心功能的关键组件之一。
Kernel-based object tracking
本文是一篇关于非刚体目标跟踪的开创性文章,文章标题为“Kernel-based object tracking”,作者包括Dorin Comaniciu、Visvanathan Ramesh和Peter
Unsupervised Salient Object Segmentation Based on Kernel Density Estimation and Two-Phase Graph Cut
Unsupervised Salient Object Segmentation Based on Kernel Density Estimation and Two-Phase Graph Cut


