生成内核模式线程 - Windows
我需要在设备驱动程序中以 DISPATCH_LEVEL 或较低的 IRQL 执行密集处理。
- 如何创建内核线程?
- 它以什么 IRQL 运行?我能控制这个吗?
- 是如何安排的?因为我在这里从用户模式的角度思考,它以什么优先级运行?
- 我可以使用哪些内核函数来提供锁定/同步?
I have intensive processing that I need to perform in a device driver, at DISPATCH_LEVEL or lower IRQL.
- How do I create a kernel-thread?
- What IRQL does it run at? Can I control this?
- How is it scheduled? Because I am thinking from a user-mode perspective here, what priority does it run at?
- What kernel functions can I use to provide locking / synchronization?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 this 创建系统线程 正如您所看到的,它的参数之一是一个可以保存自定义代码的启动例程 - 在其中您可以使用 KeRaiseIrql 和 KeLowerIrql。默认情况下,线程将在 PASSIVE_LEVEL 下运行。 “锁、死锁和同步”是一篇关于同步的非常有用的论文在 Windows 内核中,每个需要修改 Windows 内核的人都应该阅读或至少浏览一下它
you can create system thread with this As you can see one of its parameters is a start routine which can hold custom code - in it you can use KeRaiseIrql and KeLowerIrql. By default threads will run in PASSIVE_LEVEL. "Locks, Deadlocks, and Synchronization" is a very helpful paper regarding synchronization in kernel on windows and everyone who has to do some tinkering with the windows kernel should read or at least skim it