锐英源软件
第一信赖

精通

英语

开源

擅长

开发

培训

胸怀四海 

第一信赖

当前位置:锐英源 / 英语翻译 / POSIX消息队列
服务方向
人工智能数据处理
人工智能培训
kaldi数据准备
小语种语音识别
语音识别标注
语音识别系统
语音识别转文字
kaldi开发技术服务
软件开发
运动控制卡上位机
机械加工软件
软件开发培训
Java 安卓移动开发
VC++
C#软件
汇编和破解
驱动开发
联系方式
固话:0371-63888850
手机:138-0381-0136
Q Q:396806883
微信:ryysoft

锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。需要全文内容也请联系孙老师。

POSIX消息队列

Description 描述

UNIX systems offers several possibilities for interprocess communication: signals, pipes and fifos, shared memory, sockets, etc. In RTLinux, the most flexible one is shared memory, but the programmer has to use alternative synchronisation mechanism to build a safe communication mechanism between process or threads. On the other hand, signals and pipes lack certain flexibility to establish communication channels between process.

UNIX系统提供了进程间通信的几种可能性:信号,管道和fifo,共享内存,套接字等。在RTLinux,最灵活的一个是共享内存,但是程序员使用替代同步机制建立安全的进程或线程之间的通信机制。另一方面,信号和管道之间建立沟通渠道有复杂的过程,且缺乏一定的灵活性。

In order to cover some of these weaknesses, POSIX standard proposes a message passing facility that offers: 为了弥补这些弱点,POSIX标准提出了一种消息传递设施

• Protected and synchronised access to the message queue. Access to data stored in the message queue is properly protected against concurrent operations. 保护和同步访问消息队列。访问存储在消息队列中的数据被适当保护,以防止并发操作。

• Prioritised messages. Processes can build several flows over the same queue, and it is ensured that the receiver will pick up the oldest message from the most urgent flow. 优先消息。进程可以在同一队列建立几个流,并且它确保了接收机将从最迫切的流拾取最早的消息。。

• Asynchronous and temporised operation. Processes have not to wait for operation to be finish, i.e., they can send a message without having to wait for someone to read that message. They also can wait an specified amount of time or nothing at all, if the message queue is full or empty.
异步和延迟操作。流程不会等待操作完成,即,他们可以发送消息,而无需等待某人阅读这一信息。如果消息队列已满或空,他们还可以等待一个指定的时间或什么都没有。

• Asynchronous notification of message arrivals. A receiver process can configure the message queue to notify him on message arrivals. So such a process can be working on something else until the waited message arrives. 消息到达的异步通知。接收器可以配置消息队列,通知他消息到达。所以这样一个过程可以工作别的,直到等待消息的到来。

Layer 层

POSIX Message Queues is a message passing facility that relies only on services that are already available or that are going to be incorporated by other components to the RTLinux core. As they do not require any modification of the RTLinux, they can be located at the High-Level RTLinux layer.

POSIX消息队列是消息传递工具,只依赖可用的服务,或者是由其他组件合并的RTLinux核心。因为他们不需要任何修改RTLinux,他们可以位于RTLinux层的高层。

API / Compatibility API /兼容性

This components follows the POSIX API specification. The following synopsis presents the list of supported message queue functions:

这个组件遵循POSIX API规范。以下概要中提出了支持消息队列的功能队列:

int mq_close (mqd_t);
int mq_getattr (mqd_t, struct mq_attr *);
int mq_notify (mqd_t, const struct sigevent *);
mqd_t mq_open (const char *, int, ...);
ssize_t mq_receive (mqd_t, char *, size_t, unsigned *);
int mq_send (mqd_t, const char *, size_t, unsigned );
int mq_setattr (mqd_t, const struct mq_attr *, struct mq_attr *);
ssize_t mq_timedreceive (mqd_t, char *, size_t, unsigned *, const struct timespec *);
int mq_timedsend (mqd_t, const char *, size_t, unsigned, const struct timespec *);
int mq_unlink (const char *)

Status 状态

This component is in the first stages of development. An implementation of the basic functionality is currently under testing. The asynchronous notify functionality and the timed send and receive operations are still in its design stage, due to its dependencies with POSIX signals. 该组件是发展在第一阶段的。基本功能的实现目前正在测试。异步通知的功能和定时发送和接收操作都在其设计阶段关闭,因为它的依赖与POSIX信号。

Implementation issues 实现问题

POSIX Message Queues implementation do not require to modify the core RTLinux executive. So implementation issues are only intended for internal structures and algorithms. POSIX消息队列的实现并不需要修改RTLinux核心的执行。所以实现问题只是用于内部结构和算法。

Validation criteria 验证标准

POSIX Message queue performance strongly relies on the performance of synchronisation mechanisms and the system memory bandwidth. POSIX消息队列性能强烈依赖于同步机制的性能和系统存储器带宽 .

友情链接
版权所有 Copyright(c)2004-2021 锐英源软件
公司注册号:410105000449586 豫ICP备08007559号 最佳分辨率 1024*768
地址:郑州大学北校区院(文化路97号院)内