World Library  
Flag as Inappropriate
Email this Article

Time-driven programming

Article Id: WHEBN0008263175
Reproduction Date:

Title: Time-driven programming  
Author: World Heritage Encyclopedia
Language: English
Subject: Comparison of programming paradigms, Functional logic programming, Agent-oriented programming, Action language, Abductive logic programming
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Time-driven programming

Time-driven programming is a computer programming paradigm, where the control flow of the computer program is driven by a clock and is often used in Real-time computing. A program is divided into a set of tasks (i.e., processes or threads), each of which has a periodic activation pattern. The activation patterns are stored in a dispatch table ordered by time. The Least-Common-Multiple (LCM) of all period-times determines the length of the dispatch table. The scheduler of the program dispatches tasks by consulting the next entry in the dispatch table. After processing all entries, it continues by looping back to the beginning of the table.

The programming paradigm is mostly used for safety critical programs, since the behaviour of the program is highly deterministic. No external events are allowed to affect the control-flow of the program, the same pattern (i.e., described by the dispatch table) will be repeated time after time. However, idle time of the processor is also highly deterministic, allowing for the scheduling of other non-critical tasks through slack stealing techniques during these idle periods.

The drawback with the method is that the program becomes static (in the sense that small changes may recompile into large effects on execution structure), and unsuitable for applications requiring a large amount of flexibility. For example, the execution time of a task may change if its program code is altered. As a consequence, a new dispatch table must be regenerated for the entire task set. Such a change may require expensive retesting as is often required in safety critical systems.

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.