LynxOS® is a hard-real-Time OS, it is fully preemptible and reentrant. It uses a RT Global Scheduler and implements priority inheritance and priority tracking so that the highest priority thread runs regardless of which process it is in or if it's a kernel thread. Moreover, it provides deterministic response-time for tasks even in the presence of multiple interrupts, the highest priority task will only be interrupted once for each device thanks to the priority tracking policy.
LynxOS® applies a uniform global priorities management:
Kernel and application threads exist within the same priority space
Same scheduler queues for kernel and application threads
High priority application threads are scheduled before lower priority kernel threads
Kernel threads may utilize 1/2 priority steps and priority tracking so they run before the user task they serve, but after higher priority user tasks
Three scheduling policies are available :
Standard POSIX FIFO policy. A preemptable fixed priority scheduler.
This is similar to round robin policy, excepted the fact that a configurable time quantum is defined for each level of priority. This time quantum can be set using the setquantum() call.
The default value for the time quantum is 640ms. It can be modified, it is the system constant named QUANTUM defined in the configuration file /usr/include/param.h
The scheduling policy is modifiable
3 functions rinsert(),redesert(),rsched() are used to manipul ate the different scheduler queues (Ready-Queue,Fast-Ready-Queue,...) and the function newcontext() achieves context switching between processes
Barriers as defined in POSIX1.d can be used to implement periodic threads
There is up to 256 levels of priority for the application (user level) and 256 for the kernel. Moreover, half priorities are used for the priority tracking mechanism specific to LynxOS® (see below).
Every thread has its own stack, register set, priority, and scheduling algorithm.
The priority is inherited from the caller of pthread_create().The schedpolicy attibute is SCHED_FIFO.
Supports thread control and cancellation model as defined by POSIX 1003.1c threads.