Font Size: a A A

Research On Improving Linux Real-time Performance And Its Application In A Measurement And Control System

Posted on:2006-06-22Degree:MasterType:Thesis
Country:ChinaCandidate:Z W LiFull Text:PDF
GTID:2168360155472377Subject:Electrical engineering
Abstract/Summary:PDF Full Text Request
It is self-evident that the importance of the real-time operating system (RTOS) in areal-time measurement and control system. At present, great majority of commonly usedcommercial RTOSs in domestic markets are foreign products with high price, so wehave urgent need to develop the RTOSs of ourselves. The free and open-sourceoperating system Linux brings us an opportunity to change the passive situation. Somekinds of real-time Linux have been developed and applied in practical engineeringsuccessfully abroad, but the studies in this area in our country are just in germ and theexamples of an industrial PC (IPC) measurement and control system which has areal-time Linux are few. Under this background, this dissertation expounds the author'sstudies and practice in enhancing the real-time capability of Linux, which is focused onimproving real-time performance and developing real-time measurement and controlsystem.First, the dissertation analyzes kernel clock and scheduling mechanism of Linux,emphasizes on schedule algorithms and policices of real-time and normal processes, andthen summarizes factors that affect its real-time performance. Then, introduces maintechniques in enhancing the real-time capability of Linux, which are commonly realizedby bottom layer programming. There are two major ways for bottom layer programming,external extension and kernel modification. The dissertation analyzes the implementidea of mainstream real-time Linux, especially the implement idea of RTLinux, which isa hard real-time Linux most suitable for industrial measurement and control system. InRTLinux, the 8254 timer chip is put to one-shot mode to reduce the overhead broughtby high frequently interrupts of CPU while the system acquires high resolution timer.This dissertation studies the algorithm of the initial value for 8254 working in theone-shot mode. After all of the work above, a real-time measurement and control systemis developed based on RTLinux.On the basis of studies above, a scheme of enhancing the real-time capability ofLinux kernel is put forward, which is applied to a concrete IPC system. To make systemrun faster and more stable, some parts of Linux kernel hampering real-time performanceare cut out. Timer chip 8254 is put in one-shot mode by using modified UTIMEpackage, which improves the timer resolution of the OS and reduces CPU's burden.Interval timers are used to generate periodical soft inerrupt signals. The real-timeprocess running in the measurement and control system is set to highest priority, whichmake it can't be preempted by other processes, hence, the real-time process rarelyinfluenced by normal process. Facing on the constitution of tasks in the concrete IPCmeasurement and control system, a simplified scheduler is designed, which is conciseand efficient. Lastly, a real-time measurement and control system is developed based onthe scheme. By running test, the system has been authenticated to meet demand ofreal-time performance and stability and the scheme is feasible.
Keywords/Search Tags:Linux, Enhancing real-time capability, IPC, RTLinux, Real-time measurement and control system
PDF Full Text Request
Related items