内核进程如何异步发送一些数据到用户级进程

发布于 2024-11-01 22:29:19 字数 119 浏览 1 评论 0原文

我在一次采访中被问到这个问题。但我唯一能想到的就是分配一个共享内存段,并通过某种方式将内核和用户级进程写入该段。即使我对这个答案不满意。有人可以吗请解释一些其他机制来做到这一点? 任何帮助将不胜感激。

问候,

I was asked this question in an interview.But the only thing I could think of is allocating a shared memory segment and by some means both kernel and user level processes to write to that segment.Even I am not satisfied with that answer.Can someone please expalin some other mechanism to do so?
Any help will be appreciated.

Regards,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

倥絔 2024-11-08 22:29:20

我认为他们可能想了解 NetLink 接口。该接口为内核进程和用户进程提供了一个API,通过它看起来就像一个套接字,并且被认为是ioctl的继承者,它更易于使用和异步。

此处概述:http://www.linuxjournal.com/article/7356

I would think they probably wanted to hear about the NetLink Interface. This interface provides an API for a kernel process and user process to communicate through which looks just like a socket, and is considered a successor to ioctl which is easier to use and asynchronous.

Overview here: http://www.linuxjournal.com/article/7356

人间不值得 2024-11-08 22:29:20

他们可能想了解 APC (异步过程调用)。

They probably wanted to hear about APC (Asynchronous Procedure Call).

青瓷清茶倾城歌 2024-11-08 22:29:20

使用 proc 文件作为消息传递机制怎么样?它可以从内核和用户空间访问吗?

How about having a proc file as message passing mechanism. It can be accessible from both kernel and user space?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文