用户名: 密码: 验证码:
基于实时内核的嵌入式网络通信系统研究与设计
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
嵌入式系统是以应用为中心的硬件设计和面向应用的软件产品开发为基
    础的专用计算机系统,广泛应用于制造工业、过程控制、通讯、仪器、仪表、
    汽车、船舶、航空、航天、军事装备、消费类产品等领域。典型的嵌入式应用
    是以微处理器或者微控制器为核心的硬件设计和基于嵌入式实时操作系统的
    软件开发。
     嵌入式实时操作系统开发和嵌入式网络技术应用是非常有前景的两个领
    域,具有深远的理论研究和实践应用价值。本论文的研究课题——基于实时内
    核的嵌入式网络通信系统研究与设计——正是在此背景下提出,开展的工作主
    要体现在三个方面:设计嵌入式实时内核、研究实时任务调度算法、设计基于
    实时内核的嵌入式网络通信子系统。
     嵌入式实时内核ert-kernel(embedded real-time kernel)是本文基于微内核
    体系结构进行设计的实时内核,提供最必要的系统服务:内存管理、进程和线
    程、任务间通信、信号量机制,实现高效精简的内核服务。其设计目标是在资
    源有限的嵌入式系统中保持内核运行开销最小、而性能最佳。因为Intel体系
    结构的嵌入式处理器使用很普遍,而且可以在标准计算机平台实现和调试嵌入
    式软件,并直接移植到嵌入式环境,所以选择x86微处理器作为开发实时内核
    的硬件平台。利用微处理器的硬件特点,本文提出实现内存保护、优化上下文
    转换的方法;并重点研究高效、低开销的信号量实现机制,从而节省上下文转
    换,降低系统软件开销,保证良好的OS性能。
     本文认为基于优先级的抢占式任务调度更适合嵌入式实时多任务环境,对
    单调率(RM)调度和最早时限优先(EDF)调度方法进行分析和研究,采用
    组合的EDF调度和RM调度(CER)方法,保证任务调度的运行时开销和调
    度性开销最小。CER调度根据工作量中任务的时间要求特点,将一部分任务分
    配到动态任务队列,采用EDF调度;将另一部分任务分配到静态任务队列,
    采用RM调度。因此正确划分任务到调度队列是完成CER调度的关键。本文
    研究CER调度开销,并利用调度可行性算法确定工作量中的关键任务。对于
    工作量任务数目增多的情况,本文对CER调度算法进行优化:使用两个动态
    任务队列、一个静态任务队列对工作量进行调度,从而保证良好的调度性能。
    经分析和比较,证明在工作量增加以后,优化的CER调度产生的调度开销更
    小。
    
    
    f。ed,lfgLH/H:NW
    \..、一/u方xRS 工HS卜
     嵌入式设备的iteme连接是嵌人式系统应用的新兴领域,TCPns协议族
     是实现此连接的关键技术。本文在对 BSD 4.3 TCP/IP协议原理及其实现代码进
     行深入研究和分析的基础上,结合嵌入式通信系统应用的特点,提出基于实时
     微小内核的网络通信软件体系结构;对TCPHP协议处理进行优化和简化,将
     传统的层次式内核协议栈在用户空间以单一的平面方式实现,从而使应用程序
     对网络功能的利用,从传统的系统调用转变为函数调用:使用改善数据接触开
     销和非数据接触开销的方法,改善系统开销;并提出报文头预留缓存机制,减
     少数据拷贝,实现嵌入式通信软件良好的性能。
     随着电子技术和计算技术的发展,嵌人式系统核心一一微处理器或者微控
     制器的性价比不断提高,嵌入式系统的功能需求日益复杂,因此嵌入式应用开
     发和设计的方式也相应改变,从过去单一模式的前台/后台控制,转变为利用嵌
     入式实时操作系统的多任务实时控制。同时,网络技术的迅速发展为嵌入式设
     备网络化提供必要的网络基础设施,针对嵌入式设备连接到网络的各种协议标
     准已经制定出来,用于组建各种家庭设备网络、个人信息网络、小型办公网络,
     网络应用己经成为嵌入式系统的新兴应用领域,在不久的将来连接到网络的嵌
     入式产品将提供更广阔的市场和应用前景。
Embedded systems are based on application-centered hardware design and
     application specific software product development. Embedded systems are widely
     applied in such areas as manufacture, process control, communication, instrument,
     automobile, marine vehicle, aviation, military equipment, and consumer product. A
     typical embedded application is the integration of hardware design centered on a
     microprocessor or microcontroller and software development based on embedded
     real-time operating system.
    
     The development of embedded real-time operating system and the application
     of embedded networking technology have been prospective areas and have
     far-reaching significance in theory and practice. It is under such background that we
     present the topic of our work. It is the research and design of embedded network
     communication system based on real-time kernel. The work includes designing the
     embedded real-time kernel, researching the task scheduling algorithms and
     designing embedded network communication subsystem based on the real-time
     kernel.
    
     The work presents an embedded real-time kernel with microkernel architecture.
     Because the Intel-architecture microprocessors and microcontrollers are popular in
     embedded system markets, and they are compatible with most desktop computers, it
     is convenient to design, implement and verify the embedded software and port the
     codes into embedded environment. So the embedded real-time kernel is designed on
     the basis of the advanced x86 family microprocessors. In the kernel, memory
     protection and context-switch optimum are deployed in order to ensure OS
     efficiency, system calls are provided to manage process and thread, and inter-task
     communication is implemented through massage passing mechanism. In the
     meantime, standard semaphore mechanism is optimized to keep real-time kernel
     efficient and with small size.
     The work makes in-depth research on the real-time task scheduling algorithms.
     Because the scheduler based on priority is proper in embedded environment, the
     work analyses the RM and EDF scheduling algorithms and the source of task
     scheduling cost. Based on the different scheduling results produced by scheduling
    
    
     iii
    
    
     /
    
    
    
    
    
    
    
    
    
     the same workload respectively with RM and EDF, the work deploys combined
     EDF and RM (CER) scheduler in real-time task scheduling and analyzes its
     schedulability in given workload. Further, the CER scheduler is improved to
     maintain good OS performance and high efficiency in more workload. Compared
     with the former CER scheduler, the improved scheduler is proved to provide high
     performance with low scheduling cost, when the whole workload is increased.
     Based on the study and analysis of BSD4.3 TCP/IP, the work concludes the
     key techniques deployed in embedded network communication systems. It presents
     the network communication software architecture based on the real-time kernel and
     deploys protocols optimizing methods to improve the system cost incurred in
     handling data touch process and non-data touch process. It simplifies and optimizes
     the TCP/IP protocol suits according to the characteristic of embedded systems. It
     presents an improved buffer management mechanism to ensure high performance
     communication in networked embedded systems.
    
     With the development of electronic technology and computing technology, the
     most importa
引文
[1]T. Lewis, Information appliances: Gadget netopia. IEEE Computer, Vol.31, no. 1, pp.59-70, Jan. 1998.
    [2]Richard A.Quinnell, embedded tools, network products and development efficiency, Electronic Systems, Jul. 1999.
    [3]吕京建等,面向二十一世纪的嵌入式系统综述,http://www.bol-svstem.com
    [4]博洋,为什么要采用单片机开发平台,电子产品世界,1998年1-2月,PP.18
    [5]马忠梅,吕京建,何小庆,单片机开发环境,电子技术应用,1998年第8期,pp.4-7
    [6]熊光泽,罗蕾,嵌入式软件技术的现状与发展动向,计算机应用,2000年第7期,pp.1-3
    [7]龚炳铮,发展嵌入式计算机及其产业的思考,电子技术应用,2000年第10期,pp.4-6
    [8]梁合庆,Internet连接用嵌入式系统设计,电子产品世界,2000年第4期,pp.16-17
    [9]杨思忠,刘锦德,骆志刚,家庭网络及相关技术,计算机应用,2000年第7期,pp.24-28
    [10]Sun Microsystems,Inc. JiniSpecification, http://www.sun.com/jini/
    [11]Sun Microsystems,Inc. JiniWhitepapers, http://www.sun.com/jini/
    [12]W.Keith Edwards.Jini核心技术.机械工业出版社,2000.7.
    [13]K.Ramamritham and J.A.Stankovic, Scheduling algorithms and operating systems support for real-time system, Proceedings of the IEEE, Vol.82, no. 1, pp.55-67, Jan. 1994.
    [14]Ed Klein, RTOS: Design How is Your Application Affected, Embedded systems conference, Jul. 1998.
    [15]D.Stepner, N. Rajan, and D. Hui, Embedded Application Design Using a Real-Time OS, Proceedings of the 36th ACM/IEEE Conference of Design Automation Conference, pp. 151-156, Jun. 1999.
    [16]Labrosse,Jean J. μC/OS-Ⅱ, The Real-Time Kernel, R&D Technical Books, 1998.
    [17]Labrosse,Jean J. Embedded System Building Blocks, Computer and Ready-to-Use modules in C, R&D Technical Books, 1995.
    
    
    [18]William Stallings. Operating Systems Internals and Design Principles. Prentice Hall, 1997.
    [19]Tanenbaum,A. Modern Operating Systems. Englewood Cliffs, 1992.
    [20]Tanenbaum,A. Operating Systems: Design and Implementation, Englewood Cliffs, 1997.
    [21]C.L.Liu and J.W. Layland, Scheduling algorithms for multiprogramming in a hard real-time environment, Journal of the ACM, Vol.20, no.1, pp.46-61, 1973.
    [22]候业勤,张菁(编译),分布式嵌入式实时操作系统QNX,宇航出版社,1999.1.
    [23]D.Hilderbrand, An architectural overview of QNX. In Proc.Usenix Workshop on Micro-kernels and Other Kernel Architectures, Apr. 1992.
    [24]Tim Bird. Right-Sizing Linux: Selective Reduction of Linux for Embedded Devices. Embedded Systems Conference, Sep.2000.
    [25]Mitchell Bunnell. Solving the Embedded Linux Challenges. Embedded Systems Conference, Oct.2000.
    [26]Jyh-shing Chen. Using Linux for Embedded Applications. Embedded Systems Conference, Feb.2000.
    [27]金西,黄汪,嵌入式Linux技术及其应用,计算机应用,2000年第7期,pp.4-6
    [28]Douglas Boling. Programming Windows CE. Microsoft Press, Oct. 1998.
    [29]彭飞,柳重堪,张其善,嵌入式系统的开发利器——Windows CE操作系统,电子技术应用,2000年第9期,pp.28—30
    [30]J.Gareau. Advanced embedded x86 programming: protected mode, Embedded System Programming, Vol. 11, no.4, Apr. 1998.
    [31]J.Gareau. Advanced embedded x86 programming: protection and segmentation, Embedded System Programming, Vol.11, no.5, May1998.
    [32]J. Gareau. Advanced embedded x86 programming: paging, Embedded System Programming, Jun. 1998.
    [33]J. Gareau. Exploring the Features of the x86 CPU family, Embedded System Conference, Mar. 1999.
    [34]L.Sha, R.Rajkumar, and J.Lehoczlcy, Priority inheritance protocols: an approach
    
    to real-time synchronization, IEEE Trans, on Computers, Vol.39, no.3, pp.1175-1198, 1990.
    [35] K.M.Zuberi and K.G.Shin, An efficient semaphore implementation scheme for small-memory embedded systems, in Proc. Real-Time Technology and Applications Symposium, pp.25-34, Jun.1997.
    [36] M.B.Jones, D.Rosu and M.C.Rosu, CPU reservations and time constraints: efficient, predictable scheduling of independent activities. Proc. Symp. Operating System Principles, pp. 198-211, Oct. 1997.
    [37] K.Ramamritham and J.A.Stankovic, Scheduling algorithms and operating systems support for real-time systems, Proceedings of the IEEE, Vol.82, no.1, pp.55-67,Jan. 1994.
    [38] A.C.Audsley, A.Burns and A.J.Wellings. Deadline monotonic scheduling theory and application, Control Engineering Practice, Vol.1, no.1, pp.71-78,1993.
    [39] J.Liebeherr and D.E.Wrege, Versatile packet multiplexer for quality-of-service networks. Proc. IEEE International Symposium on High Performance Distributed Computing, pp.148-155, 1995.
    [40] K.Jeffay, D.F.Stanat and C.U.Marted, On non-preemptive scheduling of periodic and sporadic tasks, in Proc.Real-Time Systems Symposium, pp.129-139,1991.
    [41] B.Sprunt, L.Sha, and J.Lehoczky, Aperiodic task scheduling for hard-real-time systems, Real-Time Systems, Vol.1, no.l, pp.27-60, June 1989
    [42] J.Lehoczky, L.Sha and Y.Ding, The rate monotonic scheduling algorithm: exact characterization and average case behavior, in Proc. Real-Time Systems Symposium, 1989.
    [43] J.Y.Leung and J.Whitehead, On the complexity of fixed-priority scheduling of periodic, real-time tasks, Performance Evaluation, Vol.2, no.4, pp.237-250.
    [44] S.Leffler, M.Mckusick, M.Karels and J.Quarterman. The Design and Implementation of the 4. 3BSD UNIX Operating System. Addison Wesley, 1989.
    [45] 吕京建,肖海桥,嵌入式Internet技术及其应用, http://www.bol-svstem.com
    [46] 夏克国,SCENIX单片机嵌入式Internet方案,http://www.21 ic.com/设计与应用
    [47] Comer, Douglas. Operating System Design, The XINU Approach, Prentice Hall,
    
    1995.
    [48]Comer, Douglas. Intemetworking with TCP/IP, Vol.2: Design, Implementation and Internals (Second Edition). Prentice Hall, 1997.
    [49]Stevens, W.R. TCP/IP Illustrated, Vol.1: The Protocols. Addison Wesley, 1995.
    [50]Stevens, W.R. TCP/IP Illustrated, Vol.2: The Implementation. Addison Wesley, 1995.
    [51]D.C.Schmidt and T. Suda, Transport system architecture for high-performance communication subsystem, IEEE Journal on Communication, Vol. 11, no.4, May 1993, pp.489-506.
    [52]R.D.Russell and P.J.hatcher, Efficient kernel support for reliable communication, Proc. of ACM Symposium on Applied Computing, Feb.1998, pp.541-550.
    [53]Sung Woo Tak, Eun Park, and Jerry Stach, High-performance communication software for standalone embedded systems based on flat memory model, IEEE International Conference on Computer Communications, Sep. 1999.
    [54]Edward A Lee, What's ahead for Embedded Software, IEEE Computer, Sep.2000, pp. 18-26.
    [55]Tanenbaum,A. Computer Networks. Prentice Hall, 1996.
    [56]William Stallings. Data and Computer Communications. Prentice Hall, 1997.
    [57]William Stallings. Computer Organization and Architecture, Prentice Hall, 1996.
    [58]谢雪松,胡长阳,基于驱动程序的协议栈设计,电子技术应用,2000年第10期,pp.17-19
    [59]德州仪器,介绍一种实时操作系统DSP/BIOS,电子技术应用,2000年第12期,pp.23-26
    [60]A.Mehra, A.Indiresan and K.G. Shin, Structuring communication software for Quality-of-Service guarantees, in Proc. of the 17~(th) Real-Time Systems Symposium, Dec.1996,pp. 144-154.
    [61]R.Gopalakrishnan and G.M.Pamlkar, Efficient user-space protocol implementation with QoS guarantees using real-time upcalls, IEEE/ACM Transactions of networking, Vol.6, no.4, Aug.1998, pp.374-388.
    [62]D.D.Clark, V. Jacobson, J.Romkey and H.Salwen, An analysis of TCP processing, IEEE Communication Magazine, Vol.27, Jun. 1989,pp.23-29.
    
    
    [63]C.Maeda and B.Bershad, Protocol service decomposition for high-performance networking, in Proc. Symp. Operating Systems Principles, pp.244-255, Dec. 1993.
    [64]D.Mosberger, L.L.Pertson, P.G.Bridges and S.O'Malley, Analysis of techniques to improve protocol processing latency, Proc. SIGCOMM, pp.73-84, Aug. 1996.
    [65]T. Sridhar. Protocol stack development, Embedded Systems Conference, Jun. 1998
    [66]R. Gopalakrishnan and G.Parulkar, Bring real-time theory and practice closer for multimedia computing, in SIGMETRICS, pp. 1-12, May1996.
    [67]P. Goyal, X.Guo and H.VIn, A hierarchical CPU scheduler for multimedia operating system, in Proc. Operating System Design and Implementation (OSDI), Oct. 1996.
    [68]张雪梅,何永明,ISDN终端实时操作系统,计算机工程与设计,1997年第4期,pp.22-25
    [69]潘建平,顾冠群,沈苏彬,计算机网络运输层协议的研究与新进展(Ⅰ)——传统运输层协议机制的改进和实现的优化,通信学报,1998年第10期,pp.46-51
    [70]沈俊,潘建平,顾冠群,基于协议引擎的协议实现方法研究,计算机研究与发展,1998年第11期,pp.1037-1041
    [71]Joseph L.Long. Network communications for embedded systems, Embedded Systems Conference, Jul. 1999.
    [72]Larry Mittag, Innovations in Internet Appliance Design, Embedded Systems Programming, Vol. 12, no.5, 1999.
    [73]Michael Barr, Architecting embedded systems for add-on software modules, Embedded Systems Programming, Vol. 12, no.9, Sep. 1999.
    [74]Michael Barr, The revolution will not be televised, Embedded Systems Programming, Vol. 12, no.9, Sep. 1999.
    [75]Curt Schwaderer, A driver-based approach to protocol stack design, Embedded Systems Programming, Vol. 12, no.9, Sep. 1999.
    [76]Michael O.Brien, Embedded web servers, Embedded Systems Programming, Vol. 12, no. 11, Nov. 1999.
    [77]Paul J.Perrone and Venkata Chaganti, Jini in the box, Embedded Systems
    
    Programming, Vol. 12, no. 11, Nov. 1999.
    [78] David Nix, Common architectures for communications, Embedded Systems Programming, Vol. 12, no. 11, Nov. 1999.
    [79] Thomas Herbert, Embedding TCP/IP, Embedded Systems Programming, Vol.13, no.1, Jan.2000.
    [80] Joe Kerkes, Real-time Ethernet, Embedded Systems Programming, Vol.13, no.l, Jan.2000.
    [81] Christopher K.Leidigh, Configuring TCP/IP hosts, methods and protocols, Embedded Systems Programming, Vol.13, no.4, Apr.2000.
    [82] Michael Barr, TCP/IP or not TCP/IP, Embedded Systems Programming,Vol.13, no.4, Apr.2000.
    [83] Michael Barr, Mid year's resolutions, Embedded Systems Programming, Vol.13, no.7, Jul.2000.
    [84] Rebecca Spaker, Bluetooth Basics, Embedded Systems Programming, Vol.13, no.7, Jul.2000.
    [85] Michael Barr, Internet working, Embedded Systems Programming,Vol.13, no.9, Sep.2000.
    [86] Jeff Stefan, Working with WAP, Embedded Systems Programming, Vol.13, no. 10, Oct.2000.
    [87] Mark Kohler, NP complete, Embedded Systems Programming, Vol.13, no.11, Nov.2000.
    [88] John Canosa, Network protocols for the home, Embedded Systems Programming, Vol.13,no.12, Dec.2000.

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

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

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