Font Size: a A A

Research And Implementation Of RTOS Optimization For SMP Processor

Posted on:2021-02-26Degree:MasterType:Thesis
Country:ChinaCandidate:J Q ZhengFull Text:PDF
GTID:2518306308968029Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the application of multicore processors in the embedded system,the embedded real-time operating system for multicore processors has become a research hotspot in recent years.Although the introduction of multi-core architecture has brought performance improvement to embedded systems,under the multi-core architecture,multiple CPU-core competes to access resources shared between cores,which introduces more uncertainty to the real-time performance of the system.This paper found some shortages of some typical RTOS for SMP during research.Firstly,the FIFO spinlock algorithm,which is widely used as the underlying synchronization mechanism of multi-core operating systems,will affect the interrupt disable time of the system when the spinlock is queued.Secondly,the existing global scheduling mechanism lacks optimization,and the global task ready list can easily become the bottleneck of scheduling,which affects the real-time performance of task scheduling.Thirdly,software timer function provided by the multi-core RTOS often directly extend the implementation for unique processor,which lacks optimization considerations for multi-core environment.Based on the above research and analysis,on the basis of AntOS,which is self-developed RTOS prototype for SMP processor,this paper focuses on the optimization of kernel spinlock mechanism,global scheduling mechanism,and software timer function,trying to improve performance and expand function of prototype.The main work and innovations are as follows:Firstly,the IRS(Interrupt Responsive Spinlock)spinlock mechanism proposed and implemented in this paper allows the CPU-cores to respond to interrupts in time under the premise of ensuring the mutual exclusion of the kernel critical section,thanks to the CPU-cores enable interrupt during spin waiting and disable interrupts while holding lock,which can effectively eliminate the effect of spinlock queuing on the real-time performance of system interrupt response;Secondly,while optimizing the global scheduling mechanism of prototype,the Priority Bit Lock is proposed and implemented in this paper,which allows multiple CPU-cores to access global task ready list in parallel,reducing task scheduling delay and improving the real-time performance of task scheduling;Thirdly,this paper expands and improves the functions of the prototype,including implementation of fine-grained critical section granularity,interrupt nesting function and software timer function,among which the software timer implemented for multi-core environment,by assigning the multiple callbacks to different CPU-cores,can avoid the timer precision problem caused by the time-consuming callbacks that can only be executed serially under the traditional single-core implementation.This paper tests and verified the optimized AntOS on the iMX6Q embedded board equipped with ARM Cortex-A9MP quad-core SMP processor.The test results show that the functions of the optimized RTOS are running normally.The above optimization measures can effectively reduce the system interrupt disable time and task scheduling delay,and improve the real-time performance of the system.
Keywords/Search Tags:SMP, multi-core RTOS, spinlock, global scheduling, software timer
PDF Full Text Request
Related items