一种基于arm9的嵌入式web服务器内存优化算法
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着无线网络在生活中的应用,生产生活将会越来越便利,人们可以想象出的便利将通过无线网络远程控制技术得以实现。而对于无线网络设备来讲,其硬件环境以及内存容量与一般网络设备比较差距较大,需要更为优秀的软件算法的支持来平衡这种不足。
     本文主要工作是在CSRm前端智能控制器AT91RM9200上的嵌入式操作系统ARM-Linux平台上,自行设计开发了内存域优化管理算法-EWMO,以期能够提高CSRm前端智能控制器的反应速度。通过深入理解嵌入式系统动态内存技术思想,对已有的常用内存管理算法进行研究和分析,比较不同算法的优劣,并在此基础上结合其优点,提出一种嵌入式WEB服务器内存域优化管理算法,使其提高整体系统的控制反应速度,同时更为有效的避免内存泄露的问题。无线网络设备内存容量较一般网络设备小的多,并且对于实时性和安全性的要求又特别高,所以算法以及数据结构的设计中不仅要设计尽量小的代码段来节省内存空间,同时又要保证程序执行时的稳定性和实时性。传统的内存申请方式是直接通过malloc函数或者new运算来申请内存的,但通过这种方式申请内存会增加内存碎片的产生,内存分配效率很低。相较于传统内存分配方式,内存域的管理分配模式能够在很大程度上减少内存碎片的产生比提高内存分配效率。
     最后对方案实际测试的结果达到了以上的要求,证明方案高效、正确、可行。
With the application of the wireless network in the life, production and life will become more convenient, the convenience people can imagine can be achieved by the remote control technology of the wireless network. Because as for the hardware environment and the memory capacity, there is big gap between the equipment of the wireless network and the equipment of the general network, we need the support of the better software algorithms to balance the shortfall.
     The efforts of this paper are designing and developping the optimization management algorithm of the memory domain-EWMO, which is based on the platform of the front CSRm intelligent controller on the AT91RM9200 ARM-Linux embedded operating system. The aim of the algorithm is explorating to improve the response speed of the front end CSRm intelligent controller by researching the optimization of the memory. Through deep understanding of the dynamic memory technology of the embedded systems and through research and analysis of the advantages and disadvantages of the memory management algorithms that have been commonly used, this paper proposed an optimized memory domain management algorithm based on the embedded WEB server, which can make it more effective to avoid memory leak. Because Memory capacity of the wireless network equipment is smaller than that of the usual network equipment, and the wireless network have higher requirements for real-time and safety, the designs of algorithms and data structures are as small as possible not only to save memory space, at the same time to ensure the stability and the real-time needs of program execution. The traditional ways of the application for the memory are using the malloc functions or directly using the new operator, which will increase the memory fragmentation, and decrease the efficience of the memory allocation Compared to the traditional ways of memory allocation, the management allocation model of memory domain can largely reduce the memory fragmentation and improve the efficiency of memory allocation.
     Finally, the actual test results show this algorithm achieves the above requirements, and the program is proved effective, correct and feasible.
引文
[1]李满丽.复杂嵌入式系统内存管理方案的研究与实现.厦门大学硕士论文,2008
    [2]杨林愉,李杠刚,摊素萍,方佳.基于ARM 9的嵌入式Web服务器研究.计算机测量与控制,2008.16(12)
    [3]符意德.嵌入式系统设计原理及应用.第一版.清华大学出版社,2004.11:1-20
    [4]田泽.嵌入式系统开发与应用教程.第一版.北京航空航天大学出版社,2005:105-210
    [5]灵翔.嵌人式系统设计与应用开发[M].第一版.北京:航空航天大学出版社,2006
    [6]Woo Hyong Lee, J. Morris Chang, An interated dynamic memory tracing tool for C++ Information Sciences 151(2003)27-49
    [7]Heikki Verta, Titos Saridakis,. Detection of Heap Management Flaws in Component-Based Software. Proceeding of the 30th EUROMICRO Conference(EUROMICRO'04)
    [8]Mark S. Johnstone and Paul R. Wilson. The memory fragmentation problem:Solved In International Symposium on Memory Management, Vancouver, B.C., Canada,1998.
    [9]Doug Lea. A memory allocator. http://g. oswego. edu/dl/html/malloc.html.
    [10]曾非一,桑楠,熊光泽.嵌入式系统内存管理方案研究[J].单片机与嵌入式系统应用,2005.1:5-7
    [11]卢春鹏.一种嵌人式系统的内存分配方案[J].单片机与嵌入式系统应用,2002.12
    [12]魏镇韩,赵洪华,陈鸣.C/S系统演化为B/S系统的策略和技术.计算机科学,2004.31(9):126-129
    [13]沈胜庆.嵌入式操作系统的内核研究[J].微计算机信息,2006.2(2):72-74
    [14]董庆丰,黄迪明.一种适用于嵌入式系统的动态内存管理技术[J].微型机与应用,2004.8:52-54
    [15]Abrahamsilberschatz等.郑扣根译.操作系统概念.第六版[2].北京,高等教育出版社,2004
    [16]BrianW. Kernighan等著,徐宝文等译,C程序设计语言(第2版新版)[Z]北京:机械工业出版社,2008
    [17]王为青等.C语言高级编程及实例剖析[Z]人民邮电出版社,2007
    [18]覃国蓉.基于B/s架构的软件项目实训.电子工业出版社,2004.9:20-50
    [19]RandalEBryant著.龚奕利等译.深入理解计算机系统[2].北京,中国电力出版社,2008
    [20]王帅,王铮.Linux2.6内存管理反向映射分析与改进[J].电脑知识与应用,2006.8:50-53
    [21]Yi Feng and Emery D. Berger. A Locality-Improving Dynamic Memory Allocator, 2005 ACM 1-59593-147-3/05/06
    [22]Emery D. Berger, Benjamin G. Zorn, Kathryn S. McKinley. Reconsidering Custom Memory Allocation,2002 ACM 1-58113-417-1/02/0011
    [24]Scott Meyers. Effective C++. Addison-Wesley,1996.
    [25]RFC2616 Hypertext Transfer Protocol - HTTP/1.1
    [26]实时操作系统内存分配性能检测.上海市计算机软件评测重点实验室.http://www. sstl. org. cn/
    [27]王铮,李志军.一种适用嵌入式系统的自适应动态内存管理管理方案[J].计算机技术与发展,2007.3:48-51
    [28]Woo Hyong Lee, J.Morris Chang. An interated dynamic memory tracing tool for C++ Information Sciences,151.2003.27-49
    [29]Heikki Verta,Titos Saridakis. Detection of Heap Management Flaws in Component-Based Software. Proceeding of the 30th EUROMICRO Conference(EUROMICRO'04)
    [30]吴民,涂奉生.linux下面向函数的动态内存泄漏监测.计算机工程与应用,2003.6
    [31]BrianW. Kernighan等.徐宝文等译.C程序设计语言(第2版新版)[Z]北京,机械工业出版社,2008
    [32]P. R. Wilson, M. S. Johnstone, M. Neely, and D. Boles. Dynamic storage allocation:A survey and critical review. Lecture Notes in Computer Science.986.1995
    [33]Windows下动态内存分配方式.http://dotnet. chinaitlab. com/VCNET/722313.html
    [34]刘文涛、胡家书.嵌入式Web服务器的分析与研究.单片机与嵌入式系统应用,2002.9:7-9
    [35]陈渝、李明、杨晔等.源码开放的嵌入式系统软件分析与实践-基于SkyEye和ARM开发平台.北京:北京航空航天大学出版社,2004:136-138
    [36]马忠梅、李善平、叶楠等.ARM&Linux嵌入式系统教程.北京,北京航空航天大学出版社,2004.10:5-119
    [37]杨波、赵辉、贾燕.LINUX下的WEB服务器技术.西安:西安电子科技大学出版社,2001.97-110
    [38]慕春棣.嵌入式系统的构建.清华大学出版社,2004:36-112
    [39]陈颐,秦贵和,徐华中等.ARM9嵌入式技术及Linux高级实践教程.北京航天航空大学出版社,2005:69-89
    [40]严蔚敏,吴伟民.数据结构(C语言版)[2].北京:清华大学出版社,2002
    [41]于以序.嵌入式软件开发平台内存管理软件的设计与实现[D].成都:电子科技大学硕士论文,2004

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700