ChronOS Scheduler: Weigthed Round-Robin

Aus ProjectWiki
Wechseln zu:Navigation, Suche

Functional Description

Simple scheduler with priorities and event queues. Each priority has its own event queue and running list. A normal running task is put into the running list from where it is selected in a round-robin fashion. Tasks that need to answer a task event are put on a FIFO-event list, which needs to be empty before searching through the running list can continue. The Round-Robin scheduler is the most simplest scheduling algorithm. The scheduler is called periodically and circles through a list of running tasks, switching from one to the next task each call. The algorithm offers some control over the CPU time distribution by using different weights for each task, the scheduler waits for the next context switch the periods given by the weight.

Task Queues

The task queue is organized as a FIFO-list, tasks are taken from the head and are inserted at the tail of the list.

Task events

When a task event (software interrupt) occurs, if needed, the scheduler resumes (puts on the running list) the corresponding event task, remembers the current list position and switches the context to the event task.


Configure to use round-robin scheduling (system default):

Const Os_scheduling_policy = Os_sched_policy_wrrobin