基于Linux的嵌入式實(shí)時(shí)系統(tǒng)的研究與實(shí)現(xiàn)
本文關(guān)鍵詞:基于Linux的嵌入式實(shí)時(shí)系統(tǒng)的研究與實(shí)現(xiàn) 出處:《華中科技大學(xué)》2012年碩士論文 論文類(lèi)型:學(xué)位論文
更多相關(guān)文章: 嵌入式系統(tǒng) 實(shí)時(shí)系統(tǒng) Linux內(nèi)核 進(jìn)程調(diào)度
【摘要】:隨著嵌入式系統(tǒng)的蓬勃發(fā)展,嵌入式產(chǎn)品已經(jīng)遍布我們身邊左右,嵌入式產(chǎn)品也日趨復(fù)雜化,而Linux系統(tǒng)以其源代碼完全公開(kāi),高穩(wěn)定性,高兼容性,支持多種處理器架構(gòu),功能豐富可裁剪等優(yōu)良特點(diǎn)吸引了眾多嵌入式開(kāi)發(fā)者的目光。而Linux最初是按照桌面分時(shí)系統(tǒng)設(shè)計(jì)的,所以其對(duì)實(shí)時(shí)性的支持不是很完善,其設(shè)計(jì)原則是盡量提高系統(tǒng)的平均實(shí)時(shí)響應(yīng)和處理速度,,盡管在2.6以后版本也加入了一些對(duì)實(shí)時(shí)性的支持,包括O(1)算法,內(nèi)核可搶占機(jī)制等,但是其對(duì)實(shí)時(shí)任務(wù)的響應(yīng)還是有很多不足。所以要把Linux應(yīng)用于嵌入式實(shí)時(shí)系統(tǒng),仍需要一定的改造。 本文詳細(xì)分析了Linux內(nèi)核中與實(shí)時(shí)性有關(guān)的代碼,主要包括Linux的進(jìn)程調(diào)度機(jī)制和中斷機(jī)制等,對(duì)現(xiàn)今操作系統(tǒng)常用的進(jìn)程調(diào)度算法做了分析和比較,對(duì)Linux系統(tǒng)歷代版本對(duì)調(diào)度算法的補(bǔ)充改進(jìn)和對(duì)內(nèi)核可搶占機(jī)制做了研究。然后針對(duì)Linux內(nèi)核對(duì)實(shí)時(shí)性支持的弱點(diǎn)進(jìn)行了改進(jìn),改進(jìn)主要體現(xiàn)在如下幾個(gè)方面:首先針對(duì)Linux內(nèi)核進(jìn)程調(diào)度代碼中缺少對(duì)周期性任務(wù)的支持,因而加入周期性調(diào)度算法,并改進(jìn)了等待隊(duì)列機(jī)制,加入了進(jìn)程調(diào)度類(lèi);然后為應(yīng)對(duì)系統(tǒng)負(fù)載較高,中斷較頻繁的情況,進(jìn)行了中斷線(xiàn)程化改造;最后進(jìn)行了系統(tǒng)時(shí)鐘機(jī)制的改進(jìn)。然后驗(yàn)證和分析了上述改進(jìn)的有效性,尤其是在重負(fù)載情況下,改進(jìn)的效果更為明顯。最后把改進(jìn)后的Linux系統(tǒng)移植到了以ARM9作為處理器的mini2440上,實(shí)現(xiàn)了一個(gè)基于Linux的嵌入式實(shí)時(shí)系統(tǒng)。 本文的研究成果可以用于對(duì)實(shí)時(shí)性能要求較高的嵌入式應(yīng)用中,其實(shí)時(shí)性能可以達(dá)到十微秒的數(shù)量級(jí),可以滿(mǎn)足大部分嵌入式實(shí)時(shí)系統(tǒng)的要求。
[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.
【學(xué)位授予單位】:華中科技大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2012
【分類(lèi)號(hào)】:TP368.1
【參考文獻(xiàn)】
相關(guān)期刊論文 前10條
1 周紅霞;嵌入式Linux系統(tǒng)的引導(dǎo)過(guò)程及啟動(dòng)代碼分析[J];電腦開(kāi)發(fā)與應(yīng)用;2005年02期
2 康望星,馬光勝,黃燁明,蘆東昕;嵌入式Linux的中斷處理技術(shù)研究[J];信息技術(shù);2005年08期
3 洪雪玉;張凌;袁華;;Linux下的實(shí)時(shí)調(diào)度算法[J];華南理工大學(xué)學(xué)報(bào)(自然科學(xué)版);2008年04期
4 劉航;劉全;凌俊銀;;一種基于嵌入式Linux操作系統(tǒng)通信管理機(jī)的設(shè)計(jì)與實(shí)現(xiàn)[J];電力系統(tǒng)保護(hù)與控制;2009年01期
5 鄭浩,徐國(guó)治;ARM Linux中斷處理實(shí)時(shí)性能分析[J];計(jì)算機(jī)工程與應(yīng)用;2005年19期
6 金西,黃汪;嵌入式Linux技術(shù)及其應(yīng)用[J];計(jì)算機(jī)應(yīng)用;2000年07期
7 曹計(jì)昌,余雋;關(guān)于提高Linux核心實(shí)時(shí)處理能力的討論[J];計(jì)算機(jī)應(yīng)用;2001年01期
8 張玉馥;Linux在嵌入式系統(tǒng)中有關(guān)進(jìn)程調(diào)度算法的實(shí)時(shí)性改進(jìn)[J];遼寧大學(xué)學(xué)報(bào)(自然科學(xué)版);2004年04期
9 寧勇;嵌入式操作系統(tǒng)綜述[J];邵陽(yáng)學(xué)院學(xué)報(bào)(自然科學(xué)版);2004年02期
10 曹程遠(yuǎn);U-Boot在S3C2410上的移植[J];微型電腦應(yīng)用;2005年07期
本文編號(hào):1407702
本文鏈接:http://sikaile.net/kejilunwen/jisuanjikexuelunwen/1407702.html