作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 开发研究与工程应用 • 上一篇    下一篇

一种提高Linux 内存管理实时性的设计方案

王兆文,蒋泽军,陈进朝   

  1. (西北工业大学计算机学院,西安710129)
  • 收稿日期:2013-07-10 出版日期:2014-09-15 发布日期:2014-09-12
  • 作者简介:王兆文(1978 - ),男,工程师、硕士,主研方向:分布式实时嵌入式系统;蒋泽军,教授;陈进朝,博士研究生。
  • 基金资助:
    航空科学基金资助项目(2012ZC53040);国家部委基金资助项目;西北工业大学研究生创业种子基金资助项目。

A Design Scheme for Improving Real-time Property of Memory Management in Linux

WANG Zhao-wen,JIANG Ze-jun,CHEN Jin-chao   

  1. (School of Computer Science,Northwestern Polytechnical University,Xi’an 710129,China)
  • Received:2013-07-10 Online:2014-09-15 Published:2014-09-12

摘要: 针对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

中图分类号: