实时操作系统任务调度算法的硬件实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
实时操作系统在整个嵌入式系统中扮演着重要的角色,控制着整个系统的工作与运转,实时操作系统一个性能的优劣将对整个系统的所有性能产生直接的影响。已有的实时操作系统内核是加在应用程序中的软件,它不仅增加了存储空间的用量,而且增加了应用程序的额外负荷。尤其在实时性较强的场合,在限定时间内响应处理任务已经成为了对实时操作系统的一个基本要求。
     针对实时操作系统的开销导致应用程序可执行性降低的问题,单纯依靠改进调度算法已不能使其实时性有显著的提高,所以提出将实时操作系统内核硬化到FPGA平台上的设计方案,作为独立的硬件模块与处理器并行执行。建立由中断控制器、输入/输出寄存器和实时任务管理模块组成的硬件实时操作系统总体结构。其主要工作过程:通过数据总线把相应的命令和参数发送到指定硬件逻辑单元的输入寄存器中,硬件逻辑单元作出相应的处理,并将处理结果送到相应的输出寄存器中,以供CPU进行读取。
     本文以嵌入式实时操作系统μC/OS-Ⅱ为研究对象,修改μC/OS-Ⅱ中由软件实现的数据结构,根据硬件逻辑电路的并行性特点,搭建各个功能模块的硬件逻辑结构,整个设计采用VHDL硬件描述语言描述各个功能模块,利用Xilinx公司的ISE 8.2软件环境进行系统调试分析,完成功能仿真验证。
     本文主要设计并实现了任务管理模块和信号量管理模块的硬件逻辑电路。任务管理模块中对μC/OS-Ⅱ的任务调度算法进行改进和硬化,在uC/OS-Ⅱ内核原有的基于优先级抢占式调度算法的基础上,扩展相同优先级任务的调度算法,去除了原系统对每个任务必须有不同优先级的要求,采用硬件逻辑实现实时操作系统中的任务管理模块,使其实时性和确定性显著提高,充分发挥了多任务潜在的并行性;分析并改进μC/OS-Ⅱ中对信号量的管理和应用,设计并实现信号量管理模块的硬件逻辑电路,降低了频繁查表和访问内存带来的系统开销。将实时操作系统的调度功能由原来的纯软件实现转变为硬件实现,将极大的提高实时操作系统的实时性以及处理能力。
Real-time operating system plays an important role in the embedded systems, controls the work and operation of the whole system. The merits of a performance of real-time operating system have a direct impact on all the performance of the system.Existing real-time operating system kernel is the software that is added to applications. It not only increases the amount of storage space, increases applications of additional load.especially in a strong real-time occasion. Response to processing tasks within the time limit has become a basic requirement for real-time operating system.
     Overhead for real-time operating system cause the application to reduce the enforceability.Only improving scheduling algorithms can not make real-time increased significantly. So this paper proposed hardware real-time operating system FPGA-based design. Real-time operating system kernel is hardened to the FPGA platform. As a separate hardware module execute in parallel with the processor.Established by the interrupt controller, input/output registers and real-time task management module of the overall structure of the hardware real-time operating system. The main working process: Through the data bus to send the appropriate commands and parameters to a specific hardware logic unit input registers, hardware logic units take appropriate actions, and the results are sent to the corresponding output registers for the CPU to read.
     In this paper, embedded real time operating systemμC/OS-Ⅱuses as the research object. Modify theμC/OS-Ⅱin the data structure by the software.According to the parallelism features of the hardware logic, build each module of the hardware logical structure. The whole design utilizes VHDL hardware description language to describe each function module.Using Xilinx's ISE 8.2 software to analysis system debugging, to complete function simulation.
     In this paper, design and implement the hardware logic for the task management module and the semaphore management module. Task management module improves and hardens theμC/OS-Ⅱtask scheduling algorithm.Based on the uC/OS-Ⅱkernel original priority-based preemptive scheduling algorithm. Extend the same priority task scheduling algorithm.Remove the requirement for each task of the original system having a different priority. Use hardware logic to implement the real-time operating system task management module, deterministic and real-time are improved significantly. Give full play to the potential multi-task parallelism. Analysis and improve the semaphore management and application ofμC/OS-Ⅱ. Design and implement the hardware logic for semaphore management module.Reduce the overhead for frequently look-up table and access memory. Make scheduling function of real-time operating system from pure software into hardware to implement, it greatly improves real-time and processing of the real-time operating system.
引文
[1]宋延昭.嵌入式操作系统介绍及选型原则[J].工业控制计算机,2005,18(7):41-42.
    [2]张力,王铁.操作系统的固化[J].电脑知识与技术,2006,(8):170-171.
    [3]刘秋平.嵌入式操作系统.科技创新导报[J].2007,33:12-13.
    [4]屈玉贵,赵保华,森下严.计算机操作系统中进程管理的固化[J].计算机研究与发展,1987,24(11):62-65.
    [5]崔建华,孙红胜,王保进.硬件实时操作系统的设计与实现[J].电子技术应用,2008,(5):34-37.
    [6]胡曙辉,陈健.几种嵌入式实时操作系统的分析与比较[J].单片机与嵌入式系统应用,2007,(5):5-8.
    [7]菜长安,万小霞.4种嵌入式实时操作系统的两种主要技术分析和选择[J].重庆工商大学学报:自然科学版,2007,24(2):161-166.
    [8]季志均,马文丽,陈虎.4种嵌人式实时操作系统关键技术分析[J].计算机应用研究,2005,(9):4-8.
    [9]高峰,王自强.硬实时操作系统—LynxOS[J].计算机应用与软件,2005,22(3):63-64.
    [10] V.MOONEY III,J.LEE,A.DALEBY,et al.A comparison of the RTU hardware RTOS with a hardware/software RTOS[C].In:Design Automation Conference (ASP-DAC’03),2003,pp.683-688.
    [11] MOONEY,V.J, III, BLOUGH,D.M.A Hardware-Software real-time operating system framework for SOCs[J].IEEE Design and Test of Computers Magazine,2002,19(6):44-52.
    [12] T. SAMUELSSON,M. AKERHOLM,P. NYGREN,et al.A Comparison of Multiprocessor Real-Time Operating Systems Implemented in Hardware and Software[C].In:International Workshop on Advanced Real-Time Operating System Services (ARTOSS’03),2003,pp. 44-52.
    [13] T.NAKANO,U.ANDY.ITABASHI,et al. Hardware Implementation of a Real-time Operating System[J].Proceedings of the Twelfth TRON Project International Symposium,IEEE Computer Society Press,Nov,1995,pp.34-42.
    [14] PAUL KOHOUT,BRINDA GANESH,BRUCE JACOB. Hardware Supportfor Real-time Operating Systems[C].CODES-ISSS’03,October 1-3,2003,Newp -ort California,USA.Automation and Test in Europe Conference (DATE’03),2003,pp.45-51.
    [15] T. NAKANO,U. ANDY,M. ITABASHI,et al.VLSI Implementation and Evaluation of a Real-Time Operating System[C].Transactions of IEICE,Vol.J78-D-I,No.8 (Aug. 1995),in Japanese,pp.679-685.
    [16] P.KOHOUT,B.GANESH and B.JACOB.Hardware support for real-time operating systems[C] . Design , Automation and Test in Europe Conference(DATE’03),2003,pp.45-51.
    [17] VINCENT J,MOONEY III.Hardware/software partitioning of operating systems[C].In:Design,Automation and Test in Europe Conference (DATE’03),2003,vol.2,pp.338-339.
    [18]黄智伟,王彦.FPGA系统设计与实现[M].北京:电子工业出版社.2005: 13-154.
    [19]陈大林,任祖平.基于单片机的步进电机运行控制系统设计[J].伺服控制,2005,6(2):54-56.
    [20]李志军,李欣然,石吉银等.用CPLD实现多通道数据采集系统的A/D转换器控制电路设计[J].继电器,2006,34(12):53-57.
    [21]尹震宇,赵海,张文波等.一种嵌入式硬件多线程处理器的研究[J].东北大学学报:自然科学版,2006,(09):239-244.
    [22]尹震宇,赵海,王金英等.一种嵌入式处理器上的HOS设计[J].计算机工程,2008,34(05):268-270.
    [23]张大伟.RTOS调度器的软硬件实现[J].世界电子元器件,2007,(1),48-50.
    [24]王传福,周学海.提高硬件多线程处理器性能的方法[J].计算机工程,2007,33 (04):239-241.
    [25]马吉军.CPU/FPGA混合架构上硬件线程执行机制的研究[D].浙江大学,2008.
    [26]高丰,刘鹏,姚庆栋.基于系统集成芯片的RT的软硬件划分算法的研究[J].信号处理,2001,17(增刊):582-585.
    [27]刘鹏,李东晓,姚庆栋等.面向HDTV解码应用的RISC核的软硬件协同设计[C].中国电子学会电路与系统学会第16届年会(ICCAS2001).宁波2001-5.
    [28] CHEN TIANZHOU,WU XINGLIANG, HU WEI.Research on OS-Awarefor Real-time Operating Systems[C].CODES-ISSS’03,October 1-3,2003,Newp -ort California,USA.Automation and Test in Europe Conference (DATE’03),2003,pp.45-51.
    [15] T. NAKANO,U. ANDY,M. ITABASHI,et al.VLSI Implementation and Evaluation of a Real-Time Operating System[C].Transactions of IEICE,Vol.J78-D-I,No.8 (Aug. 1995),in Japanese,pp.679-685.
    [16] P.KOHOUT,B.GANESH and B.JACOB.Hardware support for real-time operating systems[C] . Design , Automation and Test in Europe Conference(DATE’03),2003,pp.45-51.
    [17] VINCENT J,MOONEY III.Hardware/software partitioning of operating systems[C].In:Design,Automation and Test in Europe Conference (DATE’03),2003,vol.2,pp.338-339.
    [18]黄智伟,王彦.FPGA系统设计与实现[M].北京:电子工业出版社.2005: 13-154.
    [19]陈大林,任祖平.基于单片机的步进电机运行控制系统设计[J].伺服控制,2005,6(2):54-56.
    [20]李志军,李欣然,石吉银等.用CPLD实现多通道数据采集系统的A/D转换器控制电路设计[J].继电器,2006,34(12):53-57.
    [21]尹震宇,赵海,张文波等.一种嵌入式硬件多线程处理器的研究[J].东北大学学报:自然科学版,2006,(09):239-244.
    [22]尹震宇,赵海,王金英等.一种嵌入式处理器上的HOS设计[J].计算机工程,2008,34(05):268-270.
    [23]张大伟.RTOS调度器的软硬件实现[J].世界电子元器件,2007,(1),48-50.
    [24]王传福,周学海.提高硬件多线程处理器性能的方法[J].计算机工程,2007,33 (04):239-241.
    [25]马吉军.CPU/FPGA混合架构上硬件线程执行机制的研究[D].浙江大学,2008.
    [26]高丰,刘鹏,姚庆栋.基于系统集成芯片的RT的软硬件划分算法的研究[J].信号处理,2001,17(增刊):582-585.
    [27]刘鹏,李东晓,姚庆栋等.面向HDTV解码应用的RISC核的软硬件协同设计[C].中国电子学会电路与系统学会第16届年会(ICCAS2001).宁波2001-5.
    [28] CHEN TIANZHOU,WU XINGLIANG, HU WEI.Research on OS-Aware

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

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

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