当前位置:网站首页>《双内核实时系统下各个进程间通信方法的性能分析和测试》
《双内核实时系统下各个进程间通信方法的性能分析和测试》
2022-06-22 05:19:00 【Jia ming】
[1]冯蕴,杨斌.双内核实时系统下各进程间通信方法的性能分析和测试[J].成都信息工程学院学报,2010,25(04):366-369.
Linux 内核由于任务调度、中断处理等还不能满足强实时应用的需要,所以实时性要求较高的应用需要通过对 Linux 内核进行实时改造达到强实时性要求,强实时 Linux 补丁 RTAI 就是一款较成功的改造方法。强实时环境下的 IPCs 是系统设计实现过程中的重要系统功能且与普通 Linux 有诸多不同,涉及到非实时任务之间、实时任务与非实时任务、实时任务之间的多种交互方式。IPCs: RT-FIFOs、共享内存和邮箱。
实时 Linux 中的主要 IPCs 方法
进程间通信描述了活动进程或任务间不同的消息传递方法,同时也包含了各种形式的数据同步方法。Linux 提供了标准的 System V IPC 供用户进程传递和共享数据,它们是 FIFOs、共享内存、信号量和管道。尽管如此,这些 Linux IPC 机制不能用于实时系统。
RTAI 提供了一套额外的 IPC 机制用于在实时和 Linux 用户空间域的任务和进程之间传递或共享数据。这些机制包括RTFIFOs、共享内存、邮箱、信号量以及RPCs(远程过程调用)。
RT-FIFOs
一个 RT-FIFO 是一个单通道的读写缓存,用于任务和进程间的异步数据传递。多用于实时任务和 Linux 进程之间的通信,也可以用于实时任务之间的通信或 Linux 进程之间的通信,主要有以下特性:
- 数据以字节流的形式顺序写入RTFIFO一端,在另一端按写入的先后顺序对其进行读操作,典型的,固定大小的数据结构被写到FIFO,但在有些情况下,可变大小的消息被写入,此时,需要搜索边界信息。
- 一个RTFIFO可以对称地用于内核空间和用户空间,一边打开写,另一边打开读。且在RTFIFO变满之前写进程向其缓存增加数据而不必等待读进程就绪。
- RTFIFO 被看作文件系统中的 /dev/rtfx 设备。
- RTFIFO支持多个读者和写者,并且支持超时读写。
除了以上特性之外,RTFIFO还支持信号量同步、支持事件通知的异步信号、支持/proc文件系统接口等。
邮箱
邮箱服务允许进程间的消息在需要时能够在一个优先级队列里自动地存储和检索。邮箱是RTAI中最灵活的 IPCs 方法。
- 它能够被明确地安装来接收指定大小的信息。
- 多个发送者和接收者可以被连接到同一邮箱。邮箱里的消息被取走的顺序取决于接收者的优先级。
- 当大量消息需要发送,该服务提供的函数允许进程仅仅发送消息的一部分,其中这部分被存储在邮箱里,返回未发送的字节数,或者继续发送直到所有的消息被接收。
共享内存
允许在不同的实时任务和 Linux 进程之间共享内存,该服务是对称的,首次分配做一个真正的分配,任何随后在Linux进程中使用相同名字的分配调用,仅仅映射到用户空间的区域或者返回相关的指向已分配的内核空间的指针。
- 数据不排队,数据结构里不同大小的个别项可以被更新,而不需要顺序存取。
- 共享内存没有点对点的限制,共享内存能被任意数量的 Linux 进程或实时任务读写。
- 不支持同步阻塞,要确定数据是否是最新的,数据必须包含一个计数用来与以前的读进行比较或者使用其他的握手机制。
- 不保证Linux和实时Linux进程的相互排斥,即不保证互斥访问。
边栏推荐
- Contents of 2022 tea master (intermediate) examination and tea master (intermediate) examination
- JSON,字符串,map之间的互转
- VirtualBox 6.1.34 release
- What is cloud hosting and what are its advantages?
- rambbmitmq推送方
- long start = currentTimeMillis();
- Get jedis from jedissentinelpool
- Analysis of T elevator repair in 2022 and simulation test questions of T elevator repair
- Kubernetes——裸机搭建集群环境
- Use keytool to access the JKS file get SSL certificate
猜你喜欢

使用选择法对十个整数进行排序
![[camp] at the beginning, improve [leopard] power - vivo activity plug-in management platform](/img/75/6a129de59c21b783622ba31f77f647.jpg)
[camp] at the beginning, improve [leopard] power - vivo activity plug-in management platform

Start with the strategy of small market value factor, and take you into quantitative investment (with the strategy of 77.83% annualized return)

2022 refrigeration and air conditioning equipment operation test paper and refrigeration and air conditioning equipment operation test skills

Tidb performance overview panel

Graduation feedback! All contributors of Apache Doris community come to receive gifts!

6. Local - custom filter factory

Flynk deployment mode summary

Using Matplotlib to realize GUI interaction effect
![[chrome] Google tips Google browser comes with scrolling screenshot (full screen shot)](/img/9b/6ad704959a77abf9cb28fdd33b81b5.png)
[chrome] Google tips Google browser comes with scrolling screenshot (full screen shot)
随机推荐
Idea创建方法时,使用注解提示方法参数(param)、返回值(return)、方法作用(Description)
Six sides tmall has already offered. After a review of my experience, is it really that difficult to enter a big factory?
In 2022, the super intern plans to make a breakthrough in the offer of it famous enterprises, and the nine high salary skills help the dream of famous enterprises
MySQL day01 class notes
Tidb performance overview panel
1108. Defanging an IP Address
Use of jedispool
冰河十年前的预测如今被阿里实现了,非常震撼
数据库---基础知识
Detailed explanation of deep learning technology for building an image search engine that can find similar images
Restframework read and non read sequence processing
MySQL day03 class notes
Some considerations of C language custom function
CS 611 Game
Which methods are not allowed to be overridden?
restframework读取和非读取序列处理
DTS迁移秘籍-MySQL篇
图扑软件2D与2.5D案例合集|智慧园区、数据中心、SMT 生产线...
Squoosh - 谷歌出品的免费开源图片压缩工具,图片大小减少90%!支持 API 开发调用
Monorepo silk slide methodology: reference module hot update