摘要: 为提高异构系统下网络通信的实时性,提出一种跨平台的实时TCP / IP 协议栈(RTTCP / IP)实现方法。运用操作系统适配技术屏蔽底层数据处理的差异性,增强协议栈的可移植性和可扩展性;通过简化TCP / IP 协议栈的结构,减少协议栈对系统资源的占用;采用内存映射技术,将内核空间地址映射到用户空间,避免用户与内核间的数据拷贝操作;引入基于时分多址的介质访问机制和数据包优先级策略,防止网络传输冲突,解决数据包优先级倒置问题。测试结果表明,RTTCP / IP 实现方法能够减少系统开销和通信延迟,提高系统实时性和稳定性。
关键词:
TCP / IP 协议栈,
实时性,
通信协议,
内存管理,
数据包优先级,
介质访问
Abstract: In order to improve the real-time performance of a heterogeneous communication system,this paper proposes
a cross-platform Real-time TCP / IP(RTTCP / IP) protocol stack. It introduces an OS independent layer in RTTCP / IP to shield the difference of system-level data processing to provide a good portability and extensibility. It simplifies the standard TCP / IP in RTTCP / IP so that less system resources are demanded,which makes RTTCP / IP a light-weight protocol stack. It avoids duplicating the data packets while delivering the data within the RTTCP / IP protocol stack,and it attempts to adopt a TDMA MAC in the RTTCP / IP protocol stack to avoid communication collisions. Besides, to guarantee the emergency data can be processed in the foreseeable period of time,it introduces a priority mechanism to tackle the thread,or packet,priority reversing problem. Test results show that the RTTCP / IP implementation method can reduce the system overhead and communication delay,and improve system real-time performance and stability.
Key words:
TCP / IP protocol stack,
real-time,
communication protocol,
memory management,
packet priority,
media access
中图分类号: