Content deleted Content added
DarkRevival (talk | contribs) m Minor formatting fix |
Citation bot (talk | contribs) Removed URL that duplicated identifier. | Use this bot. Report bugs. | #UCB_CommandLine |
||
(26 intermediate revisions by 16 users not shown) | |||
Line 2:
{{Program execution}}
'''Execution''' in [[computer engineering|computer]] and software engineering is the process by which a [[computer]] or [[virtual machine]]
Programs for a computer may be executed in a [[Batch processing|batch process]] without human interaction or a [[User (computing)|user]] may type [[Command (computing)|commands]] in an [[Session (computer science)|interactive session]] of an [[Interpreter (computing)|interpreter]]. In this case, the "commands" are simply program instructions, whose execution is chained together.
Line 10:
== Process ==
{{see|Program lifecycle phase}}
Prior to execution, a program must first be written. This is generally done in [[source code]], which is then compiled at [[compile time]] (and statically linked at [[link time]]) to produce an executable. This executable is then invoked, most often by an operating system, which loads the program into memory ([[load time]]), possibly performs [[dynamic linking]], and then begins execution by moving control to the [[entry point]] of the program; all these steps depend on the [[Application Binary Interface]] of the operating system. At this point execution begins and the program enters [[run time (program lifecycle phase)|run time]]. The program then runs until it ends, either in a normal [[termination (computer science)|termination]] or a [[crash (computing)|crash]].
== Executable ==
Line 25:
{{Main|Context switch}}
In order for programs and [[interrupt handler]]s to work without interference and share the same hardware memory and access to the I/O system, in a [[Computer multitasking|multitasking operating
In Linux-based operating systems, a set of data stored in [[Processor register|registers]] is usually saved into a process descriptor in memory to implement switching of context.<ref name=":0" /> PCIDs are also used.
Line 44:
== Runtime system ==
{{main|Runtime system}}
A ''runtime system'', also called ''runtime environment'', primarily implements portions of an [[execution model]].
Most [[programming language]]s have some form of runtime system that provides an environment in which programs run. This environment may address a number of issues including the [[memory management|management]] of application [[computer memory|memory]], how the program accesses [[variable (computer science)|variable]]s, mechanisms for passing parameters between [[subroutine|procedure]]s, interfacing with the [[operating system]], and otherwise. The [[compiler]] makes assumptions depending on the specific runtime system to generate correct code. Typically the runtime system will have some responsibility for setting up and managing the [[stack (abstract data type)|stack]] and [[heap (data structure)|heap]], and may include features such as [[garbage collection (computer science)|garbage collection]], [[thread (computing)|thread]]s or other [[dynamic programming language|dynamic]] features built into the language.<ref name="Aho_2007"/>
|