Execution model: Difference between revisions

Content deleted Content added
m top: refs using AWB
Ellil1 (talk | contribs)
m amended redirects from https://en.wikipedia.org/wiki/Language_interpretation to https://en.wikipedia.org/wiki/Interpreter_(computing) for specificity
Line 1:
{{Program execution}}
 
An '''execution model''' specifies how work 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. 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 [[compiler]], or [[Interpreter_(computing)|interpreter]], and often includes a [[runtime system]].
 
The details in the specification of an execution model cover things 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.
Line 11:
The static choices are most often implemented inside a [[compiler]], in which case the order of work is represented by the order in which instructions are 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 called by instructions inserted by the [[compiler]], 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, an [[Interpreter_(computing)|interpreter]] may also be constructed for any language, in which case all decisions on order of execution are dynamic. An [[Interpreter_(computing)|interpreter]] can be viewed as being part translator, and part execution model implementation.
 
Each and every programming language has an execution model, which determines the manner in which the units of work (that are indicated by program [[Syntax (programming languages)|syntax]]) are [[Scheduling (computing)|scheduled]] for [[Execution (computing)|execution]]. Detailed examples of the specification of execution models of a few popular languages include those of Python,