======Technical basics: Important aspects for real time======
In order to understand the functionality of a real-time operating system (RTOS), you need to know
about both general and Linux specific mechanisms.
----
===== Real-time system =====
A real-time system is a platform that is running an RTOS and at least one real-time task. An RT task is a task that must be completed before a certain deadline. These tasks can be periodic or aperiodic have a priority to make sure that they are scheduled according to their frequency of execution and the strictness of their deadline. There can also be non real-time tasks running on the system as well.
===== Linux specific preemption models =====
The mainline Linux kernel implements three different preemption models
for different fields of application like servers or desktop PCs. With
the PREEMPT_RT patch two additional preemption models are available.
The "Fully Preemptible Kernel" model is the one that turns Linux into
an RTOS.
[[realtime:documentation:technical_basics:preemption_models|Read more about preemption models]]
===== Priority inversion - Priority inheritance =====
When a task with high priority is blocked by one with low priority
because of a mutually exclusive resource, a third task with priority
in between the others can run and finish before the task with the
highest priority resumes. This phenomenon is known as priority
inversion. It can be solved by priority inheritance.
[[realtime:documentation:technical_basics:pi|Read more about priority inversion and inheritance]]
===== Scheduling - Policy and priority =====
The Linux kernel implements several real-time and non real-time
scheduling policies. Depending on the scheduling policy of the tasks
the scheduler decides which task is swapped out and which task is
processed next.
[[realtime:documentation:technical_basics:sched_policy_prio:start|Read more about policy and priority]]
===== Scheduling - RT throttling =====
The RT throttling mechanism prevents a system to hang, if there is a
programming failure in a real-time application. This mechanism makes
it possible to stop such an application. The settings for RT
throttling are exported into the proc filesystem.
[[realtime:documentation:technical_basics:sched_rt_throttling|Read more about RT throttling]]
===== Latency =====
Low latency is a critical requirement in real-time computing environments because it ensures that tasks or processes can respond quickly and predictably to external events or inputs.
[[realtime:documentation:technical_basics:latency|Read more about the term latency]]
===== Dynticks =====
Dynticks or Dynamic ticks or **no HZ** mode reduces timer interrupts overhead.
[[realtime:documentation:howto:tools:ticklesskernel|Read more about the dynamic ticks]]