摘要
选择不同的进程间通信方法将直接影响系统的通信效率,而通信效率的高低又会影响实时系统的整体性能。针对当前主流的双内核强实时Linux系统——实时应用接口系统中最常使用的进程间通信方法进行了详细的分析、比较和测试。对不同方法在收发相同大小的数据时所需要的时间进行比较,结果表明:当数据量较小时,差别并不明显;当数据量增大到一定程度后,共享内存表现出极大的优势,邮箱略优于实时管道。因此在实际应用中应根据需要进行选择。若系统侧重性能,就选择共享内存,否则就用简单易用的实时管道或邮箱。
IPCs selection will directly affect communication efficiency of the system which is crucial to overall performance of the real-time system. Focused on the most frequently used IPCs of the current mainstream dual-core strong real-time Linux systems RTAI, this paper presented detailed performance analysis, overall comparison and test of IPCs. By sending and receiving the same data size in different ways to compare the time required, we found that when the data is small the difference is not obvious. However, when the data size increases to a certain extent, the shared memory showed great advantage, then mail is a little bit better than real-time pipeline. So in practical applications, we should choose a suitable IPC according to the need. If the system focused on performance, we use shared memory, or use the convenient Real-Time FIFOs or mailbox.
出处
《成都信息工程学院学报》
2010年第4期366-369,共4页
Journal of Chengdu University of Information Technology