中国科学院软件研究所机构知识库
Advanced  
ISCAS OpenIR  > 中科院软件所  > 中科院软件所
题名:
RFRTOS-基于Linux的QoS实时操作系统
作者: 赵慧斌
答辩日期: 2003
专业: 计算机软件与理论
授予单位: 中国科学院软件研究所
授予地点: 中国科学院软件研究所
学位: 博士
关键词: 实时操作系统 ; 优先级反转 ; 优先级继承协议 ; 优先级冲顶协议 ; 速率单调 ; 互斥锁 ; 信号量 ; 资源核心 ; 非独占互斥锁 ; 时钟管理 ; 资源预留
摘要: 实时操作系统不同于通用操作系统之处在于系统的正确性不仅依赖于计算结果的正确性,还取决于输出结果时间的及时性。传统实时操作系统普遍属于硬实时,即系统必须满足所有计算结果的正确性和输出结果的时间正确性,否则可能出现灾难性的后果,此类系统适用于某些专用的场合如医疗设备、核电站控制、航空航天等。而另一方面,计算机的发展和可用外设资源的日益增多,过去只能在通用操作系统平台上实现的功能,如今嵌入式系统也需要,同时一些桌面系统也开始有部分实时要求。由此建立了一个新兴的实时领域一一软实时操作系统。软实时应用在时间正确性上没有传统硬实时要求苛刻,偶尔的超时是可以接受的,但要求更为广泛的功能支持,包括文件系统、网络用户界面、和数据库系统等扩展功能。但软实时在资源管理方面与传统实时相比,则显得较为松散,造成了许多情况下,实时特性难于体现的情况。为满足国内工控嵌入式、多媒体等领域的需要,本论文在研究了相关的实时系统和Linux本身的特点之后,结合了硬实时和软实时的某些优点,提出了基于面向QoS(Quality of Service)服务的实时操作系统的概念。面向QoS的实时操作系统不但可以提供与通用操作系统同样丰富的系统调用和服务,且在开发方式上较传统实时操作系统更为简单。与此同时,在系统服务精度上如时钟管理、中断管理和进程调度等方面则接近传统实时操作系统。基于这种思想,我们开发了基于 Linux的RFRTOS(RedFlag Real-Time Operating System)实时操作系统。本人在开发RFRTOS的过程中,主要在以下三方面作了研究:口提高核心可抢占性。与传统是实时核心通过对系统服务的限制来达到快速响应的方法不同,QoS实时应保持系统服务的完整,在这种情况下,核心可抢占精度就成为决定系统服务精度的一个较为重要的指标,而这也是RFRTOS研究的重点,RFRTOS通过以下几个方面工作达到了基于中断服务精度的可抢占核心:核心服务进程化。Linux基于宏核心的设计哲学,核心服务,包括中断处理、底半和信号处理等只有核心空间,没有进程空间,且默认具有最高的运行级别。该设计思想由于系统整体效率较高,实现简便而在通用操作系统的设计中普遍采纳;但在实时应用中,这种粗糙的核心服务粒度将造成难以预期的任务服务延迟。而将核心服务进程化,使后台的系统服务调度上可见,就增加了核心的运作的可控性,提高响应精度。基于信号量的互斥锁和优先级继承协议(PrforityIllhe1'itance Protoc01,PIP)或优先级冲顶协议(Priority Ceiling Protocol,PCP),的支持。互斥条件可能造成优先级反转现象,造成高优先级任务不可预期的时延,而基于信号量的互斥锁和基于该互斥锁机制的优先级继承协议或优先级冲顶协议可以解决这一问题。中断处理级的调度时机细化。采用宏核心的设计原则导致Limix在调度时机上是核心服务级的,即如果存在一个未完成的系统服务,则不进行调度。而RFRTOS在核心服务进程化的基础上,进一步增加了调度时机的粒度,以外部事件为调度触发点,每次在中断处理返回是判断是否需要调度,实现了中断处理级的调度时机细化,增加了系统响应精度。口时钟管理的精度细化。时钟作为操作系统的脉搏,是协调系统运作的一个重要依据,一般系统的时钟频率是固定的。而尽管较快的时钟频率可以提高服务精度,但将增加系统负担。好RTOS采用了根据应用需求调少整的动态的时钟精度,较好地解决了系统服务精度和额外负载的矛盾。口多调度策略支持和资源核心的框架实现。实时应用和非实时应用之间、实时应用之间,甚至非实时应用之间,对系统调度的侧重均可能存在差异,单一的调度机制难于满足应用的多方面要求,增加灵活的调度机制支持成为现代操作系统必须考虑的问题之一。RFRTOS在卡内基.梅伦大学的实时多媒体实验室提出的资源核心的思想之下,构建了基于优先级的多调度策略支持的调度机制。即RTOS提供了基于资源观点的调度,改变了传统操作系统的面向服务的理念,为Qos的服务支持提供了调度接口。另外,在开发RFRTPS中,我们实现了读锁机制,并提出了非独占锁的优先级继承协议,扩大了基本优先级继承协议的适用范围,改进了互斥锁的效率。我们通过测试证实了改进的合理性,目前RFRTOS己经作为红旗公司产品投入市场销售。
英文摘要: Real Time operating system is inherently different from general-purpose operating system in that the correctness of system's behaviors depends not only on what can be generated, but on when the result is produced, i.e., timely correctness. Those traditional real time systems are generally hard real time systems, which are required to not only generate correct results but meet all time constraints as well. So they are very specially designed and only adapted to such fields as medical equipment, nuclear-plant controlling, aerospace etc. On the other hand, with the developing of computer technique and the increasingly available peripheral resources, those functions required only on general-purpose system platform are needed by embedded system as well. At the same time, some systems originally designed for desktop application are now demanded to satisfy real time constraints of some applications, for which a new filed of real time, soft real time, is created. Soft real time applications are not so rigid as hard real time ones in timely correctness, allowing for some cases of missing deadline, but they may require varieties of system services, including file system, network, database etc. But comparing to hard real time system, soft real time ones apply so loose rules in resource management that sometimes the real time property an application requires cannot be guaranteed at all. For the purpose of meeting the needs of industry embedded systems, multi-media applications etc, this paper brings forward the concept of OoS oriented real time system on the bases of research of both correspondent real time system and the inherent characteristics of Linux. QoS oriented real time system not only provides as various system services as general-purpose one, but also presents more comfortable developing platforms than traditional real time system, though the accuracy of system service such as timer management, interrupt management and schedule etc are close to the later. RFRTOS, Linux based QoS real time system, is developed by following the designing philosophy. I'm responsible for three parts of tasks during the development of RFRTOS: Improving Kernel Prememptability. QoS real time system provide full system services whose timing response may not be so predictable from the view point of traditional real time and thus restricted to be used by the later. In this case, kernel preemptability becomes one of the dominant factors for system service granularity, which is one of the key concerns of RPRTOS. RFRTOS provides kernel preemptability at interrupt level by employing following methods: Tasked kernel services. Linux is designed on the marcro kernel philosophy; in which interrupt service, bottom half and signal processing are all kernel procedures of highest priority and without any task spaces. Though macro kernel can present more high responsive property, which is one of main concern of many general-purpose systems, applications with time constraints may be delayed for an unpredictable duration of time because of the coarse macro kernel services' granularity. While tasked kernel services make the background system jobs visible to the scheduler, as a result of which the behaviors of system are more controllable and thus the system responsive property is improved. Semaphore and priority inheritance protocol(PIP) or priority ceiling protocol(PCP) supporting. Sometimes mutual exclusion can give rise to priority inversion, which in turn may cause unpredictable delay of high priority tasks. As a solution, semaphore and PIP or PCP based on this mutex mechanism must be implemented. Scheduling entry point at hardware interrupts service level. Task scheduling only occurs at kernel service level in Linux, whose designing philosophy conforms to macro kernel, in which schedule won't be checked when system runs in kernel services. On the basis of tasked kernel services, RFRTOS, on the other hand, increases the granulites of schedule by checking the need for schedule once interrupt services are fulfilled and return to kernel, thus making external events the main entry points of scheduling. The system can schedule at interrupt service level and thus responsive property of system is improved accordingly. D Timer management. As the pulse of operating system, timer interrupt is responsible for different kernel services working in harmony. Traditionally, the timer interrupt occurs in a static frequency. While higher timer frequency is preferred for accurate system service, the overload of system could be magnified. RFRTOS adopts dynamic timer interrupt mechanism, by which the timer frequency is adjusted according to the requirement of applications and thus the contradiction between system load and service accuracy is somehow compromised. Multi-policy scheduling mechanism and resource kernel implementation. Applications, no matter what they are, with or without real time constraints, require a variety of scheduling algorithms that are sometimes emphasized on inherently different aspects. As a result, simple mono-scheduling policy cannot satisfy the needs of various scheduling properties and multi-policy scheduling mechanism is considered as one of key improvements for design of modem operating system. RFRTOS builds a priority-based multi-policy scheduling framework on the basis of resource kernel mechanism presented by Real-Time and Multimedia Systems Laboratory (RTML) of Carnegie Mellon University, under which system scheduler is resource-oriented and different from the service-oriented philosophy of general-purpose system. Some scheduling APIs are also provided for the QoS sensitive services. In addition, we implement read lock mechanism during the development of RFRTOS and bring forward non-exclusive PEP, as a result which basic priority inheritance is expanded to be used on read lock and mutual exclusive efficiency is improved somehow. Several experiments are made to validate the improvement of RFRTOS and as a one of the products of Redflag Linux Co. Ltd, RFRTOS is for sale to fulfill the needs of various applications.
语种: 中文
内容类型: 学位论文
URI标识: http://ir.iscas.ac.cn/handle/311060/6580
Appears in Collections:中科院软件所

Files in This Item:
File Name/ File Size Content Type Version Access License
LW011274.pdf(2539KB)----限制开放-- 联系获取全文

Recommended Citation:
赵慧斌. RFRTOS-基于Linux的QoS实时操作系统[D]. 中国科学院软件研究所. 中国科学院软件研究所. 2003-01-01.
Service
Recommend this item
Sava as my favorate item
Show this item's statistics
Export Endnote File
Google Scholar
Similar articles in Google Scholar
[赵慧斌]'s Articles
CSDL cross search
Similar articles in CSDL Cross Search
[赵慧斌]‘s Articles
Related Copyright Policies
Null
Social Bookmarking
Add to CiteULike Add to Connotea Add to Del.icio.us Add to Digg Add to Reddit
所有评论 (0)
暂无评论
 
评注功能仅针对注册用户开放,请您登录
您对该条目有什么异议,请填写以下表单,管理员会尽快联系您。
内 容:
Email:  *
单位:
验证码:   刷新
您在IR的使用过程中有什么好的想法或者建议可以反馈给我们。
标 题:
 *
内 容:
Email:  *
验证码:   刷新

Items in IR are protected by copyright, with all rights reserved, unless otherwise indicated.

 

 

Valid XHTML 1.0!
Copyright © 2007-2017  中国科学院软件研究所 - Feedback
Powered by CSpace