31 research outputs found

    RFRTOS-基于Linux的QoS实时操作系统

    No full text
    实时操作系统不同于通用操作系统之处在于系统的正确性不仅依赖于计算结果的正确性,还取决于输出结果时间的及时性。传统实时操作系统普遍属于硬实时,即系统必须满足所有计算结果的正确性和输出结果的时间正确性,否则可能出现灾难性的后果,此类系统适用于某些专用的场合如医疗设备、核电站控制、航空航天等。而另一方面,计算机的发展和可用外设资源的日益增多,过去只能在通用操作系统平台上实现的功能,如今嵌入式系统也需要,同时一些桌面系统也开始有部分实时要求。由此建立了一个新兴的实时领域一一软实时操作系统。软实时应用在时间正确性上没有传统硬实时要求苛刻,偶尔的超时是可以接受的,但要求更为广泛的功能支持,包括文件系统、网络用户界面、和数据库系统等扩展功能。但软实时在资源管理方面与传统实时相比,则显得较为松散,造成了许多情况下,实时特性难于体现的情况。为满足国内工控嵌入式、多媒体等领域的需要,本论文在研究了相关的实时系统和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

    a method based on timer management improvement for real-time scheduling in linux

    No full text
    目前,实时领域的应用逐渐扩大,不仅传统的嵌入式系统需求日益紧迫,而且也渗透到桌面环境.而随着Linux操作系统的成功,改进Linux的设计和性能,使其应用于实时领域吸引了许多研究人员和开发人员的注意力.论文针对Linux时钟系统管理方面的研究,提出了一种针对时钟的改进算法,以此为基础,根据实时应用的特点,进一步给出一种调度算法的改进措施.试验证明,所做的改进有效地提高了Linux的调度精度,满足了软实时方面的需求

    priority inheritance protocol of non-exclusive mutex and its implementation under linux

    No full text
    对于系统中的同步和互斥算法中,支持优先级继承协议的互斥锁在提高实时系统调度精度,增强系统的行为可预见性方面起到较为关键的作用.但较早的优先级继承算法和实现并未考虑到非独占锁,如读锁的优先级继承的问题,本文提出一种基于读锁的优先级继承协议,并给出了关于该协议的分析,在此基础上,基于Linux实现了该算法

    Gdel语言对现代软件工程方法的支持

    Get PDF
    文章以一种新型的逻辑程序设计语言——G+del语言为例,对逻辑程序设计语言与现代软件工程主要思想和方法的结合情况进行了初步探讨。G,del语言通过引入模块系统、类型系统和延迟计算机制等不同于以往逻辑程序的新机制,能够支持现代软件设计的一些主流方法。模块系统提供了组织大规模程序的方法,并通过结合类型系统实现了对抽象数据类型程序设计的支持,从而能够支持面向对象程序设计;延迟计算则使利用该语言所编制的软件在可重用性方面获得提升。厦门大学创新研究基金项目(Y07012);; 福建省自然科学基金项目(A0310007

    research and implementation on improving kernel premempablity of linux

    No full text
    随着开放源码的Linux应用逐渐普及,改进Linux的性能,使其适用于实时领域成为一个极具潜力的发展方向.在参考了与此相关的研究的基础上,该文对改善Linux核心可抢占性的方法提出了3个改进措施:中断管理进程化、改进互斥锁的机制和增加互斥锁协议支持,并在Linux 2.2系列的核心上加以实现.试验证明,这些改进达到了减少系统的抢占粒度,提高调度精度的目的

    research of process management of linux

    No full text
    1引言Linux作为一个多任务的操作系统,支持分时处理,由于其良好的性能,完善的设计,在服务器、台式机、嵌入实时等领域得到了广泛的应用.在操作系统的几个关键设计中,如内存管理、中断管理、进程、文件系统、进程通信等方面都有独到的特点,而作为操作系统的关键部分之一--进程管理方面,Linux作了较为周密的考虑,系统的高效、稳定很大一部分来自于进程管理的严整规划

    a fine-grain timer scheme for real-time in linux

    No full text
    时钟精度直接影响到任务能否被及时响应和调度,作为一个分时系统,Linux 的10ms周期性时钟粒度是必要而且合适的.但是实时系统一般都要求微秒级的响应精度,显然Linux的时钟粒度过于粗糙.然而简单地提高时钟频率意味着时钟中断的相应处理过程将占用过多的处理器时间,从而使得整个系统的有效利用率急剧下降.为了改进Linux的实时性能,讨论了基于Linux的实时操作系统RFRTOS中的时钟粒度细化方案.实验结果显示所做改进以不大的代价有效地提高了Linux的时钟精度

    design and implementation of real-time scheduling in linux

    No full text
    作为一个分时系统,Linux的设计目标为提高吞吐率和平均响应时间,因此采取了基于时间片的调度策略,显然这种机制无法保证实时任务得到及时响应和调度.为了改进Linux操作系统的实时性能,探讨了基于Linux的实时操作系统RFRTOS中的实时调度机制.实验验证,所做改进有效地提高了Linux的调度精度,满足了软实时方面的需求

    Linux互斥锁机制的研究及改进

    No full text
    1 引言随着Linux操作系统的成功,改进Linux的设计和性能,使其应用于实时领域吸引了许多研究人员和开发人员的注意力,Linux的实时化已有多种方案,如RTAI,RTLinux为代表的硬实时化,KuRT、ART Linux等的软实时化方案。硬实时化方案主要在中断处理、调度和时钟管理方面进行了改进工作,中断处理方面,RTAI提出的中断虚拟层减少了由于中断屏蔽而引起的调度延迟,硬实时化方案同时提供了一个具有进程管理、中断管理等基本核心服务的实时核心为实时任务服务,而原核心对于该实时核心来说是一个i-dl

    载钯碳纳米管阵列电极对2,4,5-PCB的电催化还原脱氯特性

    No full text
    corecore