Font Size: a A A

Research And Implementation Of Embedded Real-time System μC/OS-Ⅱ Kernel Performance Improvement

Posted on:2010-09-02Degree:MasterType:Thesis
Country:ChinaCandidate:C JiangFull Text:PDF
GTID:2178360272499611Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Real-time systems are mainly designed to satisfy real world application need corelated with timing factor. A real-time system concerns not only the logic correctness of the computing results,but also the time when the results come out. The corresponding handling process must be completed before deadline,or the system will breakdown. Otherwise, in real-time system, priority inversion phenomenon may occur frequently under condition of multiple tasks sharing resources, and it will lead to system failure. So task scheduling and resource management is the most important part need to be concerned in real-time operating system.This paper useμC/OS-Ⅱas reaserch object.μC/OS-Ⅱadopt a preemptive scheduling strategy and its kernel is code free.μC/OS-Ⅱassigns each task for an unique priority before executing, but it does not support dynamic priority scheduling. In practical application, real-time systems may has more Priority allocation requests. Aiming at this problem, by extending real time kernel ofμC/OS-Ⅱand modifying the low layer data structure, this paper embedded EDF scheduling algorithm inμC/OS-Ⅱscheduler to reaalize dynamic priority tasks scheduling which meet the requirements while priority changing with its execution.As to stack,μC/OS-Ⅱassigns each task for an unique stack. Stack space allocate in accordance with the biggest needs of the tasks. This approach can ensure reliable operation procedures,but it is a waste of space resource. For some small systems, there is no expansion of external RAM, and internal RAM is rather precious, RAM's space utilization is very important. This paper improved theμC/OS-Ⅱkernel stack structure, a sharing task stack is established so that limited RAM space can meetμC/OS-Ⅱreal-time requirements. Experiment verification improved that newμC/OS-Ⅱkernel stack structure is available.For real-time kernel adopting preemptive priority, priority inversion phenomenon may occur frequently under condition of multiple tasks sharing resource. Some unpredictable errors of real-time application system perhaps derive from this phenomenon. This paper expounds the cause of priority inversion problem and its effect for real-time system performance firstly, and then,two approaches named scheduler lock and priority ceiling protocol are employed inμC/OS-Ⅱfor reducing priority inversion phenomenon. By experiment verification, the two methods reduce priority inversion effectively inμC/OS-Ⅱ. Finally, the performance of the two methods had been compared and analyzed.
Keywords/Search Tags:real-time system, dynamic priority scheduling, stack, priority inversion, priority ceiling
PDF Full Text Request
Related items