Commercial Preemptive Multitasking Systems

In a preemptive multitasking system tasks are preempted or halted before they complete. Either the scheduler can control this, or each task can agree on being preempted at certain points in their execution. Tasks can give up their CPU time while waiting for data to arrive on a queue, a signal to be ready, or a hardware resource becoming available to the task, etc. A combination of both forceful preemption and volunteer preemption is common. Tasks can be assigned priorities, and higher priority tasks can halt low priority tasks while the higher priority tasks run. In addition, tasks can give up their CPU time while waiting for something to happen, even though the task is not complete, allowing other lower priority tasks to run or the CPU and system to sleep to conserve power.

There are several commercially available multitasking systems for the embedded developer. Depending on the functionality they offer they are regarded as plain schedulers, operating systems (OS), or full real-time operating systems (RTOS). Some are available for purchase while others are free and open sources.

(RT)OSs usually offer a set of associated functions available for the user. These can be configurable scheduling schemes, configurable task priority, and many features associated with controlling task execution. Common control functions are semaphores, Mutexes, queues, software timers, etc. In addition, some systems also offer drivers to internal and external peripherals.