CPE 315
Prof. Stearns
Methods/Terminology of Program Execution
Reference:
Alternatives for executing Java code
- Direct Execution
A cpu runs machine code; the machine code is [almost] always created using
translation. This method is referred to as "native mode" particularly
when the cpu includes emulators or simulators for other ISAs.
Note the machine code could be a language at any level
including C++ or a natural language.
Why do most cpus (but not all) use a primitive machine language?
- Emulation
Conceptually identical to Direct Execution. The term is typically used when the
cpu runs the machine code of some other ISA
- Interpretation
A software program is written that accepts some language as input and
performs the language actions.
Java is interpreted in most environments.
What are the advantages/disadvantages of interpretation?
- Simulation
Mimicing the behaviour of a system by creating an [approximate] model of it.
This can be done by physical modelling, by writing a program or using a
general simulation package aimed at a particular kind of simulation
(e.g. structural engineering, fluid flow).
Typical examples:
- Aircraft flight simulators
Physical model with some software.
- Mathematical model of a swamp
Program written in C++.
- Model of a MIPS cpu.
e.g. SPIM
- Translation
Translation refers to the process of transforming one language to another.
For example, the C++ compiler translates C++ to C or assembly.