|
|||||||||||
Technical Support On-Line Manuals RL-ARM User's Guide (MDK v4) RL-RTX Overview Product Description Product Specification Technical Data Timing Specifications Advantages Your First RTX Application Theory of Operation Timer Tick Interrupt System Task Manager Task Management Idle Task System Resources Scheduling Options Pre-emptive Scheduling Round-Robin Scheduling Cooperative Multitasking Priority Inversion Stack Management User Timers Interrupt Functions Configuring RL-RTX Configuration Options Tasks Stack Size Stack Checking Run in Privileged Mode Hardware Timer Round-Robin Multitasking User Timers FIFO Queue Buffer Idle Task Error Function Create New RTX_Config.c Configuration Macros Alternate Tick Timer Low Power RTX Library Files Using RL-RTX Writing Programs Include Files Defining Tasks Multiple Instances External References Using a Mailbox SWI Functions SVC Functions Debugging System Info Task Info Event Viewer Usage Hints ARM7/ARM9 Version Cortex-M Version Create New RTX Application Function Reference Event Flag Management Routines Mailbox Management Routines Memory Allocation Routines Mutex Management Routines Semaphore Management Routines System Functions Task Management Routines Time Management Routines User Timer Management Routines RL-FlashFS RL-TCPnet RL-CAN RL-USB Example Programs Library Reference Appendix |
System Task ManagerThe task manager is a system task that is executed on every timer tick interrupt. It has the highest assigned priority and does not get preempted. This task is basically used to switch between user tasks. The RTX tasks are not really executed concurrently. They are time-sliced. The available CPU time is divided into time slices and the RTX kernel assigns a time slice to each task. Since the time slice is short (default time slice is set to 10 ms) it appears as though tasks execute simultaneously. Tasks execute for the duration of their time-slice unless the task's time-slice is given up explicitly by calling the os_tsk_pass or one of the wait library functions. Then the RTX Kernel switches to the next task that is ready to run. You can set the duration of the time-slice in the RTX_Config.c configuration file. The task manager is the system tick timer task that manages all other tasks. It handles the task's delay timeouts and puts waiting tasks to sleep. When the required event occurs, it puts the waiting tasks back again into the ready state. This is why the tick timer task must have the highest priority. The task manager runs not only when the timer tick interrupt occurs, but also when an interrupt calls one of the isr_ functions. This is because interrupts cannot make the current task wait, and therefore interrupts cannot perform task switching. However, interrupts can generate the event, semaphore or mailbox message (using an isr_ library function) that a higher priority task is waiting for. The higher priority task must preempt the current task, but can do so only after the interrupt function completes. The interrupt therefore forces the timer tick interrupt, which runs when the current interrupt finishes. The forced tick timer interrupt starts the task manager (clock task) scheduler. The task scheduler process all the tasks and then puts the highest ready task into the running state. The highest priority task can then continue with its execution. Note
| ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.