ChronOS Scheduler: Weigthed Round-Robin

Aus ProjectWiki
Version vom 21. Mai 2013, 01:31 Uhr von Mat (Diskussion | Beiträge) (Created page with "== Functional Description == The Round-Robin scheduler is the most simplest scheduling algorithm. The scheduler is called periodically and circles through a list of running task...")
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu:Navigation, Suche

Functional Description

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 can be enhanced by using different weights for each task, the scheduler waits for the next 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.


Software Interrupts

When a software interrupt occurs, if needed, the scheduler resumes (puts on the running list) the corresponding event task, remembers the currently executed task and switches the context from the currently executed task to the event task. After the event task has finished (gets suspended) or its time slot is over, the scheduler switches back to the previously interrupted task and continues to schedule normally.


Usage

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

Const Os_scheduling_policy = Os_s