摘要: 针对Linux 系统在内存管理方面实时性支持不够的问题,设计一种提高Linux 内存管理实时性的方案。从3 个方面改进Linux 系统内存管理的实时性,包括建立内存映射来减少用户态和内核态之间的模式转换,将内存锁定避免换页操作,改进系统原有的内存管理算法来消除内存操作的不确定性。改进后的内存管理算法基于分区管理和最佳适配的原理,时间复杂度为O(1)。实验结果表明,该方案可以提高Linux 内存管理的时间性能,特别是在内存使用紧张的环境下效果更加明显,性能提高率可达49. 5% ,能够满足实时性的要求。
关键词:
Linux 系统,
实时性,
内存映射,
内存锁定,
内存管理算法,
分区管理
Abstract: To the problem of imperfection in real-time property of memory management under Linux system,this paper
designs a solution to improve the timeliness. It works in three aspects:establishing a mapping relationship between virtual address and physical address to reduce the switch between the user mode and kernel mode,locking memory to avoid page exchanging,improving the original algorithm of memory management to remove the nondeterministic operations. The modified memory management algorithm is based on the principle of partitioned management and best fit,whose time complexity is O(1). Experimental results show that this solution is a good way to improve the performance of memory management,in the environment of memory tension,its effect is more obvious,and performance improvement rate can reach 49. 5% . It meets the requirement of real-time.
Key words:
Linux system,
real-time property,
memory mapping,
memory locking,
memory management algorithm,
partitioned management
中图分类号:
王兆文,蒋泽军,陈进朝. 一种提高Linux 内存管理实时性的设计方案[J]. 计算机工程.
WANG Zhao-wen,JIANG Ze-jun,CHEN Jin-chao. A Design Scheme for Improving Real-time Property of Memory Management in Linux[J]. Computer Engineering.