分析了 Linux 的实时性,针对其在实时应用中的技术障碍,在参考了与此相关研究基础上,从三方面提出了改善Linux 实时性能的改进措施。为提高嵌入式应用响应时间精度,提出两种细化Linux 时钟粒度方法;为增强系统内核对实时任务的响应能力,采用插入抢占点和修改内核法增强Linux 内核的可抢占性;为保证硬实时任务的时限要求,把原Linux 的单运行队列改为双运行队列,硬实时任务单独被放在一个队列中,并采用MLF 调度算法代替原内核的FIFO 调度算法。关键词:Linux;实时性;调度策略;抢占Abstract: The real-time performance of Linux is analyzed, and its disadvantage is pointed out when applied to the embedded system. Inspired mostly by some real time improvements of Linux, this article gives rise to three aspects to improve the real-time capability of Linux. To improve the time precision for embedded applications, two methods for creating accurate timer are proposed. To enhance the response ability of real-time task, inserting preemption points and the preemption kernel methods are adopted to enhance the preemptability of Linux kernel. To ensure the requirements of the hard real-time tasks, a double run queue is used instead of the original single run queue, these tasks are organized in one run queue and MLF schedule strategy is used for them.Key word: Linux;Real-time;Schedule strategy;Preemption