Execution (computers)
Encyclopedia
Execution in computer
and software engineering
is the process
by which a computer
or a virtual machine
carries out the instructions of a computer program
. The instructions in the program trigger sequences of simple actions on the executing machine. Those actions produce effects according to the semantics
of the instructions in the program.
Programs for a computer may execute in a batch process
without human interaction, or a user
may type commands
in an interactive session
of an interpreter
. In this case the "commands" are simply programs, whose execution is chained together.
The term run is used almost synonymously. A related meaning of both "to run" and "to execute" refers to the specific action of a user starting (or launching or invoking) a program, as in "Please run the ... application."
. Programs usually contain implicit and explicit assumptions about resources available at the time of execution. Most programs execute with the support of an operating system
and run-time libraries
specific to the source language that provide crucial services not supplied directly by the computer itself. This supportive environment, for instance, usually decouples a program from direct manipulation of the computer peripherals, providing more general, abstract services instead.
of the program. Loosely speaking, an interpreter actually does what the program says to do. This contrasts with to a language translator that converts a program from one language to another. The most common language translators are compiler
s. Translators typically convert their source from a high-level, human readable language into a lower-level language (sometimes as low as native machine code
) that is simpler and faster for the processor to directly execute. The ideal is that the ratio of executions to translations of a program will be large; that is, a program need only be compiled once and can be run any number of times. This can provide a large benefit for translation versus direct interpretation of the source language. One trade-off is that development time is increased, because of the compilation. In some cases, only the changed files must be recompiled. Then the executable needs to be relinked. For some changes, the executable must be rebuilt from scratch. As computers and compilers become faster, this fact becomes less of an obstacle. Also, the speed of the end product is typically more important to the user than the development time.
Translators usually produce an abstract result that is not completely ready to execute. Frequently, the operating system will convert the translator's object code
into the final executable form just before execution of the program begins. This usually involves modifying the code to bind it to real hardware addresses and establishing address links between the program and support code in libraries. In some cases this code is further transformed the first time it is executed, for instance by just-in-time compilers, into a more efficient form that persists for some period, usually at least during the current execution run.
Computer engineering
Computer engineering, also called computer systems engineering, is a discipline that integrates several fields of electrical engineering and computer science required to develop computer systems. Computer engineers usually have training in electronic engineering, software design, and...
and software engineering
Software engineering
Software Engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software...
is the process
Process (computing)
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...
by which a computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...
or a virtual machine
Virtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...
carries out the instructions of a computer program
Computer program
A computer program is a sequence of instructions written to perform a specified task with a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute...
. The instructions in the program trigger sequences of simple actions on the executing machine. Those actions produce effects according to the semantics
Formal semantics of programming languages
In programming language theory, semantics is the field concerned with the rigorous mathematical study of the meaning of programming languages and models of computation...
of the instructions in the program.
Programs for a computer may execute in a batch process
Batch processing
Batch processing is execution of a series of programs on a computer without manual intervention.Batch jobs are set up so they can be run to completion without manual intervention, so all input data is preselected through scripts or command-line parameters...
without human interaction, or a user
User (computing)
A user is an agent, either a human agent or software agent, who uses a computer or network service. A user often has a user account and is identified by a username , screen name , nickname , or handle, which is derived from the identical Citizen's Band radio term.Users are...
may type commands
Command (computing)
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell....
in an interactive session
Session (computer science)
In computer science, in particular networking, a session is a semi-permanent interactive information interchange, also known as a dialogue, a conversation or a meeting, between two or more communicating devices, or between a computer and user . A session is set up or established at a certain point...
of an interpreter
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...
. In this case the "commands" are simply programs, whose execution is chained together.
The term run is used almost synonymously. A related meaning of both "to run" and "to execute" refers to the specific action of a user starting (or launching or invoking) a program, as in "Please run the ... application."
Context of execution
The context in which execution takes place is crucial. Very few programs execute on a bare machineBare machine
Bare Machine, in computer parlance, means a computer without its operating system. Modern operating systems evolved through various stages, from elementary to the present day complex, highly sensitive real-time systems. In the very first stage of computing there was nothing like an Operating System...
. Programs usually contain implicit and explicit assumptions about resources available at the time of execution. Most programs execute with the support of an operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...
and run-time libraries
Runtime library
In computer programming, a runtime library is a special program library used by a compiler, to implement functions built into a programming language, during the execution of a computer program...
specific to the source language that provide crucial services not supplied directly by the computer itself. This supportive environment, for instance, usually decouples a program from direct manipulation of the computer peripherals, providing more general, abstract services instead.
Interpreter
A system that executes a program is called an interpreterInterpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...
of the program. Loosely speaking, an interpreter actually does what the program says to do. This contrasts with to a language translator that converts a program from one language to another. The most common language translators are compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...
s. Translators typically convert their source from a high-level, human readable language into a lower-level language (sometimes as low as native machine code
Machine code
Machine code or machine language is a system of impartible instructions executed directly by a computer's central processing unit. Each instruction performs a very specific task, typically either an operation on a unit of data Machine code or machine language is a system of impartible instructions...
) that is simpler and faster for the processor to directly execute. The ideal is that the ratio of executions to translations of a program will be large; that is, a program need only be compiled once and can be run any number of times. This can provide a large benefit for translation versus direct interpretation of the source language. One trade-off is that development time is increased, because of the compilation. In some cases, only the changed files must be recompiled. Then the executable needs to be relinked. For some changes, the executable must be rebuilt from scratch. As computers and compilers become faster, this fact becomes less of an obstacle. Also, the speed of the end product is typically more important to the user than the development time.
Translators usually produce an abstract result that is not completely ready to execute. Frequently, the operating system will convert the translator's object code
Object code
Object code, or sometimes object module, is what a computer compiler produces. In a general sense object code is a sequence of statements in a computer language, usually a machine code language....
into the final executable form just before execution of the program begins. This usually involves modifying the code to bind it to real hardware addresses and establishing address links between the program and support code in libraries. In some cases this code is further transformed the first time it is executed, for instance by just-in-time compilers, into a more efficient form that persists for some period, usually at least during the current execution run.
See also
- ExecutableExecutableIn computing, an executable file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a data file that must be parsed by a program to be meaningful. These instructions are traditionally machine code instructions for a physical CPU...
- Invocational mediaInvocational mediaInvocational media are communication technologies based on digital computers. Invocational media infrastructures assign names to given entities , and perform events to call up these named entities from invocable domains on demand Invocational media are communication technologies based on digital...
- RuntimeRun-time systemA run-time system is a software component designed to support the execution of computer programs written in some computer language...