Mark3 Realtime Kernel
|
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...
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::Thread * | g_pclNext |
Mark3::Thread * | g_pclCurrent |
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.
Mark3::Thread* g_pclCurrent |
Definition at line 25 of file scheduler.cpp.
Mark3::Thread* g_pclNext |
Definition at line 24 of file scheduler.cpp.