当前位置:文档之家› 基于RTLinux的实时系统性能测试

基于RTLinux的实时系统性能测试

摘要实时系统实现了对事件响应和处理的严格时间控制。

实时操作系统分为嵌入式和普通系统两种。

大部分的嵌入式系统也需要提供实时响应和控制能力。

虽然嵌入式实时系统与普通实时系统的规模,应用,性能及可靠性要求都不同,但是这两种实时操作系统都一般是基于微内核的和模块化的。

系统可以在最小规模下工作时,操作系统仅仅提供一些最基本的服务,大量的在一般系统中由操作系统完成的任务由作为应用运行的系统级任务完成。

为了测试实时系统的性能,我们设计了分别在实时环境(RTLinux)与非实时环境(普通Linux)下运行的两个程序,通过他们之间任务执行时间的比较,达到我们测试的目的。

本论文详细阐述了作者在实时环境下的测试,以及与非实时环境下测试的比较。

首先,简要的介绍了Linux操作系统,嵌入式操作系统,实时系统以及嵌入式实时系统,这些都是一些相关的信息。

其中,对于实时系统(RTOS),我们给出了比较详细的介绍,包括实时系统的定义,分类,结构以及衡量指标等。

然后,详细的说明了实时Linux系统---RTLinux,阐述了RTLinux的实现机理,特点,应用等。

RTLinux编程是本论文的另一个重点,我们的设计使用的就是RTLinux的API接口。

RTLinux编程主要涉及的方面包括模块,线程及其调度,FIFO,中断以及串口API。

接下来,是本设计的实现与分析,通过对总体模块以及程序各个模块的分析,解释出总体设计思路,以及一些具体的设计方法,然后是实时与非实时系统测出的数据的比较,实现我们设计的初衷---测试实时系统的性能。

最后,在已完成工作的基础上,对设计进行了总结。

ABSTRACTReal-time system implements the rigid time requirements of task response and handling.Real-time system can be devide into embedded and ordinary system. Most of the embedded system also require the ability of real-time response and control. Although embedded and ordinary real-time systems have so many differences in size, application, performance and credibility etc.This two systems are both based on micro kernel and modulity. The system can work with minimal resources. The operating system only provides some basic services. Most of the services, that is provided by operating system in ordinary systems, are implemented as system application task.In ordre to test the performance of read-time system, we designed two progammes which are respectively run in the enviroment of real-time and non real-tiem. Through the comparision of the execution time, we can get the result we want, that is real-time system implements the rigid time requirements.This thesis elaborates the test in real-time enviroment and the comparision between real-time and non real-time systems. First, I introduce Linux operating system, embedded operating system, real-time system and embedded real-time system. These are all something related to my designation. Among them, I describe the real-time system (RTOS) in detail, including definition, classification, configuration and judging standard. Then, wo elaborated a real-tiem Linux system---RTLinux, includnig implementing methods, characristics, application and so on. RTLinux programming is another focas points of this thesis. I use RTLinux API interfaces to build up my progarmmes. RTLinux programming involves modules, thread and its scheduling, FIFO, interrupts, and serial port API. After that, it is the implementation and analysis of my design. Through the analysis of the overall modules and every modules, I explain my designing mechanism and the concrete designing methods. Then we get the data that is execution time in both real-time and non real-time systems. Via comparision, we can test the performance of the real-time systems. At last, based on the work that I have done, I reach my conclusion.第一章绪论51.1 Linux操作系统·································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································································51.2 嵌入式操作系统61.2.1 嵌入式系统的定义61.2.2 嵌入式系统的发展61.2.3 嵌入式系统的特点71.3 实时系统(RTOS)71.3.1 实时系统的定义71.3.2 实时系统的分类81.3.3 RTOS的结构91.3.4 RTOS的基本功能91.3.5 实时系统的设计问题91.3.6 RTOS的衡量指标111.4 嵌入式实时Linux系统12第二章实时Linux系统---RTLinux 132.1 RTLinux简介132.2 RTLinux的实现132.3 RTLinux的特点162.4 RTLlinux的应用172.5 RTLinux 应用编程接口(API)182.6 RTLinux的调度策略18第三章 RTLinux编程介绍193.1 简介193.2 程序基本结构203.3RTLinux时钟203.4 实时Linux POSIX线程及调度223.5 使用实时FIFOs253.6 内存共享263.7 中断273.8 浮点运算293.9 RT_COM 串口驱动程序293.9.1 安装293.9.2 接口函数303.9.3 模块装载与卸载313.9.4 数据结构313.9.5 RT_COM模块分析33第四章程序实现354.1 概述354.2 实现方法阐述354.3 总体代码分析364.3.1 程序总体流程图364.3.2 文件介绍374.3.3 公用常量与数据结构384.4 各模块代码分析404.4.1 服务器端( Server )··························································································································································································································································································································404.4.2 客户端 ( Client )434.4.3 rtopenf模块454.5 数据分析46第五章总结与展望47参考文献49致谢错误!未定义书签。

相关主题