From the course: IoT Foundations: Operating Systems Fundamentals

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Task scheduler

Task scheduler

- [Instructor] We've learned that one way to enable multiple tasks to run is through CPU time sharing, where each task is allocated a time slot to execute. A task scheduler in an RTOS is a piece of software with task scheduling algorithms to efficiently allocate CPU time and the resources. In the multitasking system, multiple tasks can be divided into smaller subtasks to allow them to run similarly, concurrently. However, we haven't yet discussed order in which these tasks should be executed and when. This responsibility falls to the task scheduler of the OS kernel, how the next tasks can run and how much time they can take are determined by a task scheduler. A task scheduler is based on the task scheduling algorithms, also known as process scheduling algorithm. A task a scheduler can be based on two types of scheduling algorithms: preemptive and the non-preemptive. Preemptive scheduling allows the scheduler to interrupt the current running task in order to run another one, typically…

Contents