节点文献
基于ARM的嵌入式Linux的内存优化技术研究与实现
The Memory Optimization Techniques and Implementation of Arm_based Embedded Linux
【作者】 吴懿;
【导师】 章勇;
【作者基本信息】 南京航空航天大学 , 计算机科学与技术, 2011, 硕士
【摘要】 随着计算机技术和信息通信技术的不断发展,信息化时代的脚步已经越来越快。在这个大背景下,由于嵌入式系统在抗老化、防颠簸、极端环境试验中比其他架构的类似系统有着明显的优势,故在我军的“高、精、尖”领域大量装备部队,且由于Linux的开源性,较其他系统的黑箱模式安全性更强,故基于ARM的嵌入式Linux系统成为这个潮流中的主流产品。但由于设计方面的特殊需求,如在内存管理模式上照搬桌面Linux的模式,则不能在内存使用效率上达到最优化。本研究课题从Linux的内核着手,从进程管理,通信管理,内存管理三大主要方向对其进行关键技术的解析,特别对内存管理进行模型分析,从用户内存管理器、进程虚拟内存管理器、物理内存管理器、内核缓冲区管理器五部分对其进行研究,分别在系统启动时,系统运行时的代码段、数据段、bss段、栈段、堆段,ARM硬件相关,用户体验四大方向对基于ARM的嵌入式Linux系统提出一个内存优化方案。同时,对堆栈的优化中的页面置换算法进行改进,在Linux Kernel中添加一个RgScanProcess(int itime, int imemory, int ipid, int imode)进程调用和对扫描程序kswapd进程进行规避系统主要任务进程所需内存空间的设计,形成一个页面置换算法的LRU改进算法,从而实现对系统的内存优化。最后,实现上述内存优化方案和改进算法,通过试验验证其有效性。利用三种样本进程模拟系统本身无序的进程运行流程,得出测试结果,结果表明课题相关改进对基于ARM的嵌入式Linux内存优化有一定的借鉴意义。
【Abstract】 With the computer technology and information and communication technology continues to evolve, the information age has become increasingly a faster pace. Embedded system in anti-aging、anti-bump、the extreme environmental testing have a distinct advantage than similar systems in other structure, so in our military these have a large number of troops using the embedded system. And because the open source nature of Linux over other systems and has more security than other black-box mode, ARM-based embedded Linux system has become the mainstream of this trend in the product. However, due to their special needs in the design, the model of memory management in Linux on the desktop can not achieve its best efficiency.The research studies the Linux kernel in three main directions of the techniques which are process management、communications management and memory management. Particular, we are from five parts of memory management, which are memory management device from the user, the process virtual memory manager, physical memory manager and the kernel buffer manager, to study it. Giving proposed memory optimization of ARM-based embedded Linux system in four aspects, system startup, the code segment、data segment、bss segment、stack segment and stack segment when the system is running, ARM hardware related, the direction of the user experience. Also, we improve the page replacement algorithm of the stack, in the Linux Kernel, adding a RgScanProcess (int itime, int imemory, int ipid, int imode) process calls and designing the system Memory that scanner kswapd processes needs to avoid the process of the main tasks of the system, in this way we format a LRU page replacement algorithm in order to achieve the optimization of the system memory.Finally, to verify the above algorithm’s effectiveness we do some experiments, using three samples of the process to simulate system’s disorder process. The results show that the improvement for the ARM embedded Linux-based memory optimizations have some reference.
【Key words】 Embedded System; ARM; Linux; Memory Optimization; Kernel call; Page replacement; LRU; kswapd;