基于ARM的嵌入式Web服务器的研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着计算机技术的发展,嵌入式系统已成为计算机领域的一个重要组成部分。以ARM体系结构设计的微处理具有高性能、低功耗和低成本的特点,它广泛应用于嵌入式系统设计领域,是目前最广泛的32位微处理器。广义讲,凡是带有微处理器的专用软硬件系统都可以称为嵌入式系统。
     Internet的发展,使得B/S方式成为一种时尚,大部分网络应用系统都是以这种B/S方式与网络用户交换信息。B/S的基础是客户端要有一个浏览器程序,服务器端要有一个与之对应的Web服务器。显然,Web服务器在B/S方式下起着决定性的作用。因此,一般互联网站都采用功能强大的通用Web服务器。但是,对于一般的管理信息系统或中小型应用系统,所需的Web服务功能比较简单,如果仍然采用大型的通用Web服务器,无疑是一种资源的浪费。解决方法是使用功能相对简单、体积更小、消耗资源更少的简单Web服务器,于是嵌入式Web服务器就应运而生了。
     由于访问嵌入式Web服务器的用户的增加,嵌入式Web服务器的访问量和数据流量也随之迅速增长,要求的处理能力和计算强度也相应增大。单个嵌入式Web服务器受到处理能力的限制,有可能无法满足大访问量的需求,很可能会成为网络访问的新瓶颈。在这种情况下,提出了采用多个嵌入式Web服务器为一个应用服务的嵌入式Web服务器集群负载均衡技术。嵌入式Web服务器集群系统具备高可用性和负载均衡性,并且易于扩展,成为解决这一问题的最佳方法。
     本课题主要研究了基于ARM9的嵌入式Web服务器的软、硬件设计及其实现,其中硬件部分的核心是三星的S3C2410X处理器,是基于ARM920T内核的RISC型CPU,软件部分则采用了源代码开放的Linux操作系统。硬件部分主要对ARM微处理器、硬件系统的整体结构、器件选型、各接口电路的设计及硬件平台的调试进行了相应的介绍;软件部分则主要介绍了开发环境的构建、启动程序Vivi的移植、Linux内核的移植、Socket编程、嵌入式Boa Web服务器移植及实现等。同时,研究了嵌入式Web服务器负载均衡算法,主要内容包括集群、负载均衡的简介,嵌入式Web服务器集群的负载均衡的算法的提出和实现等。
With the computer technology development, embedded system has become an important constituent of the computer domain. As the character of the high capability, the low power loss and the low cost by ARM system structural design microprocessor, it widely applies to the design domain of the embedded system, and is the widest 32 microprocessors present. Generally, any special software and hardware system with the microprocessor is allowed to be called embedded system.
     With the development of Internet, the B/S (Browser/Server) way has become prevent, the majority of networks application systems were all by this B/S way exchange information with the network user. The foundation of B/S is the customer port must have a browser procedure, and the server port must have the correspondence Web server. Obviously, the Web server is playing the decisive role under the B/S way, so general interconnect website use the function general Web server. But, regarding of the general management information system or the middle and small scale application system, the Web server function which needs is quite simple, if still uses the large-scale general Web server, without doubt which is one kind of resources waste. The solution is using the function relatively simply, the smaller volume, the less consumption resources simple Web server, thereupon, embedded Web server arise at the historic moment.
     Since more and more user visit inserts the embedded Web server, accordingly, the visit quantity and the data current capacity also increase rapidly, the request handling ability and the computation intensity also correspondingly increases. Individual embedded Web server is subject to the limit of the handling ability, has the possibility to be unable to satisfy the request of the big visit quantity, and becomes in all probability the new bottle neck of the network visit. In this kind of situation, we propose embedded Web server load balance technology of adopting several embedded Web server to serve for an application. Embedded Web server cluster systems have the high usability and the character of load balance, easy to expand, and become the best method to solve this question.
     This paper has mainly developed the software, hardware design and realization of the embedded Webserver based on ARM. The core of hardware part is S3C2410X processor produced by Samsung, which CPU is the RISC style based on ARM920T kernel. The software part has adopted Linux operating system which the source code is opened. The hardware part mainly introduced ARM microprocessor, the total construction of the hardware system, the apparatus choice, each connected electrocircuit designing and hardware platform debugging. While the software part discussed the development environment constructing, the starting procedure Vivi, the transplant of Linux kernel, Socket programming, the transplant of embedded Boa Webserver and realization and so on. At the same time, it has researched the arithmetic of embedded Web server load balance, and the main contents included the brief introduction of cluster and load balance, the proposing and realization of the arithmetic of embedded Web server cluster's load balance.
引文
[1] 符意德编著.嵌入式系统设计原理及应用.北京:清华大学出版社,2004.11:1~20
    [2] 田泽编著.嵌入式系统开发与应用教程.北京航空航天大学出版社,2005:105~210
    [3] 覃国蓉编.基于B/S架构的软件项目实训.电子工业出版社,2004.9:20~50
    [4] 杨和东.基于LVS的网站服务器群的负载均衡.现代图书情报技术,2001年第4期P1-3
    [5] 孙天泽.嵌入式设计及Linux驱动开发指南—基于ARM9处理器.北京:电子工业出版社,2005.7:37~56
    [6] AleSSandro Rubini. Jonathan Corbet. Linux device driver. O'ReillyPress, 2005
    [7] ZiLOG, Inc. Introduction to Embedded Webservers [D]. http: //www.zilog.com/docs/ez80,2002
    [8] 范国闯,钟华,黄涛,冯玉琳.Web应用服务器研究综述.软件学报,2003.14(10):1728~1739
    [9] 宋薇薇.群集系统中的几种负载均衡技术.程序员2002年9月
    [10] 詹荣开.嵌入式系统BootLoader技术内幕.(zhanrk@sohu.com)
    [11] M Tim Jones.嵌入式系统TCP/IP应用层协议[M].北京:电子工业出版社,2001
    [12] Warren W Gay.实战Linux Socket编程.西安:西安电子科技大学出版社,2002
    [13] 马忠梅,马广云,徐英慧,田泽编著.ARM嵌入式处理器结构与应用基础.北京航空航天大学出版社,2002:11~60
    [14] 周立功等编著.ARM微控制器基础与实验.广州周立功单片机发展有限公司,2003年8月:31~55
    [15] 杜春雷.ARM体系结构与编程.清华大学出版社,2003年8月:25~60
    [16] Samsung S3C2410X 32-Bit RISC Microprocessor Developer's Manual, 2002. Samsung www.samsung.com
    [17] 王学龙编著.嵌入式Linux系统设计与应用.清华大学出版社,2001:52~99
    [18] 陈赜,秦贵和,徐华中等.ARM9嵌入式技术及Linux高级实践教程.北京航天航空大学出版社,2005:69~89
    [19] 罗蕾.嵌入式实时操作系统及应用开发.北京航空航天大学出版社,2005:105~160
    [20] CS8900A Product Data Sheet. Cirrus Logic, Inc., 1999
    [21] CS8900A Ethemet Controller Technical Reference Manual (AN083). Cirrus Logic Inc., 2001
    [22] 博创科技编著.UP-NETARM2410-S嵌入式系统实验指导书.北京博创兴业科技有限公 司,2005
    [23] 郝永君.嵌入式Linux的研究与应用.西安电子科技大学硕士学位论文,2005年1月
    [24] Toshiyuki Miyachi, Ken-ichi Chinen. Yoichi Shinoda.Automatic configuration and execution of Internet experiments on an actual node-based testbed Testbeds and Research Infrastructures for the Development of Networks and Communities, 2005
    [25] http://www.kernel.org/
    [26] Karim Yaghmour. Building Embedded Linux System. O'REILLY, 2004.12
    [27] ARM Limitd. ARM9TDMI Technical Reference Manual, 1999. Available at www.arm.com
    [28] ftp://ftp.arm.linux.org.uk/pub/arm-linux/toolchain/
    [29] Kirk Zurell著.艾克武等译.嵌入式系统的C程序设计.机械工业出版社,2002:89~108
    [30] 陈利君,冯锐,牛欣源译.Daniel P.Bovet&Marco Cesati著.深入理解Linux内核.中国电力出版社,2004:42~79
    [31] 王成,刘金刚.基于Linux的嵌入式操作系统的研究现状及发展展望.微型机与应用,2004,Vol.5,PP:4-6
    [32] jonesxu, vivi boot loader 的实现(jonesxu@gmail.com)
    [33] Janhoon Lyu. Getting started with VIVI(nandy@mizi.com)
    [34] http://www.mizi.com/developer/vivi/index.html
    [35] Filesystem Hierarchy Standard Reference Manual, aviable at www.pathname.com
    [36] Daniel P. Bovet; Marco Cesati. Understanding the Linux Kernel 2nd Edition. O'Reilly, 2002.2
    [37] 刘伟平,毛玉良,张东卫等.在嵌入式Linux实现JFFS文件系统[J].微计算机信息,Vol.19,No.1:46~47
    [38] 黄布毅,郑安平,陈晓雷,刘国梅.μCLinux下JFFS2文件系统的实现[J].单片机与嵌入式系统应用,2004,5:69~70
    [39] 慕春棣主编.嵌入式系统的构建.清华大学出版社,2004:36~112
    [40] SSV Software Systems. Web Server for Embedded Systems[D]. http://www.Dilnetpc.com.2002
    [41] D. Tabara, H. Rijanto, B. Sabbattini. Embedded Web Technology: Adding aNew Dimension to Protection and Control[J]. ABB Review, 2001
    [42] Behrouz A. Forouzan, Sophia Chung Fegan. TCP/IP 协议族[M].北京:清华大学出版社,2002:
    [43] 王超,胡晨等.嵌入式系统中HTTP协议的实现.电子器件,Vol.25,No.1,March.,2002
    [44] 汤碧玉,曾楠,郑灵翔等.嵌入式系统中基于Web的远程监控设计与实现.厦门大学学 报(自然科学版),2004,05:48-51
    [45] 张曦煌等.嵌入式Web服务器中CGI的特点及实现.小型微型计算机系统.2003,11
    [46] Ling Tan, Zahir Tari. Dynamic Task Assignment in Server Farms: Better Performance by Task Grouping[C]. IEEE Proceedings of the Seventh International Symposium on Computers and Communciations (ISCC'02), 2002: 175-180.
    [47] Garret Swart. Spreading the Load using Hashing: A preliminary Report[C]. IEEE Proceedings of the Third International Symposium on Parallel and Distributed Computing, 2004: 169-176.
    [48] 熊秋华.多机WEB服务器的负载均衡与容错技术研究[学位论文].大连海事大学,2003
    [49] 申志冰.基于Linux的园区网服务器集群中负载均衡和可靠性技术的研究[学位论文].国防科技大学,2003
    [50] 赵征,马光思.负载均衡机制在防火墙中的应用[J].西安建筑科技大学党报,2002,34(4):371-375