<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>RTOS Explained: Run-to-Completion (RTC) Threads</title><link>https://community.element14.com/technologies/embedded/w/documents/8172/rtos-explained-run-to-completion-rtc-threads</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RTOS Explained: Run-to-Completion (RTC) Threads</title><link>https://community.element14.com/technologies/embedded/w/documents/8172/rtos-explained-run-to-completion-rtc-threads</link><pubDate>Thu, 07 Oct 2021 10:39:45 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:bc4e8207-c55b-4d1d-a661-3c68da0470b4</guid><dc:creator>squadMCU</dc:creator><comments>https://community.element14.com/technologies/embedded/w/documents/8172/rtos-explained-run-to-completion-rtc-threads#comments</comments><description>Current Revision posted to Documents by squadMCU on 10/7/2021 10:39:45 AM&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;/p&gt;&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;"&gt;Introduction to RTXC Threads&lt;/div&gt;&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;"&gt; &lt;/div&gt;&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;"&gt;The RTXC Quadros RTOS offers two different execution entities: Tasks and Threads. You may be familiar with various terms like process or task or thread, depending on your OS experience. In RTXC Quadros Tasks and Threads have very specific functionality. Whether you use Threads or Tasks (or both) depends on the requirements of your application and on the particular RTXC Quadros configuration you are using.&lt;/div&gt;&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;"&gt; &lt;/div&gt;&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;"&gt;Tasks are RTXC program code that performs a defined function or set of functions. In the RTXC Quadros world each task has a priority and its own stack for saving context when preempted or rescheduled. Tasks can block or wait on events. Each task is independent of other tasks but can establish relationships with other tasks in many forms, including data structures, input, output, or other constructs.&lt;/div&gt;&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;"&gt;Threads are lightweight tasks which are designed to run to completion unless preempted by an ISR or a Thread at a higher priority level. The run-to-completion model allows all Threads in an application use a single stack. If preempted they save their context to the common stack. The single stack means that Threads cannot block or wait on events however Threads can be initiated by events.&amp;nbsp; A Thread has no context upon entry and must perform any required data initialization upon entry. When its operations are complete, the thread returns to the RTXC/ss scheduler without context. Threads have an inherent priority above that of tasks. Thus, the lowest priority Thread is of greater importance than the highest priority Task.&lt;/div&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Introduction to RTXC Threads&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;-----------------------------------------------&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;The RTXC Quadros RTOS offers two different execution entities: Tasks and Threads. You may be familiar with various terms like process or task or thread, depending on your OS experience. In RTXC Quadros Tasks and Threads have very specific functionality. Whether you use Threads or Tasks (or both) depends on the requirements of your application and on the particular RTXC Quadros configuration you are using.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Tasks&lt;/strong&gt; are RTXC program code that performs a defined function or set of functions. In the RTXC Quadros world each task has a priority and its own stack for saving context when preempted or rescheduled. Tasks can block or wait on events. Each task is independent of other tasks but can establish relationships with other tasks in many forms, including data structures, input, output, or other constructs.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Threads&lt;/strong&gt; are lightweight tasks which are designed to run to completion unless preempted by an ISR or a Thread at a higher priority level. The run-to-completion model allows all Threads in an application use a single stack. If preempted they save their context to the common stack. The single stack means that Threads cannot block or wait on events however Threads can be initiated by events.&amp;nbsp; A Thread has no context upon entry and must perform any required data initialization upon entry. When its operations are complete, the thread returns to the RTXC/ss scheduler without context. Threads have an inherent priority above that of tasks. Thus, the lowest priority Thread is of greater importance than the highest priority Task.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Thread Usage&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;----------------------&lt;/p&gt;&lt;p style="margin:0;"&gt;Threads are ideal for applications with event driven, hard real-time requirements. Because RTXC Threads fit very nicely into fixed priority scheduling methods, thread priorities can be determined using Rate Monotonic Analysis (RMA) to ensure schedulability of the real-time tasks to meet their deadlines. Being lightweight tasks, Threads are adept at handling processing associated with a high frequency of interrupts. They can be scheduled and complete their operating more quickly and with less system overhead.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Threads are also ideal for event-driven execution using Finite State Machines (FSM) or Hierarchical State Machines (HSM). The advantage for state machine implementations is that our implementation of Threads supports the Run-To-Completion execution model inherent in state machine design: the system must complete the processing of an event before it can start processing the next event.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;&lt;em&gt;interested? &lt;a class="jive-link-external-small" href="http://info.quadros.com/blog/bid/60209/RTOS-Explained-Run-to-Completion-RTC-Threads" rel="nofollow ugc noopener" target="_blank"&gt;Read More&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: rtos, rtc, quadros, rtxc&lt;/div&gt;
</description></item></channel></rss>