基于EDF的Linux2.6系統(tǒng)多核調(diào)度研究
發(fā)布時(shí)間:2018-06-04 00:50
本文選題:多核處理器 + 調(diào)度策略; 參考:《成都理工大學(xué)》2012年碩士論文
【摘要】:微處理器從誕生到現(xiàn)在的短短六十多年,有著飛速的發(fā)展。從通過(guò)提高主頻速度,在芯片上集成越來(lái)越多晶體管的“縱向”發(fā)展,到近幾年研究人員“橫向”的對(duì)處理器體系結(jié)構(gòu)進(jìn)行多核研發(fā),伴隨而來(lái)的要求是必須有更加出色的上層系統(tǒng)來(lái)適應(yīng)其卓越的硬件并行性能,使上層系統(tǒng)也具備并發(fā)運(yùn)行的處理模式;诖嗽,內(nèi)核開源的Linux系統(tǒng)的發(fā)展前景是不錯(cuò)的,但由于Linux系統(tǒng)設(shè)計(jì)之初是沒有定義為實(shí)時(shí)系統(tǒng)的,所以為了適應(yīng)當(dāng)前對(duì)現(xiàn)代化操作系統(tǒng)的要求,我們需要對(duì)Linux系統(tǒng)的內(nèi)核調(diào)度進(jìn)行改進(jìn)來(lái)增強(qiáng)它的實(shí)時(shí)性能。 本文正是基于上述原因,提出了一個(gè)解決方案,其思路是:采用在單核系統(tǒng)上使用較為成熟的時(shí)間截止優(yōu)先級(jí)算法,即EDF算法,將此算法代碼以一個(gè)完整的結(jié)構(gòu)體,通過(guò)Linux2.6系統(tǒng)內(nèi)核調(diào)度塊能夠以模塊擴(kuò)展方式移植新算法的原理,使得EDF算法能夠應(yīng)用在多核處理器平臺(tái)下的Linux2.6系統(tǒng)上,進(jìn)行任務(wù)的分配和調(diào)度。 本研究方案中,在多核處理器上先用單核進(jìn)行利用率計(jì)算,然后對(duì)等待任務(wù)序列進(jìn)行分配到其它核運(yùn)行是一個(gè)新的嘗試,成功實(shí)施后可以使Linux2.6系統(tǒng)具備一定的實(shí)時(shí)功能。 本文研究任務(wù)來(lái)源于企業(yè)項(xiàng)目中關(guān)于Linux內(nèi)核調(diào)度的一個(gè)問題,主要的研究工作和取得的成果如下所示: 第一,介紹Linux調(diào)度相關(guān)技術(shù)的進(jìn)程,線程,,性能調(diào)度指標(biāo)和調(diào)度算法等相關(guān)內(nèi)容。然后提出研究方案,對(duì)整體工作流程進(jìn)行分析與說(shuō)明; 第二,對(duì)EDF算法中關(guān)于處理周期性任務(wù)與不定期任務(wù)的利用率計(jì)算,任務(wù)截止時(shí)間臨近時(shí)優(yōu)先級(jí)的反轉(zhuǎn),和任務(wù)隊(duì)列中優(yōu)先級(jí)排序變化這三個(gè)關(guān)鍵技術(shù)詳細(xì)分析; 第三,從多核處理器的體系結(jié)構(gòu),和它的調(diào)度思想尋找出多核調(diào)度的脈絡(luò)和關(guān)鍵點(diǎn),進(jìn)而分析出多核調(diào)度策略和具體管理方式; 第四,將研究方案中EDF算法移植到Linux2.6系統(tǒng)內(nèi)核的過(guò)程進(jìn)行具體的分析與講解; 第五,為了進(jìn)一步驗(yàn)證相關(guān)理論,在EDF算法成功移植到多處理平臺(tái)的Linux系統(tǒng)內(nèi)核后進(jìn)行測(cè)試實(shí)驗(yàn),分析結(jié)果; 第六,通過(guò)實(shí)驗(yàn)得出與一個(gè)任務(wù)池(單核)上分配后運(yùn)行任務(wù)的方式相比,我們通過(guò)在多核處理器平臺(tái)下,用一核分配任務(wù),其它核進(jìn)行數(shù)據(jù)計(jì)算的思想,使得Linux2.6系統(tǒng)在多核處理器上實(shí)時(shí)性能得到加強(qiáng)。 通過(guò)本方案的應(yīng)用,對(duì)在多核處理器平臺(tái)下的Linux2.6系統(tǒng)的調(diào)度延遲時(shí)間進(jìn)一步縮小,且隨著多核處理器上CPU數(shù)量的不斷增多,我們預(yù)測(cè)這種延遲會(huì)大大減少,具有巨大經(jīng)濟(jì)效益。
[Abstract]:Microprocessor from the birth to the present short 60 years, has a rapid development. From the "vertical" development of integrating more and more transistors on chips by increasing the speed of the main frequency, to the "horizontal" development of processor architecture by researchers in recent years, The accompanying requirement is that there must be a more excellent upper system to adapt to its excellent hardware parallel performance, so that the upper system also has the processing mode of concurrent operation. For this reason, the development prospect of Linux system with open source kernel is good, but because Linux system was not defined as real-time system at the beginning of design, so in order to adapt to the requirement of modern operating system, We need to improve the kernel scheduling of Linux system to enhance its real-time performance. Based on the above reasons, a solution is proposed in this paper. The idea is to use the mature time cut-off priority algorithm (EDF algorithm) on a single core system, and make the code of this algorithm a complete structure. Through the principle that the kernel scheduling block of Linux2.6 system can transplant the new algorithm in the mode of module extension, the EDF algorithm can be applied to the Linux2.6 system under the multi-core processor platform for task allocation and scheduling. In this scheme, it is a new attempt to calculate the utilization rate with single core on the multi-core processor, and then assign the waiting task sequence to other cores. After successful implementation, the Linux2.6 system can have certain real-time function. The research task in this paper comes from a problem about Linux kernel scheduling in enterprise projects. The main research work and the results obtained are as follows: Firstly, the process, thread, performance scheduling index and scheduling algorithm of Linux scheduling technology are introduced. Then put forward the research program, analyze and explain the whole workflow; Secondly, the three key technologies of EDF algorithm, such as computing the utilization ratio of processing periodic and indefinite tasks, reversing the priority when the deadline of the task approaches, and changing the priority ranking in the task queue, are analyzed in detail. Thirdly, we find out the context and key points of multi-core scheduling from the architecture of multi-core processor and its scheduling thought, and then analyze the multi-core scheduling policy and specific management methods. Fourthly, the process of transplanting EDF algorithm to the kernel of Linux2.6 system is analyzed and explained. Fifth, in order to further verify the relevant theory, the EDF algorithm was successfully transplanted to the multi-processing platform of the Linux system kernel test experiment, analysis of the results; Sixthly, compared with the way the task is allocated on one task pool (single core), we use one core to allocate tasks and other cores to calculate the data on the platform of multi-core processor. The real-time performance of Linux2.6 system is enhanced on multi-core processor. Through the application of this scheme, the scheduling delay time of Linux2.6 system on multi-core processor platform is further reduced, and with the increasing number of CPU on multi-core processor, we predict that this delay will be greatly reduced and has great economic benefit.
【學(xué)位授予單位】:成都理工大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2012
【分類號(hào)】:TP316.81;TP332
【參考文獻(xiàn)】
相關(guān)期刊論文 前10條
1 蔣江,張民選,廖湘科;基于多種資源的負(fù)載平衡算法的研究[J];電子學(xué)報(bào);2002年08期
2 任曉瑞;時(shí)磊;;支持對(duì)稱多處理器結(jié)構(gòu)的操作系統(tǒng)設(shè)計(jì)[J];航空計(jì)算技術(shù);2008年02期
3 王s
本文編號(hào):1975055
本文鏈接:http://sikaile.net/kejilunwen/jisuanjikexuelunwen/1975055.html
最近更新
教材專著