基于Linux的嵌入式实时系统的研究与实现
发布时间:2018-01-11 02:12
本文关键词:基于Linux的嵌入式实时系统的研究与实现 出处:《华中科技大学》2012年硕士论文 论文类型:学位论文
更多相关文章: 嵌入式系统 实时系统 Linux内核 进程调度
【摘要】:随着嵌入式系统的蓬勃发展,嵌入式产品已经遍布我们身边左右,嵌入式产品也日趋复杂化,而Linux系统以其源代码完全公开,高稳定性,高兼容性,支持多种处理器架构,功能丰富可裁剪等优良特点吸引了众多嵌入式开发者的目光。而Linux最初是按照桌面分时系统设计的,所以其对实时性的支持不是很完善,其设计原则是尽量提高系统的平均实时响应和处理速度,,尽管在2.6以后版本也加入了一些对实时性的支持,包括O(1)算法,内核可抢占机制等,但是其对实时任务的响应还是有很多不足。所以要把Linux应用于嵌入式实时系统,仍需要一定的改造。 本文详细分析了Linux内核中与实时性有关的代码,主要包括Linux的进程调度机制和中断机制等,对现今操作系统常用的进程调度算法做了分析和比较,对Linux系统历代版本对调度算法的补充改进和对内核可抢占机制做了研究。然后针对Linux内核对实时性支持的弱点进行了改进,改进主要体现在如下几个方面:首先针对Linux内核进程调度代码中缺少对周期性任务的支持,因而加入周期性调度算法,并改进了等待队列机制,加入了进程调度类;然后为应对系统负载较高,中断较频繁的情况,进行了中断线程化改造;最后进行了系统时钟机制的改进。然后验证和分析了上述改进的有效性,尤其是在重负载情况下,改进的效果更为明显。最后把改进后的Linux系统移植到了以ARM9作为处理器的mini2440上,实现了一个基于Linux的嵌入式实时系统。 本文的研究成果可以用于对实时性能要求较高的嵌入式应用中,其实时性能可以达到十微秒的数量级,可以满足大部分嵌入式实时系统的要求。
[Abstract]:With the vigorous development of embedded system, embedded products have spread around us, embedded products are becoming more and more complicated, and Linux system with its source code completely open, high stability, high compatibility. Many embedded developers have attracted the attention of many embedded developers for their excellent features, such as supporting a variety of processor architectures, rich features and tailoring. However, Linux was originally designed according to the desktop time-sharing system. Therefore, its support for real-time is not very perfect, its design principle is to improve the system's average real-time response and processing speed as far as possible, although some support for real-time is also added in the 2.6 version. It includes OF-1) algorithm, kernel preemptive mechanism and so on, but its response to real-time task still has many shortcomings. Therefore, to apply Linux to embedded real-time system, we still need some modification. In this paper, the real-time code in Linux kernel is analyzed in detail, including the process scheduling mechanism and interrupt mechanism of Linux. This paper analyzes and compares the process scheduling algorithms commonly used in today's operating system. This paper studies the supplement and improvement of scheduling algorithm in successive versions of Linux system and the mechanism of kernel preemption. Then it improves the weakness of real-time support in Linux kernel. The improvement is mainly reflected in the following aspects: first, the lack of support for periodic tasks in the Linux kernel process scheduling code, so the periodic scheduling algorithm is added, and the waiting queue mechanism is improved. Add the process scheduling class; Then, in order to deal with the situation that the system load is high and the interruption is frequent, the interrupt threading transformation is carried out. Finally, the system clock mechanism is improved, and the effectiveness of the above improvements is verified and analyzed, especially in heavy load cases. Finally, the improved Linux system was transplanted to the mini2440 with ARM9 as the processor. An embedded real-time system based on Linux is implemented. The research results of this paper can be used in embedded applications with high real-time performance. The real-time performance can reach the order of 10 microseconds and can meet the requirements of most embedded real-time systems.
【学位授予单位】:华中科技大学
【学位级别】:硕士
【学位授予年份】:2012
【分类号】:TP368.1
【参考文献】
相关期刊论文 前10条
1 周红霞;嵌入式Linux系统的引导过程及启动代码分析[J];电脑开发与应用;2005年02期
2 康望星,马光胜,黄烨明,芦东昕;嵌入式Linux的中断处理技术研究[J];信息技术;2005年08期
3 洪雪玉;张凌;袁华;;Linux下的实时调度算法[J];华南理工大学学报(自然科学版);2008年04期
4 刘航;刘全;凌俊银;;一种基于嵌入式Linux操作系统通信管理机的设计与实现[J];电力系统保护与控制;2009年01期
5 郑浩,徐国治;ARM Linux中断处理实时性能分析[J];计算机工程与应用;2005年19期
6 金西,黄汪;嵌入式Linux技术及其应用[J];计算机应用;2000年07期
7 曹计昌,余隽;关于提高Linux核心实时处理能力的讨论[J];计算机应用;2001年01期
8 张玉馥;Linux在嵌入式系统中有关进程调度算法的实时性改进[J];辽宁大学学报(自然科学版);2004年04期
9 宁勇;嵌入式操作系统综述[J];邵阳学院学报(自然科学版);2004年02期
10 曹程远;U-Boot在S3C2410上的移植[J];微型电脑应用;2005年07期
本文编号:1407702
本文链接:https://www.wllwen.com/kejilunwen/jisuanjikexuelunwen/1407702.html