Font Size: a A A

Research And Improvement Of Linux Real-time Scheduling

Posted on:2015-01-14Degree:MasterType:Thesis
Country:ChinaCandidate:Z Y WuFull Text:PDF
GTID:2308330464468047Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the development of information technology, real-time operating system has a broad application prospect, especially in the field of embedded system. As a free open-source operating system, linux has become an ideal choice for real-time operating system due to its stable performance, wide applicability and easy customization. As a common time-sharing operating systems, Linux has been extensively developed in the aspect of real-time support.In order to optimize linux real-time performance, this paper analyzes Linux preemptible kernel and process scheduling algorithms, compares the existing technologies of improving linux real-time performance, and proposes a real-time optimization algorithm for a specific application pattern. The main results obtained in this paper are outlined as follows:1. Preemption of Linux kernel has been studied. The modifications of Linux kernel source code aiming to enhance real-time performance have been studied. In order to achieve a preemptive kernel, the main modifications of kernel source code has been done in the following aspects: a preemptive counter is added in thread_info structure, which is used to determine whether preemption is performed; kernel spinlock code is modified to assure that the process in critical section of kernel does not allow to be preempted.2. The real-time scheduling algorithms provided by Linux have been analyzed. Linux scheduler offers a variety of process scheduling policies implemented by scheduling classes. Completely fair scheduling algorithm, real-time scheduling algorithm and related critical data structure and functions are also analyzed in detail.3. The technologies of improving real-time performance have been studied. The improvement work is focused on scheduling framework, scheduling algorithm delay, scheduling algorithm itself and kernel interface: analyzes and compares the Slot-Based Task-Splitting scheduling framework and common framework; studies the modifications of RT-patch which is aiming to reduce delay, including threaded interruptand priority inheritance; compares the existing hard real-time, soft real-time scheduling algorithms from the perspective of the problem schema; reviews the optimization scheme of kernel interface API, such as RTAI and Xenomai.4. An optimization scheme of real-time based on a particular application pattern has been presented. First, associated processes have been set to a specifed cpu core by users based on the correlation algorithm. Second, Weighted Round Robin scheduling policy has been proposed based on SCHED_RR scheduling policy, which can set time slice according to weight parameter. Therefore, the time slice of real-time process with SCHED_WRR scheduling policy is no longer fixed, but calculated by weight parameter defined in the process code. Finally, the function implemented by the real time scheduling algorithm has been tested and verified. Comparing with SCHED_RR scheduling policy, the result shows that SCHED_WRR scheduling policy has a better real time performance under the specific application pattern.
Keywords/Search Tags:Linux kernel, scheduling algorithm, real time, preemption
PDF Full Text Request
Related items