简体   繁体   English

IPC与消息传递

[英]IPC with Message Passing

I'm looking for suggestions on possible IPC mechanisms that I can implement in my self-made OS for an AVR32 board. 我正在寻找有关可能的IPC机制的建议,我可以在我自制的AVR32板操作系统中实现。

My current choice is implementing the massage passing mechanism described in the books written by Tanenbaum. 我目前的选择是实施Tanenbaum所着书中描述的按摩传递机制。

Is this a good choice? 这是一个不错的选择吗? Are there easier way to implement IPC? 是否有更简单的方法来实施IPC?

Thanks 谢谢

My suggestion is to review the message passing primitives that QNX RTOS (www.qnx.com) supports before making any decisions. 我的建议是在做出任何决定之前,先查看QNX RTOS(www.qnx.com)支持的消息传递原语。 I spent several years programming a complex multi-process system in that environment, and it stands out as the best message-based O/SI have ever encountered. 我花了几年时间在该环境中编写复杂的多进程系统,并且它是最好的基于消息的O / SI所遇到的。

Some specific points that spring to mind (it's been a while now): 想到的一些具体要点(现在已经有一段时间了):

  1. Message data copied between process memory space by the kernel so that a bug in one process cannot affect another. 内核在进程内存空间之间复制消息数据,以便一个进程中的错误不会影响另一个进程。
  2. Ability to send and block for a reply. 能够发送和阻止回复。
  3. Ability to drop a message on a queue and move on immediately. 能够将消息放入队列并立即继续。
  4. Ability to send a message an block indefinitely until the receiver responds; 能够无限期地发送一个消息,直到接收者响应; the receiver may receive and process other messages in the meantime - this is way more valuable than you at first think it will be. 接收者可以在此期间接收和处理其他消息 - 这比您最初认为的更有价值。

也许ZeroMQ项目可以替代你?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM