Task scheduler unit
As we've said before, all multitasking operating systems are required to have a task scheduler unit, or simply a scheduler unit, in their kernel. In this section, we're going to see how this unit works and how it contributes to the seamless execution of some concurrent tasks.
Some facts regarding the task scheduler unit are listed as follows:
- The scheduler has a queue for tasks waiting to be executed. Tasks or jobs are simply the pieces of work that should be performed in separate flows of execution.
- This queue is usually prioritized, with the high-priority tasks being chosen to start first.
- The processor unit is managed and shared among all the tasks by the task scheduler. When the processor unit is free (no task is using it), the task scheduler must select another task from its queue before letting it use the processor unit. When the task is finished, it releases the processor unit and make it available again, then the task scheduler...