嵌入式操作系统VxWorks实时性能研究与测试
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着数字信息技术的发展,嵌入式实时操作系统ERTOS(Embedded Real-Time Operating System)不仅渗透到科学研究、工程技术等领域,而且与人们的生活联系越来越密切。ERTOS最重要的特性是实时性,它需要调度一切可利用的资源去完成实时任务。为正确评价ERTOS的实时性能,必须通过科学、系统的方法对ERTOS的实时性能进行研究,并对其实时性能进行全面、准确的测试。
     本文首先研究了ERTOS为实现强实时性,在系统体系结构、任务模式、内存管理和中断管理等方面的实现机制,分析了ERTOS主要的实时性能指标;
     其次剖析了嵌入式实时操作系统VxWorks内核,从最底层的数据结构开始,通过数据结构之间的关联关系全面展示了整个内核的构成,并对VxWorks操作系统内核在任务调度、内核抢占、任务间通信、内存管理和中断管理等方面的变化进行了动态的分析,对VxWorks操作系统内核特有的工作延期机制进行了分析。
     接着通过对实时性能指标测试方法的研究,本文提出了一种测试实时性能指标的方法,通过使用新方法和Rhealstone方法分别对上下文切换时间和死锁解除时间进行测试,由此说明此方法所测得的数据更准确,更符合ERTOS运行的实际情况。
     本文最后通过设计合理的测试用例,对VxWorks操作系统各项实时性能指标进行了详细的测试,获得了大量测试数据。通过对测试数据的分析,进一步验证了本文对VxWorks操作系统实时性能的分析。
With the development of digital information technology, ERTOS(Embedded Real-Time Operating System) not only has involved in the scientific research and engineering domains,but also has many affinities people's life. Real-Time performance is the most important performance of Embedded Operating System. It needs dispatching all available resources to achieve real-time task. In order to correctly evaluate the performance of a real-time Embedded Operating System, we must be scientific, systematic approach to ERTOS study of Real-Time performance and comprehensive Real-Time performance and accurate testing.
     Firstly,This article has researched on the Embedded Operating System for hard Real-Time implementation of the system architecture, task-mode, memory management and interrupt management to implement mechanism; this article has analysed the Real-Time performance target.
     Secondly this article has analysed the source code of VxWorks kernel depthly and a global dynamic scene of a running VxWorks kernel has been shown. This article has analysed the data structure, discovered the relationship of the data structure and shown the processes of the task rescheduling, the communications, the kernel depriving and the allocation of memory in the Operating System. This article has also analysed the defer work mechanism.
     This article has proposed a method to measure Real-Time performance, through the use of new method and Rhealstone method respectively has tested the task switching time and deadlock breaking time, description the measured data of this method has more realistic, more in line with the Real-Time system the actual situation.
     Finally, This article has designed some reasonable test case.This article has tested the Real-Time performance indicators on the Operating System of VxWorks, This article obtained lots of test date. This article has analysed of test data, authentication the analysis of the real-time performance on the Operating System of VxWorks for this ariticle.
引文
[1] H.Tokuda, C.W.Mercer, ARTS: a distributed real-time kernel[J]. ACM Operating Systems Review, 1989, 23(3): 29~53.
    [2] Stankovic.J, K.Ramamritham. The POSIX Research for Real-Time Operating Systems[J]. ACM Operating Systems Review, 1991, 25(2): 41~61.
    [3] R.Dawson. The Microkernel Operating System Architecture[C]. Massachusetts Institute of Technology, 1998, 16: 37~42.
    [4] R.Kar, K.Porter. Rhealstone: A Real-Time Benchmarking Proposal[J]. Dr.Dobbs Journal, 1989, 14(2): 14~24.
    [5]李庆诚,顾健.嵌入式实时操作系统性能测试方法研究[J].单片机与嵌入式系统应用, 2005: 19~21.
    [6] L.McVoy, S.Graphics. lmbench: Portable tools for performance analysis[C]. 1996 Annual Technical Conference San Diego, January 1996: 279~294.
    [7] N.Weiderman. Hartstone: synthetic benchmark requirements for hard real-time applications[J]. ACM SIGAda Ada Letters, 1990, 10(3): 126~136.
    [8] L.Abeni, et al. A measurement-based analysis of the real-time performance of Linux[C], Eighth IEEE Real-Time and Embedded Technology and Applications Symposium, 2002: 133~142.
    [9] A.Morton. A tool for measuring time intervals with in the kernel[M]. 2006.
    [10] K.Yaghmour, et al. Building embedded linux systems[M]. 2008: O'Reilly Media, Inc.
    [11] Zuberi.Khawar.M. Real-Time Operating System Services For Networked Embe- dded Systems[R]. USA: University of Michigan, 1998.
    [12] M.Chiodo, P.Giusto, H.Hsieh, et al. A Formal Methodology for Hardware/Softw- are Co-design of Embedded Systems[J]. IEEE Micro, 1994, 14(2): 26~36.
    [13] Martin Timmerman. Bart Van Beneden. RTOS Evaluation Kick Off[J]. Real-Ti- me Magazine, 1998, 3: 6~10.
    [14] Y.Li, M.Potkonjak, W.Wolf. Real-Time Operating Systems for Embedded Com- puting[J], IEEE International Conference on Computer Design: VLSI in Computers and Processors, 1997: 388~392.
    [15] H.Tokuda, T.Nakajima, P.Rao. Real-time mach: Towards a Predictable Real-Ti- me System[J]. In Proceedings of the USENIX Mach Workshop. Burlington, Vermont: The USENIX Association, 1990: 73~82.
    [16] C.Hoare. Monitors: an Operating System Structure Concept[J]. Comm. ACM, 1978, 21(8): 666~677.
    [17]何小庆.嵌入式实时操作系统的现状和未来[J].单片机与嵌入式系统应用, 2001, 3: 10~13.
    [18] Martin Timmerman, Bart Van Beneden. What Makes a Good RTOS[J]. Real Time Magazine, 2001, 11: 1~35.
    [19] K.M.Zuberi, K.G.Shin. EMERALDS: a Small-Memory Real-Time Microkern- el[J]. Software Engineering, IEEE Transactions on, Oct 2001, 27(10): 909~928.
    [20] Rashid.R, Tevanian.A, J.Young.Mchew. The Development of RTOS Architectur- es[J]. IEEE Transactions on Computers, 1998, 47(5): 509~526.
    [21]毛卫良,盛焕烨,郝琴等.基于微内核的嵌入式实时OS设计[J].微型电脑应用, 2000, 16: 16~20.
    [22] A.Tanenbaum, R.Van Renesse. Distributed operating systems[J]. ACM Computi- ng Surveys (CSUR), 1985, 17(4): 419~470.
    [23] N.C.Audsley, A.Burns, A.J.Wellings. Hard Real-Time Scheduling: The Deadline Monotonic Approach[J]. In Proc. of 8th IEEE Workshop on RealTime Operating Systems and Software. Atlanta, GA. USA, 1990: 127~132.
    [24] J.P.Lehoczky, L.Sha, Y.Ding. The Rate Monotonic Scheduling Algorithm: Exact Characterizati-on and Average Case Behavior[J]. In Proc. IEEE Real-Time Systems Symposium, 1989: 166~171.
    [25] A.Tanenbaum, A.Woodhull. Operating systems: design and implementation[M]. Prentice-Hall International, Inc., 1997: 310~396.
    [26]郑玉全.微型抢占式多任务实时内核设计[J].单片机与嵌入式系统应用, 2004, 1: 21~25.
    [27] Ray. Rtems简介[EB/OL]. http://www.rtems.net/Documnet/RTEMS.htm
    [28]孔祥营著.嵌人式实时操作系统VxWorks及其开发环境Tornado[M].北京:中国电力出版社, 2004.
    [29]陈智育著. VxWorks程序开发实践[M].北京:人民邮电出版社, 2004.
    [30]张辉译, Neville-Neil, G.V.著. FreeBSD操作系统的设计与实现[M].北京:电子工业出版社, 2005.
    [31]顾宝刚.基于VxWorks的异构多核处理器软件系统的研究与设计[D]:硕士学位论文.长沙:国防科技大学, 2008.
    [32] VxWorks Real-Time Kernel[EB/OL]. Wind River Systems, Inc. 1998.
    [33] Tornado BSP Training Workshop[EB/OL]. Wind River Systems, Inc. 1998.
    [34] VxWorks Programmer's Guide 5.4[EB/ OL]. Wind River Systems, Inc. 2003.
    [35] VxWorks源代码[CP/DK]. Wind River Systems, Inc.
    [36] VxWorks Reference Manual 5.4[EB/ OL]. Wind River Systems, Inc. 1999.
    [37]周启平,张杨编著. VxWorks下设备驱动程序及BSP开发指南[M].中国电力出版社, 2004.
    [38]赵红武,金渝等.一种减少中断延迟的中断调度模型[J].现代计算机, 2000(19): 19~21.
    [39] P.Gepner, M.F.Kowalik. Multi-Core Processors: New Way to Achieve High system Performance[J] . Proceedings of the International Symposium on Parallel Computing in Electrical Engineneering. IEEE Computer Society. 2006: 9~13.
    [40] N.Cravotta. Real-time operating systems[J], Embedded Systems Programming Magazine, 1997: 32~42.
    [41]康一梅等著.嵌入式软件测试[M].机械工业出版社, 2008. 7
    [42] M.Guthaus, et al. MiBench: A free, commercially representative embedded benchmark suite[J], in Proceedings of the IEEE 4th Annual Workshop on Workload Characterization, Austin, TX, 2001. 12