在嵌入式应用中增强Linux实时性的方法研究  被引量:12

A method of enhancing the real-time capability of Linux

在线阅读下载全文

作  者:李凡[1] 卢社阶[1] 邱鹏[1] 林爱武[1] 

机构地区:[1]华中科技大学计算机科学与技术学院,湖北武汉430074

出  处:《华中科技大学学报(自然科学版)》2005年第2期82-85,共4页Journal of Huazhong University of Science and Technology(Natural Science Edition)

基  金:国家高性能计算基金资助项目(00303).

摘  要:在分析Linux实时性的同时,指出了将其应用于实时系统时所存在的不足,提出了一种提高Linux实时性的思想及实现方法.该方法将进入系统的所有任务按实时性要求不同分成硬实时任务、软实时任务和非实时任务三种,依次用task-struct结构中policy属性的取值SCHED-FIFO,SCHED-RR和SCHED-OTHER作为标识,把原Linux的单运行队列改为双运行队列.为严格保证硬实时任务的实时性,将其单独放在一个队列中,由指针数组的元素run-queue[0]指向,采用FIFO调度算法;软实时任务和非实时任务放在一个队列中,由指针数组的元素run-queue[1]指向,采用RR调度算法,通过抢占方式保证软实时任务优先于非实时任务.修改sched()函数的调度流程,使有实时性要求的任务尽可能多的得到调度机会;同时修改中断处理流程,实现可抢占式改造,达到硬实时任务可抢占软实时和非实时任务,软实时任务可抢占非实时任务的目的.This paper focused on the application of Linux in the embedded system. The real-time performance of Linux was analyzed, and its disadvantage was pointed out when applied to the embedded system. An effective method capable of improving the real-time performance of Linux was presented. The tasks entered into the system were divided into hard real-time tasks, soft real-time ones and non real-time ones by their different requirements of the real-time. Each type was noted by its policy value such as SCHED_-FIFO,SCHED_-RR and SCHED_-OTHER in task_-struct accordingly, and a double run queue used instead of the original single run queue. To ensure the requirements of the hard real-time tasks, these tasks were organized in a run queue pointed by run_-queue[0], an element of a point array, and FIFO schedule strategy was used for them. The soft real-time tasks and non real-time tasks were put into the other run queue pointed by run_-queue[1], the other element of the point array, and RR schedule strategy was used for them. One is to modify the procedure of the sched( ) function to schedule more the tasks witch real-time requirements, and the interrupt processing procedure was also modibied, soft real-time tasks and non real-time tasks being occupied by hard real-time tasks and non real-time tasks occupied by soft real-time tasks.

关 键 词:嵌入式操作系统 LINUX操作系统 实时性 调度策略 

分 类 号:TP316.8[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象