In this post, we will see Impact of Machine Architecture on Programming Languages | PPL | Impact of Computer Architectures | impact of machine architecture, ppl, principles of programming languages.
Impact of Machine
Architectures
Von Neumann Computer Architecture
Organization of a conventional computer
A Computer consists of six
major components that correspend closely to major aspects of a programming
language :
1. Data
2. Primitive Operations
3. Sequence Control
4. Data Access
5. Storage Management
6. Operating Environment
Explanation:
1. Data
A computer
must provide various kinds of elementary data items and data structures
to be manipulated.
A computer
has certain built-in data types that can be manipulated directly by
hardware primitive operations:
a. integers,
b. single-precision (e.g., one-word)
reals, also called floating-point numbers,
c. fixed-length character
strings,
d. fixed-length bit strings
(where the length is equal to the number of bits that fit into a single word of
storage).
2. Primitive Operations
A computer
must provide a set of primitive operations useful for manipulating the
data.
a. primitives for arithmetic
on each built-in numeric data type (e.g., real and integer addition,
subtraction, multiplication, and
division),
b. primitives for testing
various properties of data items (e.g., test for zero, positive, and negative
numbers),
c. primitives for accessing
and modifying various parts of a data item (e.g., retrieve or store a character
in a word and retrieve or
store an operand address in
an instruction),
d. primitives for controlling
input-output (I/O) devices, and primitives for sequence control (e.g.,
unconditional and return jumps).
3. Sequence Control
A computer must provide mechanisms for controlling
the sequence in which the primitive operations are to be executed.
Dia. : Program interpretation
and execution
4. Data Access
A computer must provide mechanisms for controlling
the data supplied to each execution of an operation.
Operands values can be accessed from Main memory or
Registers. Integer addresses are
allocated to the memory locations of Main memory.
5. Storage Management
A computer must provide mechanisms to control the
allocation of storage for programs and data.
It takes nanoseconds to
access memory within processor (i.e. registers), microseconds to
access Main Memory while milliseconds to access external
storage.
To balance these speeds
appropriately, various storage management facilities are employed.
For speeding up the imbalance
between external data access and the central processor, multiprogramming
is often used by the operating system.
For speeding up the imbalance
between main memory and the central processor, a cache memory is
used.
6. Operating Environment
A computer must provide mechanisms for communication
with an external environment containing programs and data to be processed.
The operating environment of a computer ordinarily
consists of a set of
peripheral storage and I/O devices.
Structure of a Typical
Language Implementation
Watch following video:
Watch on YouTube: https://www.youtube.com/watch?v=3jrnm1M24Xc
No comments:
Post a Comment