The Research of the Real-time of the Linux

Author
JiangNan
Advisor
ZhaoHongWei
School
Jilin University
Major
Applied Computer Technology
Classification
TP316.81
Degree
Master's thesis
Year
2010
Downloads
114
Citations
0

Request the full text

Abstract

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.

Table of contents

Summary 4-7 Chapter 1 Introduction 7-13 1.1 research background 7-8 1.2 development in the world 8-10 1.2.1 related to international product development status 8-9 Configuring domestic related products is the development of the status quo 9-10 1.3 the significance of topics 10-11 1.4 of this article work with paper structure 11-13 Chapter 2 of embedded real-time systems with Linux kernel analysis 13-30 2.1 embedded operating system 13-16 2.1.1 Classification of embedded real-time systems 14 2.1.2 real-time systems , the concept of 14-15 important indicator of the 2.1.3 Real-Time Systems 15-16 2.2 Linux kernel analysis 16-30 2.2.1 Linux system structure 17-18 2.2.2 Linux processes and process scheduling 18-24 2.2.3 Linux interrupt handling mechanism 24-29 2.2.4 Linux clock interrupt 29-30 Chapter 3 of the Linux kernel real - time performance improvements 30-50 3.1 the Linux weak real-time performance analysis 30-31 3.2 Linux kernel real-time method 31-33 3.2.1 directly modify the kernel 32 3.2.2 dual-core method 32-33 3.3 Linux process scheduling mechanism to improve 33-43 3.3.1 scheduling algorithm selection 33-35 3.3.2 modify the scheduling algorithm to achieve 35-43 3.4 refinement timer granularity 43-50 3.4.1 optimization selection 43-45 3.4.2 optimize the realization of the program 45-50 Chapter 4 real-time testing 50-54 4.1 initialize the test environment 50 4.2 Testing Laboratory 50-54 4.2.1 interrupt latency test 50-51 4.2.2 context switching time test 51-54 Chapter 5 Conclusions 54-56 References 56-59 thank 59-60 Summary 60-63 Abstract 63-65

Related dissertations

  1. Research and Realization of Video Surveillance and Play Based on ARM9Hardware Platform
    PanZuoZuo ·Dalian Polytechnic University ·2010 ·Master's thesis
  2. Research and Design of Embedded Building Security System
    YangChen ·Liaoning Normal University ·2012 ·Master's thesis
  3. The Softeware Design and Implement on Integrated Intelligent Camera Platform Based on Davinci DM6446
  4. The Research of Household Remote Monitoring Based on Embedded Web Server
  5. Research and Design of Intelligent Video Surveillance System Based on ARM
  6. Design of Video Monitoring System Based on the Embedded
  7. The Design of Embedded Network Video Surveillance System Based on ARM9
  8. Design and Application of the Distributed Monitoring System Based on Embedded Web
  9. Study on Embedded Data Acquisition System Application
    ZhangDong ·Dalian Polytechnic University ·2009 ·Master's thesis
  10. Embedded Software Design of AC Field Detection Instrument Based on ARM
  11. Research and Realization on the Key Technology of Monitoring System about Granary Environment Based on ARM9
    SunZuoLi ·Hunan University ·2013 ·Master's thesis
  12. Based on the Samsung2440Embedded Home Furnishing Design and Implementation of Intelligent Control System
  13. Research on Real-time Performance of CAN
    TangZongMei ·Hubei University of Technology ·2013 ·Master's thesis
  14. Design of Industrial Ethernet Motion Controller Based on ARM
  15. Research on Pulsating Vacuum Pressure Steam Sterilization Control System Based on ARM
    FuAiJun ·Nanchang University of Aeronautics and ·2013 ·Master's thesis
  16. The software design of intelligent control Home Furnishing gateway based on ARM11
    ZuoPengZuo ·Northwestern University ·2013 ·Master's thesis
  17. Reaearch on Modeling and Optimization Strategy in Industry Multi-service Real-time Networks
    LuLi ·Zhejiang University ·2013 ·Doctoral dissertation
  18. The System Design and Implementation of Smart Home Control Terminal Based on Linux
  19. Movement Gait Control Research of Six Feet Bionic Robot
    XuShuai ·Ningxia University ·2013 ·Master's thesis
  20. Research on Embedded Control System for Palletizing Robot
    YangYang ·Nanjing Forestry University ·2013 ·Master's thesis