Mark3 Realtime Kernel
scheduler.h File Reference

Thread scheduler function declarations This scheduler implements a very flexible type of scheduling, which has become the defacto industry standard when it comes to real-time operating systems. This scheduling mechanism is referred to as priority round- robin. More...

#include "kerneltypes.h"
#include "thread.h"
#include "ithreadport.h"
#include "priomap.h"

Go to the source code of this file.

Classes

class  Mark3::Scheduler
 The Scheduler Class. This class provides priority-based round-robin Thread scheduling for all active threads managed by the kernel. More...
 

Namespaces

 Mark3
 

Variables

Mark3::Threadg_pclNext
 
Mark3::Threadg_pclCurrent
 

Detailed Description

Thread scheduler function declarations This scheduler implements a very flexible type of scheduling, which has become the defacto industry standard when it comes to real-time operating systems. This scheduling mechanism is referred to as priority round- robin.

From the name, there are two concepts involved here:

1) Priority scheduling:

Threads are each assigned a priority, and the thread with the highest priority which is ready to run gets to execute.

2) Round-robin scheduling:

Where there are multiple ready threads at the highest-priority level, each thread in that group gets to share time, ensuring that progress is made.

The scheduler uses an array of ThreadList objects to provide the necessary housekeeping required to keep track of threads at the various priorities. As s result, the scheduler contains one ThreadList per priority, with an additional list to manage the storage of threads which are in the "stopped" state (either have been stopped, or have not been started yet).

Definition in file scheduler.h.

Variable Documentation

◆ g_pclCurrent

Mark3::Thread* g_pclCurrent

Definition at line 25 of file scheduler.cpp.

◆ g_pclNext

Mark3::Thread* g_pclNext

Definition at line 24 of file scheduler.cpp.