Documentation: migrate "Effects of Disabling Interrupts or Pre-Emption on Response Latency" from wiki

link: https://cwiki.apache.org/confluence/display/NUTTX/Effects+of+Disabling+Interrupts+or+Pre-Emption+on+Response+Latency
This commit is contained in:
raiden00pl 2023-11-05 10:16:13 +01:00 committed by Xiang Xiao
parent 0b17238714
commit afa9e29272
6 changed files with 43 additions and 1 deletions

View File

@ -23,7 +23,7 @@ When we discuss critical sections here we really refer to one of two mechanisms:
The use of either mechanism will always harm real-time performance.
The effects of critical sections on real-time performance is discussed in
`Effects of Disabling Interrupts or Pre-Emption on Response Latency <https://cwiki.apache.org/confluence/display/NUTTX/Effects+of+Disabling+Interrupts+or+Pre-Emption+on+Response+Latency>`_ [TODO: move to documentation].
:doc:`/implementation/preemption_latency`.
The end result is that a certain amount of **jitter** is added to the real-time response.
Critical sections cannot be avoided within the OS and, as a consequence, a certain

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View File

@ -9,3 +9,4 @@ Implementation Details
processes_vs_tasks.rst
critical_sections.rst
interrupt_controls.rst
preemption_latency.rst

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -0,0 +1,41 @@
==================================================================
Effects of Disabling Interrupts or Pre-Emption on Response Latency
==================================================================
Rate Monotonic Scheduling
=========================
**Assumption**
No resource sharing (processes do not share resources, e.g. a hardware
resource, a queue, or any kind of semaphore blocking or non-blocking
(busy-waits)).
Wikipedia “Rate Monotonic Scheduling”
**Real world**
We must protect shared resources with locks of some kind. The most aggressive:
#. Disabling interrupts, and
#. Disabling pre-emption.
What are the effects of real-time performance when this assumptions is violated?
Normal Interrupt Processing
---------------------------
.. figure:: normal_interrupt.png
:align: center
Effect of Disabling Interrupts
------------------------------
.. figure:: disabling_interrupts.png
:align: center
Effect of Disabling Pre-emption
-------------------------------
.. figure:: disabling_preemption.png
:align: center