使用哪种Linux IPC技术? [英] Which Linux IPC technique to use?

查看:78
本文介绍了使用哪种Linux IPC技术?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们仍处于项目的设计阶段,但我们正在考虑在嵌入式Linux内核上具有三个独立的进程.其中一个过程是通信模块,该模块处理通过各种介质往返于设备的所有通信.

We are still in the design-phase of our project but we are thinking of having three separate processes on an embedded Linux kernel. One of the processes with be a communications module which handles all communications to and from the device through various mediums.

其他两个过程将需要能够通过通信过程发送/接收消息.我正在尝试评估Linux提供的IPC技术.其他进程将发送的消息的大小将有所不同,从调试日志到流媒体,速率约为5 Mbit.另外,媒体可以同时流进和流出.

The other two processes will need to be able to send/receive messages through the communication process. I am trying to evaluate the IPC techniques that Linux provides; the message the other processes will be sending will vary in size, from debug logs to streaming media at ~5 Mbit rate. Also, the media could be streaming in and out simultaneously.

您会为该应用建议哪种IPC技术? http://en.wikipedia.org/wiki/Inter-process_communication

Which IPC technique would you suggestion for this application? http://en.wikipedia.org/wiki/Inter-process_communication

如果处理器发生任何变化,则处理器的运行速度约为400-500 Mhz. 无需跨平台,仅Linux即可. 需要使用C或C ++实现.

Processor is running around 400-500 Mhz if that changes anything. Does not need to be cross-platform, Linux only is fine. Implementation in C or C++ is required.

推荐答案

我会选择Unix域套接字:比IP套接字(即无机器间通信)的开销要少,但除此之外也很方便.

I would go for Unix Domain Sockets: less overhead than IP sockets (i.e. no inter-machine comms) but same convenience otherwise.

这篇关于使用哪种Linux IPC技术?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆