Keil Logo

System Task Manager

The 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.


  • The tick timer task is an RTX system task and is therefore created by the system.
  • The RTX library for Cortex™-M uses extended RTOS features of Cortex™-M devices. All RTX system functions are executed in svc mode.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

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.