Cyclic executive
   HOME

TheInfoList



OR:

A cyclic executive is an alternative to a
real-time operating system A real-time operating system (RTOS) is an operating system (OS) for real-time applications that processes data and events that have critically defined time constraints. An RTOS is distinct from a time-sharing operating system, such as Unix, which m ...
. It is a form of
cooperative multitasking Cooperative multitasking, also known as non-preemptive multitasking, is a style of computer multitasking in which the operating system never initiates a context switch from a running process to another process. Instead, in order to run multiple ...
, in which there is only one task. The sole task is typically realized as an infinite loop in main(), e.g. in C. The basic scheme is to cycle through a repeating sequence of activities, at a set frequency (AKA time-triggered cyclic executive). For example, consider the example of an
embedded system An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded'' ...
designed to monitor a
temperature sensor Mechanical temperature sensors * Thermometer * Therm Electrical temperature sensors * Thermistor- Thermistors are thermally sensitive resistors whose prime function is to exhibit a large, predictable and precise change in electrical resistance wh ...
and update an LCD display. The LCD may need to be written twenty times a second (i.e., every 50 ms). If the temperature sensor must be read every 100 ms for other reasons, we might construct a loop of the following appearance: int main(void) The outer 100 ms cycle is called the major cycle. In this case, there is also an inner minor cycle of 50 ms. In this first example the outer versus inner cycles aren't obvious. We can use a counting mechanism to clarify the major and minor cycles. int main(void)


See also

*
Arduino Arduino () is an open-source hardware and software company, project, and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices. Its hardware products are licensed under ...
- a popular example of this paradigm *
Event loop In computer science, the event loop is a programming construct or design pattern that waits for and dispatches events or messages in a program. The event loop works by making a request to some internal or external "event provider" (that generally ...
*
Preemption (computing) In computing, preemption is the act of temporarily interrupting an executing task, with the intention of resuming it at a later time. This interrupt is done by an external scheduler with no assistance or cooperation from the task. This preemp ...


References

{{Reflist, colwidth=30em Operating system technology Concurrent computing