Cyclic executive

Cyclic executive

A cyclic executive is an alternative to a real-time operating system. It is a form of cooperative multitasking, in which there is only one task. The sole task is typically realized as an infinite loop in main(), e.g. in C/C++.

The basic scheme is to cycle through a repeating sequence of activities, at a set frequency. For example, let us consider the example of an embedded system designed to monitor a temperature sensor and update an LCD display. The LCD may need to be written ten times a second (i.e., every 100 ms). If the temperature sensor must be read every 50 ms for other reasons, we might construct a loop of the following appearance:

main()
{
   // initialization code here
 
   while (1)
   {
      currTemp = tempRead();
      lcdWrite(currTemp);

      // waste CPU cycles until 50 ms
      currTemp = tempRead();
      // do other stuff

      // waste CPU cycles until 100 ms
   }
}

The outer 100 ms cycle is called the major cycle. In this case, there is also an inner minor cycle of 50 ms.

See also


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Scheduling (computing) — This article is about processes assignment in operating systems. For other uses, see Scheduling (disambiguation). Scheduling is a key concept in computer multitasking, multiprocessing operating system and real time operating system designs.… …   Wikipedia

  • Comparison of embedded computer systems on board the Mars rovers — The embedded computer systems that are on board the various Mars rovers sent to Mars by NASA have to withstand the high radiation levels and large temperature changes in space and for this reason their computational resources are limited compared …   Wikipedia

  • Economic Affairs — ▪ 2006 Introduction In 2005 rising U.S. deficits, tight monetary policies, and higher oil prices triggered by hurricane damage in the Gulf of Mexico were moderating influences on the world economy and on U.S. stock markets, but some other… …   Universalium

  • Deepwater Horizon oil spill — 2010 oil spill and BP oil spill redirect here. For other oil spills in 2010, see 2010 oil spill (disambiguation). For the 2006 oil spill involving BP, see Prudhoe Bay oil spill. For the drilling rig and explosion, see Deepwater Horizon… …   Wikipedia

  • United Kingdom — a kingdom in NW Europe, consisting of Great Britain and Northern Ireland: formerly comprising Great Britain and Ireland 1801 1922. 58,610,182; 94,242 sq. mi. (244,100 sq. km). Cap.: London. Abbr.: U.K. Official name, United Kingdom of Great… …   Universalium

  • United States — a republic in the N Western Hemisphere comprising 48 conterminous states, the District of Columbia, and Alaska in North America, and Hawaii in the N Pacific. 267,954,767; conterminous United States, 3,022,387 sq. mi. (7,827,982 sq. km); with… …   Universalium

  • War on Drugs — For other uses, see War on Drugs (disambiguation). As part of the War on Drugs , the U.S. gives hundreds of millions of dollars per year of military aid to Colombia, which is used to combat leftist guerrilla groups such as FARC, who have been… …   Wikipedia

  • Neo-Piagetian theories of cognitive development — For more information, see Piaget s theory of cognitive development, Cognitive development and Intelligence. Psychology …   Wikipedia

  • Business and Industry Review — ▪ 1999 Introduction Overview        Annual Average Rates of Growth of Manufacturing Output, 1980 97, Table Pattern of Output, 1994 97, Table Index Numbers of Production, Employment, and Productivity in Manufacturing Industries, Table (For Annual… …   Universalium

  • Germany — /jerr meuh nee/, n. a republic in central Europe: after World War II divided into four zones, British, French, U.S., and Soviet, and in 1949 into East Germany and West Germany; East and West Germany were reunited in 1990. 84,068,216; 137,852 sq.… …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”