Font Size: a A A

The Research Of The Real-time Of The Linux

Posted on:2011-12-14Degree:MasterType:Thesis
Country:ChinaCandidate:N JiangFull Text:PDF
GTID:2178360305455211Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Nowadays, with the fast development of embedded system product, the claim toembedded system is more and more rigorous. However, there is not a mature orcomprehensively applied product in China. As the mature software, Linux bring the firstlight of morning for our country with its open source, high stability, low cost and someother characteristics. In the beginning, Linux is designed on the basis of fundamentals thatthe average response time is as possible as short and the throughput is as possible as high,which is for a operation system. Some characteristics like coarse time granularity,frequently interrupt disable for protecting data's safety and consistency and the use ofvirtual memory,which lead to real time deficiency when Linux is used in some real timeclaim environment .So improving on real-time support of Linux system is becoming a hottopicoftheresearch.With more and more company. research communityand amateur participating in Linuxreal time performance research, a lot of achievements come out .Although goals are same,improving real time performance, the solutions are different and worth reference, whichhave different starting point, like decreasing use of interrupt or closing interrupt, realizingpreempted kernel, using double kernel, refine time granularity, threaded interrupts and soon. These solutions are successful for improving system real time ability in some aspects,someofwhicharepracticallyappliedanddeveloprelativeproducts.This paper is based upon studying relative theory of Linux. The solutions of improvingreal time ability of Linux system are analyzed by modifying process schedule and timegranularityofkernel.The fit task Process will be selected by scheduling algorithm to handle among manyprocesses and fix on process runtime, which directly influence system real-timeperformance. Although Linux adopt advanced O(1) algorithm, it doesn't take into accountsystem dynamic operation, which will lead to low system real-time ability by adoptingstatic priority algorithm to schedule system process. This paper adopt lowest slackpriorityalgorithm to improve former algorithm, which consider the factor with relationshiptotime.Basedonthenewalgorithm,systemscheduleisnotonlyrelatedtoprocesspriority,but also related to process pressing degree—the slack。When the system schedule system process, it determines a certain process to run, which is most compatible to least slack firstalgorithm and to process priority.Because of considering the slack, the system may frequently switch some processeswhich have the same priority and similar slack. It will bring on extra burden and influencesystem performance. To solve this problem, this paper adopt feedback and threshold valueto decrease probability of problem occurring, which will improve system performance.Time interrupt play an important role in the system. When time interrupts occur,system will inspect process running state, providing an opportunity to schedule, which isimportant for improving system real time performance.This hope of the paper firstly is to improve on system performance by increasing timeclock frequency, but it failed. Later based upon KURT advanced theory , This paper adoptenhancing time granularity to improve system real time ability by means of one-shottriggering。The core of one-shot triggering time interrupt is that: the system need not have torespond to any change every time, but only make response when having to respond.Optimization scheme is carried out with PIT8254, time stamp counter-TSC and soft timer.At first, using TSC to time accurately, and using 8254 to bring out time interrupt. Whentime interrupt occur, system examine whether there are mature timers or not at the next timecycle. If there are mature timers, system calculate parameters which are based on maturetime. The parameters are used to modify 8254 control registers,which will bring out aninterrupt and make relative operation when system is at specific time. By this way, it isequivalent to enhancing system time frequency and refine time granularity. But it doesn'tincrease the system burden like only enhancing system time frequency.To estimate whether Linux performance is enhanced by the two modificationsmentioned above, the paper performs a relative test. First of all, the modified source code togenerate a new kernel file, by modifying the startup files, the system is running successfully.In order to test the system interrupt latency, I modify the clock interrupt service routine,firstly, through the TSC interrupt service routine to read the start-up time, and then removezero channel count of the PIT8254 and to carry out the two units conversion, and finally getout in microseconds as the unit of interrupt latency.In order to prove the higher performance of the context switch time, we create a fatherprocess and a son process, and two half- duplex pipes to pass message between the fatherand the son process. Because of the message ,the processes will be blocked. When theprocess switches, we record the right time with rdtsc() and calculate the value between the times. Through the two experiments, we can see that the performance of de systembecomes better in some degree.With the increasing popularity of Linux, it is used in more and more fields. But it isrestricted in many areas because of the deficiency of real time performance. I modify thekernel by modifying scheduling algorithm and refining time granularity. It is proved thatsystem real time performance is improved at a certain extent.
Keywords/Search Tags:Linux, System performance of the real-time, Scheduling Algorithm, Triggered timer interrupt
PDF Full Text Request
Related items