Font Size: a A A

Research On Task Switching Technology In Hardware Real-time Operating System

Posted on:2019-04-08Degree:MasterType:Thesis
Country:ChinaCandidate:X Q XuFull Text:PDF
GTID:2438330566490178Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the Internet of things becoming increasingly prevalent,the demand for smart devices such as intelligent terminals,smart sensors and other devices is growing rapidly.The embedded microprocessor unit and the Real-Time Operating System(RTOS)is the core of intelligent devices.The application of Internet of things puts forward higher requirements for the real-time performance,reliability and security of intelligent devices,and will further develop.In intelligent devices,embedded multi task real-time operation system is usually adopted.One side,RTOS and the user program are both operating in the CPU,which inevitably leads to a lower CPU utilization of user program.The response speed and system real-time performance will also get worse.On the o ther side,due to the parallelism of the software,the execution time of RTOS timer interruption is proportional to the number of tasks.In addition,addition switch time occupied by the CPU time is proportional to the task switching frequency in a multitasking operating system.And because each task takes different stack space,the task switching time will also change,that will reduce the system predictability.According to the above-mentioned shortcomings,the author studied the multitasking management mechanism,the clock mechanism,and the task switching mechanism of RTOS,proposed a performance optimization method.First,realize the task creation,task management,task switching,time management,semaphore and mutex management by using hardware implementation to form a Hardware Real-Time Operating System.Time management will be moved to the hardware part,due to the parallelism of hardware structure,the timer interrupt processing time has nothing to do with the number of tasks.Secondly,simplify the underlying code of ?C/OS-II,remove the realized function in HRTOS,increase corresponding communicate statements with HRTOS at the same time,this part will be called SRTOS.On the one hand,HRTOS and CPU can run in parallel,by this way we can improve the CPU utilization of the user program.We can also provide a richer user function by save the code storage area on the other hand.Finally,integrated the HRTOS closely with the CPU,distribute exclusive general purpose register group and stack space for each task in the CPU,made the task switching do not need to take any CPU time,only need one clock cycle.Additional advantage of this is to improve the real-time performance and the predictability of the system.
Keywords/Search Tags:Real-Time Operating System, Hardware converting, Task Switching, Timer Interruption, Real-time performance
PDF Full Text Request
Related items