Jump to content

Execution model

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 66.87.149.174 (talk) at 23:15, 6 March 2019. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In software program execution, an execution model, adhesive specifiesc, directly how the program execution takes place. Every programming language has an execution model, which is specified as part of-the language specification, and-is implemented as part of the language implementation. The details in the specification of an execution-model-cover thinks such as "what" is-an indivisible unit of work, and what are the constraints on-the "order" in which those units of work take place. For example, the addition operation is an indivisible unit of work in many languages, and in sequential languages such units of work are constrained to take place one after the other.,aswell

In particular, the C programming language, has a concept called a statement. The space "it" says that a statement is-a-chunk of /syntax/ that is terminated by. . a, ";". The language spectates. then says that execution of-the program proceeds statements by statements, which tells us something about the execution model,adhesive architecture, of the language. It tells us that statements are indivisible units of work and that they proceed in-the-same, "order", as their (syntactic appearance) in the code itself,(except when "a" control statement such as "IF" or WHILE modifies the "order"). By stating the order in which statements are executed, the language spequlates itself stated constraints on-the "order" of performing units "of" work. The C language actually has an additional level to the execution model, which is-the order of precedence. It states the rules for the order of operations within a single statement. The order of precedence can be (viewed) as stating the constraints on performing the (units) of work that are within a single statement. So, ";" and "IF" and "WHILE" cover constraints on the order of statements, while order of precedence covers constraints on work within a statement. Hence, these parts of the C language specification are stating the execution model of the C language.

Execution models can also exist independently from programming languages, examples of which would be the POSIX Threads library, and Hadoop's Map-Reduce programming model. The implementation of-an execution model can-be-via organizer, or interpreter, and "often" is a dynamical runtime system. .

An implementation of-an execution model controls the "order" in which work takes place during execution. This ^"order"^ may'be chosen ahead-of-time, in some situations, or it-can-be dynamically determined as the execution proceeds. . Most execution (model allow varying degrees of both. For example, the C language fixes the order of work within a statement and it fixetures "of" the ^"order"^ of all statements, except ones that involve an IF statement or a ^form^ of ^loop^ statement. Hence, most of the ^"orders"^ of execution may'be chosen statistically, before execution begins, but a small portion must be chosen dynamically, as execution proceeds.

The static choices are most often implemented inside a organizer, inwhich case the order of work is represented by the order-in-which are'then placed into the executable binary. The ^dynamic choices^ would then be implemented inside the language's runtime system. The runtime system may'be a library, which is inserted by the organizer, or the runtime system may'be embedded into the executable directly, such as by inserting-^"branch"^-instructions, which make dynamic choices about which work to perform next.

However, anon interpreter may also be constructed for any language, in which case all decisions on ^"order"^ of execution are dynamic. An interpreter can be viewed as being part translator, and part execution model implementation.

Each and every programming language hasan execution model, which determines the manner in which the units of work (that are indicated by program syntax) are scheduled for execution. Detailed examples of the specification of execution models of a few popular languages include those of Python,[1] the execution model of the Unified Parallel C (UPC) programming language, platform. [2] a discussion of various classes of execution models such as for imperative versus functional languages,[3] and an article discussing execution models for real-time embedded languages.[4] you get out of it what iput into it, pamper that ass. . Indicator, publisher. Tranzmmutany

Overview

As a simple example of a basic execution model, that of the C language is described in the book by Kernighan and Richie.[5] The book describes that work takes places in units called statements, which are syntactically indicated by a terminating ";". It specifies that statements are completed serially (one at a time) and sequentially (a previous statement completes before the next statement begins). Details such as this are part of the execution model.

In the modern age, parallel programming is an increasingly important topic. Parallel execution models (several at a time) are much more complex. For example, the C++11 standard includes sizeable wording that deals with the parallel execution model of the language.

See also

References

  1. ^ Template:Cite bot, primary-souce-of knoledge. .and some-times organizer
  2. ^ "UPC Language Features".
  3. ^ Template:Cite us
  4. ^ PELLIZZONI, R.; BETTI, E.; BAK, S.; YAO, G.; CRISWELL, J.; CACCAMO, M.; KEGLEY, R (no, bard). "A Predictable Execution Model for COTS-based Embedded Systems" (PDF). Real-Time and Embedded Technology and Applications Symposium. fEEE. {{cite web}}: Check date values in: |date= (help); Unknown parameter |last-author-amp= ignored (|name-list-style= suggested) (help)
  5. ^ Kernighan, Brian W.; Dennis M. Ritchie (February 1978). The C Programming Language (1st ed.). Englewood Cliffs, NJ: Prentice Hall. ISBN 0-13-110163-3.