基于ARM的嵌入式Linux的内存优化技术研究与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着计算机技术和信息通信技术的不断发展,信息化时代的脚步已经越来越快。在这个大背景下,由于嵌入式系统在抗老化、防颠簸、极端环境试验中比其他架构的类似系统有着明显的优势,故在我军的“高、精、尖”领域大量装备部队,且由于Linux的开源性,较其他系统的黑箱模式安全性更强,故基于ARM的嵌入式Linux系统成为这个潮流中的主流产品。但由于设计方面的特殊需求,如在内存管理模式上照搬桌面Linux的模式,则不能在内存使用效率上达到最优化。
     本研究课题从Linux的内核着手,从进程管理,通信管理,内存管理三大主要方向对其进行关键技术的解析,特别对内存管理进行模型分析,从用户内存管理器、进程虚拟内存管理器、物理内存管理器、内核缓冲区管理器五部分对其进行研究,分别在系统启动时,系统运行时的代码段、数据段、bss段、栈段、堆段,ARM硬件相关,用户体验四大方向对基于ARM的嵌入式Linux系统提出一个内存优化方案。同时,对堆栈的优化中的页面置换算法进行改进,在Linux Kernel中添加一个RgScanProcess(int itime, int imemory, int ipid, int imode)进程调用和对扫描程序kswapd进程进行规避系统主要任务进程所需内存空间的设计,形成一个页面置换算法的LRU改进算法,从而实现对系统的内存优化。
     最后,实现上述内存优化方案和改进算法,通过试验验证其有效性。利用三种样本进程模拟系统本身无序的进程运行流程,得出测试结果,结果表明课题相关改进对基于ARM的嵌入式Linux内存优化有一定的借鉴意义。
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.
引文
[1]赵炯. Linux内核完全剖析——基于0.12内核[M].北京:机械工业出版社, 2009.1.
    [2]毛德操,胡希明. Linux内核源代码情景分析(上下册) [M].浙江:浙江大学出版社, 2001.9.
    [3]郭玉东.Linux操作系统结构分析[M].西安:西安电子科技大学出版社, 2002.1.
    [4]史芳丽,周亚莉. Linux系统中虚拟文件系统内核机制研究[J].陕西师范大学学报(自然科学版), 2005年01期:26~30.
    [5]罗嘉,薛涛,龚光华. uClinux上的应用程序设计[J].单片机与嵌入式系统应用, 2002:75~78.
    [6] HELEN CUSTER. Windows NT技术内慕[M].程渝荣译,北京:清华大学出版社1993.7.
    [7]邹思轶.嵌入式Linux设计与应用[M].北京:清华大学出版社, 2002.
    [8]白伟平,包启亮.基于ARM的嵌入式Boot Loader浅析[J].微计算机信息, 2006:23~26.
    [9]吴娴.嵌入式Linux文件系统的设计与实现[J].计算机工程与应用, 2005:32~37.
    [10]林建民.嵌入式操作系统技术发展趋势[M].计算机工程, 2001.9.
    [11]林纲,张治辉. Linux内核地址映射机制分析及实现[J].计算机与数字工程, 2005年07期:43~46.
    [12]张立,王茜竹,王朝霞. Linux内核的进程调度原理及改进算法研究[J].后勤工程学院学报, 2006年03期:22~26.
    [13]华蓓,王军星.动态软实时系统介绍及其在Linux下的移植[J].计算机工程, 2006.27:35~39.
    [14]王勇.嵌入式系统原理与设计[M].杭州:浙江大学出版社, 2007.2.
    [15]范学英,张明新,王登磊.嵌入式系统概述[J].自动化技术与应用, 2008, 27(2):114~115.
    [16]李善平,刘文峰,王焕龙,等. Linux与嵌入式系统[M].北京:清华大学出版社, 2003.
    [17]沈连丰.嵌入式系统及其开发应用[M].北京:电子工业出版社, 2005.7.
    [18]李东虎,刁文静.嵌入式操作系统Windows CE的开发与应用[J].计算机与网络, 2006(8):42~44.
    [19]李善平,刘六峰,王焕龙. Linux与嵌入式系统[M].北京:清华大学出版社, 2002.
    [20]肖杰,李仁发,许成.基于uclinux嵌入式系统开发平台的建立[J].科学技术与工程, 2005:53~56.
    [21]慕春棣.嵌入式系统的构建[M].北京:清华大学出版社, 2004.
    [22]许振山,刘峥嵘,张智超,等.嵌入式Linux应用技术开发详解[M].北京:电子工业出版社, 2007.
    [23]周立功,陈明计,陈渝. ARM嵌入式Linux系统构建与驱动开发范例[M].北京:北京航空航天大学出版社, 2006.
    [24]何婷,王岩.嵌入式Linux设备驱动程序实例详解[J].电脑知识与技术, 2007, 10(25):14~18.
    [25]李庆坤.基于uClinux的嵌入式动态Web服务器的设计[D].湖北:武汉理工大学, 2007.
    [26]杨波,许成,李仁发.嵌入式Linux上的CAN设备驱动程序的设计[J].科学技术与工程, 2004:33~37.
    [27] Etxebarria A, Oleaqordia I, and Sanchez M. Telelaboratory: Real-time remote access in Internet[M].Computer and Computational Engineering in Control, 1999.
    [28] Kevin Dankwardt. Real-Time and Linux[M]. Part 2: The preemptible Kernel. Embedded Linux Journal, 2002,18(8).
    [29] Williams T. Designers looking for the road to distributed real-time systems[M]. Computer Design. 2003.9.
    [30] Salem Hashnaoui, Oussema Kallel, Ridha Kbaier. An implementation of a proposed modificat- ion of CAN protocol on CAN fieldbus controller component for supporting a dynamic priority policy[M]. Industry Applications Conference, 38th IAS Annual Meeting, 2003,(1).
    [31] Yu-Kyoung Sung, Byung-Hun Hwang, Jung-Shik Kong, Bo-Hee Lee, Jin-Geol Kim. Industrial Electronics Society[C]. IECON 30th Annual Conference of IEEE 2004,(3):247~252.
    [32] Jean-Luc Scharbarg, Marc Boyer, Chiristian Fraboul. CAN-Ethernet Architectures for Real-Time Applications[C]. IEEE International Conference on Emerging Technlogies and Factory Automation (ETFA), Italy, IEEE Computer Press, 2005:240~250.
    [33] Salem Hasnaoui, Ossema Kallel, Ridha Kbaier. An Implementation of a Proposed Modification of CAN Protocol on CAN Fieldbus Controller Component for Supporting a Dynamic Priority[C]. IEEE Press, 2002:23~31.
    [34] SSV Software Systems. Web Server for Embedded System[Z]. http://www.Dilnetpc.com, 2002.
    [35] Larry Doolittle and Jon Nelson. Boa Introduce[Z]. http://www.boa.org, 2006:34~54.
    [36] John Catsoulis.嵌入式硬件设计(徐君明等译) [M].O'REILLY&中国电力出版社.2004.6.
    [37] Klaus Wehrle,Frank Pahlke, etal. The Linux Networking Architecture:Design and Implementation of Network Protocols in the Linux Kernel[M].Prentice Hall. 2004.
    [38] Richard Stallman,Roland Pesch,Stan Shebs.Debugging with gdb-The gnu Source-Level Debugger[M].Free Software Foundation. 2004.
    [39] David Seal.ARM Architecture Reference Manual[M],2nd AddisonWesley.2000.
    [40] Ravi Gupta.Linux 2.6 for Embedded Systems-Closing in on real time[M].RTC Magazine, 2003.
    [41] Hanzalek Z, Schmieder E, and Wenzel P. Creation of the laboratory for fieldbus-based automation systems[M]. Computer Standards & Interfaces, 1999(21):128~129.
    [42] Le Yang, Peng Yang, Aiying Tian and Xin Guo. Research on Multi-Parameter Physiological Monitor Based on CAN Bus[M]. IFMBE Proceedings,2008,19.
    [43] Michael Owens. The Definitive Guide to SQLite[M]. New York:Apress,2006.
    [44] Andrew S.Tanenbaum, Maarten van Steen[M]. DISTRIBUTED SYSTEMS:Principles and Paradigms. 2006.9.
    [45] Fuggetta A,Picco G P,Vigna G.Understanding Code Mobility[J].IEEE Transactions on Software Engineering,1998:145~173.
    [46] Vinoski S.RPC Under Fire[J].IEEE Internet Computing,2005.9:65~87.
    [47] Dissanaike S,Wijkman P,Wijkman M.Utilizing XML-RPC or SOAP on an Embedded System[C]//Proc.of Distributed Computing Systems Workshops, 2005:145~162.
    [48] Ganssle, Jack G. The art of designing embedded systems[M].北京:人民邮电出版社, 2009.
    [49]éric Lacombe, Frédéric Raynal, Vincent Nicomette. Rootkit modeling and experiments under Linux [M].Journal in Computer Virology, 2008.5.
    [50] Leffer,S.J, McKusick, M.K., Quarterman,J.S. The Design and Implementation of The 4.4BSD Operating System[M].机械工业出版社, 2002.
    [51] Dennis C. Lee, Patrick J. Crowley, and Jean- Loup Baer.Execution Characteristic of Desktop Applications on Windows NT, In Proceedings of the International Symposium on Computer Architecture[M]. June 1998.
    [52] S. M. Hand, Self-Paging in the Nemesis Operating System[M].Proceedings of the third symposium on Operating systems design and implementation, 1999.
    [53] Charles D. Cranor . Design and Implementation of the UVM Virtual Memory System, Ph.D. thesis[M].Department of Computer cience Washington University St. Louis, MO 63130 , 1998.
    [54] Charles D. Cranor ,Gurudatta M. Parulkar . The UVM Virtual Memory System[M]. 1999 USENIX Annual Technical Conference, Monterey, California, June 6-11, 1999.
    [55] Mohit Aron, Yoonho Park, rent Jaeger, Jochen Liedtke, Kevin and Luke The SawMillFramew ork for Virtual Memory Diversity[M].Australian Computer ScienceCommunications , January 2001, 23(4).
    [56] Manuel Urbano-Cuadrado, M.D. Luque de Castro, Miguel Angel Gomez-Nieto, Trigger-based concurrent control system for automating analytical processes[M]. Trends in Analytical Chemistry, 2004, 23(5).