Anda di halaman 1dari 0

GM

COLLEGE
COMPUTER SYSTEM ARCHITECTURE




Unit I: Structure Computer Organization, Languages, Levels, Virtual
machines, Contemporary multilevel machines.
1. What is Computer Architecture?
Definitions of Computer Architecture
Computer Architecture is a term commonly used to denote the
organization and design of digital computers. (Computer System
Architecture, M. M. Mano, P-H, 1976, p.XI)
The design of the system specifications at a general or subsystem
level is called Computer Architecture. (Principles of Digital Computer
Design, Vol. 1, A. M. Abd-Alla, A. C. Meltzer, P-H, 1976, p. 187)
A computer architecture maybe defined by hardware organization as well
as programming/software point of view. From an assembly programmer
point of view, computer architecture is the collection of instruction set,
which contains opcode (operational codes), addressing modes, registers,
virtual memory etc. As seen by the hardware implementation, the
abstracted machine organized with CPUs, caches, buses, microcode,
pipelines, physical memory etc.
The blue-print used to build the machine. It is the instruction set
and the I/O connection capabilities. Machines with the same
architecture can execute the same programs and can have the same
I/O devices connected to them. The organization of a machine is
usually shown by a block diagram. (Developments and Directions in
Computer Architecture, Computer, Aug. 1978, pp. 54-67, G. J.
Lipovski, K. L. Doty)


Art, science and/or engineering of computer structure, organization,
implementation and performance evaluation. (Computer Systems
Architecture,
J. C. Baer, Computer Science Press, 1980, p. VII)
Summary by W. Stallings: Computer architecture refers to those
The study of the structure, behavior and design of computers.
(Computer Architecture and Organization, J. P. Hayes, McGraw-Hill,
1978, p.XI)
attributes of a system visible to a programmer, or put another way,
those attributes that have a direct impact on the logical execution of a
program. Computer organization refers to the operational units and
their interconnections that realize the architectural specifications.
(Computer Organization and Architecture, 4. ed., 1996, p.3)
The study of Computer Architecture is the study of the organization
and interconnection of components of computer systems. Computer
architects construct computers from basic buildings blocks such as
memories, arithmetic units and buses. From those building blocks the
Computer Architecture can construct any number of different types of
computers. (Introduction to Computer Architecture, H. S. Stone ed.,
SRA, Chicago, 1975, p.3)
The overall design of the system level, the kinds of instructions
available, the kinds of data used, the mechanics available for altering
the flow of control, the memory organization and addressing, the
relationship between instruction set and memory organization, the
method by which the virtual machine is implemented - the topics are
sometimes loosely grouped together under the imprecise labels of
Computer Organization or Computer Architecture. (Structured
Computer Organization, A. S. Tanenbaum, P-H, 1976, p.15)



2. Some Important terms:
units of the computer.
3. Operation of the computer
After processing the information is transferred to the output unit.
4. Need to be a computer
i. Addressable memory that holds both instruction and data.
ii. An arithmetic logic unit.
iii. A program counter.
Computer It is an electronic device has the capability of processing
the information according to a list or internally stored instruction.
Instructions They are the explicit commands that govern the
transfer of information within the computer as well as between
computer and its peripherals. The instruction specifies the operations
to be performed.
Program It is the list of instruction.
Memory Internal storage is called memory.
Computer Architecture The study of unction and deign of various
Data and information are fetched into computer and the computer
transfers them to the memory.
Memory accepts information from input unit and transfers it into the
arithmetic and logic unit to perform the desired operation.
The entire activities inside the computer is controlled by a control
unit.
There are various machines where few of them are qualified as being
computers. according to the computer architect and mathematician John
von Neumann, for a machine to be a computer, it must have the following:


5. Algorithm for executing each program of computer
pc=0;
do{
instruction=memory[pc++]
decode (instruction)
fetch (operands)
execute;
store (result);
}
while (instruction!=halt);
6. The Von Neumann Architecture of Computer

The Von Neumann Architecture has the following concept:
The computer John von Neumann proposed an computer architecture,
popularly known as Stored Program Control Concept. Which is given in the
following figure:


i. CPU (Central Processing Unit) The engine of computer that runs the
program.
ii. ALU (Arithmetic and Logic Unit) Part of CPU that executes individual
instructions involving data (operands).
iii. Register A memory location in the CPU that holds a certain amount
of information. Now the CPU has either 32-bit or 64-bit capacity
registers.
iv. PC (Program Counter) It is also called the instruction register. It is a
type of register that holds the memory address of the next instruction
to be executed.
v. IR (Instruction Register) A type of register that holds the current
an operation performed by the ALU.
vii. Register File A collection of registers.


What is addressing mode?
For accessing variables, two major modes are:
- Register Mode: The operand in the contents of a processor register.
- Absolute (or direct mode): The operand is in a memory location.
For constant data
- Immediate mode: The operand is given explicitly in the instruction.
Pointer method are:
- Indirect method Address is pointed
instruction to be executed.
vi. Acc (Accumulator) A type of register designated to hold the result of
The different ways in which the location of an operand is specified in n
instruction are known as addressing modes. The most important
addressing modes found in modern processor are:


Using Program Counter (PC):
- Relative mode
Other Modes:
- Auto-increment mode: Automatically incremented to point to the
next item in a list.
- Auto-decrement mode: The contents of a register use automatically
decrement address.
Stack
Subroutine
Languages
For list and array (using general purpose register) :
- Index Mode: The effective address of the operand is generated by
addressing a constant value to the contents of a register.
A stack is a list of data elements, usually words words or bytes, with the
accessing restriction that elements can be added or removed at one end of
the list only. This is called the top of the stack, and the other end is called
the bottom of the stack. The last data item placed on the stack is the first
one removed when retrieval begins. So it is called last-in-first-out (LIFO).

Subroutine is a subtask (a whole or part of a task) which is processed many
times on different data values. When a program branches to a subroutine,
then it is the 'calling' of the subroutine. The instruction that performs this
branch operation is referred to as a 'call' instruction.

A language is a means of conversation. It is used to perform
communication between the user-need and hardware requirement.
Computer uses machine instructions in binary pattern which is difficult but
not impossible to understand for people to work with it. The machine
instructions are difficult so to communicate with computer hardware,
various languages are developed. Major categories are as follows:



Levels of Computer Architecture
There are a number of levels in a computer, from the user level down to
the transistor
level.
Progressing
from the top
level
downward, the
levels become
less abstract as
more of the
internal
structure of the
computer
1. Low Level Language (Machine Language, Binary Code): These are the
exact representation o instructions as they appear in the memory of
computer. The sequence of instructions and expressions are
represented in binary forms.
2. Assembly Language: To simplify the machine code, some symbols and
mnemonics are used in place of pure binary code. This is known as
assembly language. Assembly language requires assembler to convert
the entire sequence of instructions into machine form.
3. High Level Language: These are the advanced form of language. These
are used for solving the problems and can generally used for the most
of all types of machines. A compiler or an interpreter is needed for
converting these languages to binary form.
becomes visible.
The top level of the computer architecture is the user level. User always
uses the application programs. So the highest level is the application
programs. The second level is the machine Language, written and read in
the form of binary and directly understood by the computer. The third


level defines the assembly language that consists the machine code. The
fourth level is the microprogramming level in which hardwired controls are
included. The fifth level defines the different functional units like memory,
register, ALU etc. After functional units, the sixth level includes the
combinations of logic gates. The last level studies the transistors and wires.

The Instruction Set Architecture Approach
Common Machine Data Type Sizes

Hardware Organization
Processor architecture
The Instruction Set Architecture (ISA) approach of a machine studies to the
machine and assembly language levels. A compiler translates a high level
language, which is architecture independent, into assembly language,
which is architecture dependent. An assembler translates assembly
language programs into executable binary codes. For fully compiled
languages like C and FORTRAN, the binary codes are executed directly by
the target machine.

A byte is composed of 8 bits. Two nibbles make up a byte. Halfwords,
words, doublewords, and quadwords are composed of bytes are as shown
below:


Pipelining, hazards, ILP, HW/SW interface
Memory hierarchies
Interconnects
I/O systems
Hardware technology used (e.g. component size)
Computer architecture focuses on organization and quantitative
principles of design
The Compilation Process
Identifier = Expression,
where Expression is further parsed into the form:
Identifier + Constant.
Compilation translates a program written in a high level language into
a functionally equivalent program in assembly language.
Consider a simple high-level language assignment statement: A = B +
4;
(for example, into identifiers such as A and B), denotations such
as the constant value 4, and program delimiters such as = and +.
This portion of compilation is referred to as lexical analysis.
Steps involved in compiling this statement into assembly code:
Reducing the program text to the basic symbols of the language
Parsing symbols to recognize the underlying program structure.
For the statement above, the parser must recognize the form:
program variables, and further associating them with particular
memory locations where the variables are located at run time.
Parsing is sometimes called syntactic analysis.
Name analysis: associating the names A and B with particular
Type analysis: determining the types of all data items. In the
example above, variables A and B and constant 4 would be
recognized as being of type int in some languages. Name and
type analysis are sometimes referred to together as semantic
analysis: determining the underlying meaning of program
components.


ld [B], %r0, %r1 ! Get variable B into a register.
add %r1, 4, %r2 ! Compute the value of the expression
st %r2, %r0, [A] ! Make the assignment.
The Assembly Process
The process of translating an assembly language program into a
machine language program is referred to as the assembly process.
address of the program, if there is one; and provide a degree of
assemble-time arithmetic.
Include a mechanism that allows variables to be defined in one
assembly language program and used in another, separately
assembled program.
Support macro expansion.
The Memory Hierarchy
Action mapping and code generation: associating program
statements with their appropriate assembly language sequence.
In the statement above, the assembly language sequence might
be as follows:
language statements into the equivalent machine language.
Permit symbolic labels to represent addresses and constants.
Provide a means for the programmer to specify the starting
Production assemblers generally provide this support:
Allow programmer to specify locations of data and code.
Provide assembly-language mnemonics for all machine
instructions and addressing modes, and translate valid assembly






A Simple Bus Structure:

The Power Equation: The Reliability Equation (how to find the
reliability of machine)




Computer Hardware
A computer may be divided into six logical units.
Input Unit
Obtain information from input devices: keyboards and mouse
and other devices.
Output Unit
Take information that has been processed.
Place it on output devices: displayed on screens, printed on
paper, sound in speaker.
Memory Unit
RAM (random access memory) is volatile, stores program and
data.
ROM (read only memory) is non-volatile, contains fundamental
instructions.
Arithmetic and Logic Unit (ALU)
Place the information at the disposal of the other units to be
processed.


Perform all the arithmetic and logic operations: addition,
subtraction, comparison, etc..
CPU
Tell the input unit when information should be read into the
memory unit.
Tell the ALU when information from the memory should be used
in calculations.
Tell the output unit when to send information from the memory
unit to certain output devices.
Secondary Storage.
Permanent storage areas for programs and data: magnetic tapes,
magnetic hard disks, _oppy disk, CD ROM




Virtual Machines (VM)
Virtualisation is a technique which allows one to partition a computer system in multiple
completely separate systems. Each of these provides a software environment which is
very similar to that of a complete computer. Such an environment is called a virtual
machine (VM).
By means of hardware and software control of information flow a single computer system
presents to the users multiple exact copies of the system. Each user is given the illusion
that he has the complete computer system at his disposal. This is known as virtual
machine.A virtual machine is a higher level architecture which works on the raw machine.
The raw computer hardware is called M
0
and the instruction set L
0
A virtual machine is
a hypothetical computer M1 whose machine language is L1. To implement a virtual
machine, developers add a software layer to a real machine to support the desired
architecture. By doing so, a VM can circumvent real machine compatibility and hardware
resource constraints. Virtualization is a level of indirection between hardware and
software.
One will typically want to install an operating system on a virtual machine to be able to run
applications. This guest operating system assumes that it has complete control of the computer,
and it will attempt to access it's hardware. This cannot be allowed, since the hardware is shared
with guest operating systems running on other virtual machines. A program called virtual
machine monitor (VMM) or hypervisor is needed to make sure
all resources are shared properly. The role of a VMM dividing resources between operating
systems differs from that of a kernel dividing resources between applications. The main
difference is that the latter typically provides an abstraction of physical devices, while the former
does not change the abstraction level [16]. The VMM should present a faithful low-level
interface to virtualised hardware. The VMM itself may have full hardware access, but it can also
can be a normal application running on an operating system. In this case the operating system on
which the VMM runs is called the host operating system. This situation is shown in following
figure:




Structured Computer Organization
Languages levels and virtual machines
A computers native language, machine language, is difficult for humans to use to program the computer.
Due to this difficulty, computers are often structured as a series of abstractions, each building on the one
below it. In this way, complexity can be mastered. This approach is called structured computer organization.
Let the machine language be called L0 (since it is at the lowest level of
abstraction). L0 is inconvenient for human use, so lets design a new
language L1 which is easier. A program written in L1 must be translated
into an equivalent L0 program before it can be executed.
Another possibility is to write a program in L0 that examines
each individual instruction and executes the equivalent sequence of
L0 instructions. This technique is called interpretation and the
program is


Computer as a multilevel machine

Contemporary Multilevel Machines
Most modern computers consist of two or more levels (as many as six).
The lowest level is the digital logic level constructed from gates. Each gate
called an interpreter. Translation and interpretation are similar. Both
methods, and a combination of the two, are widely used.
Rather than think of translation/interpretation, it is often simpler to
imagine a virtual machine whose machine language is L1. Call this machine
M1. Why not implement M1 directly? It might be too expensive or
complicated to construct out of electrical circuits. In order to make
translation practical, M0 (the real machine) and M1 must not be too
different. So, L1 might still be difficult to program! Solution? Create a new
VM M2. If necessary repeat until we have a useful machine. This leads to a
computer consisting of a number of layers or levels, one on top of another.



has one or more digital inputs and computes some simple function of the
inputs such as AND or OR. Gates are built up from transistors. A small
number of gates can be combined to form a 1-bit memory. 1-bit memories
can be combined to from 16, 32, or 64 bit registers which can hold a single
binary number.

The next level up is the microarchitecture level. At this level we see a
collection of (typically) 8 to 32 registers that form a local memory and a


circuit called an ALU (Arithmetic Logic Unit) capable of performing simple
arithmetic operations. The registers are connected to the ALU to form a
data path over which data flow. On some machines the operation of the
data path is controlled by a program called a microprogram. On other
machines the data path is controlled directly by hardware.
Level 2 is the Instruction Set Architecture (ISA) level. This level consists of
the instructions that can be carried out by the computer. The facilities
added at level 3 are carried out by an interpreter running at level 2 called
an operating system. This level is called the operating system level. Levels
4 and 5 are used by application programmers (only systems programmers
use the lower three levels). The languages of levels 4 and 5 are usually
translated while those of levels 2 and 3 are always interpreted.
Levels 4 and 5 provide symbolic languages while the machine languages of
levels 1, 2, and 3 are numeric. Level 4 is the assembly language level. It
provides a program called an assembler which translates a symbolic form
of the level 1, 2, or 3 languages. Level 5 consists of high-level languages
such as BASIC, C, C++, and Java. Programs written in these languages are
translated to level 3 or 4 languages by translators known as compilers.
Earlier levels of Computer
Early computers were operated directly by a programmer (or a computer
operator) who entered a deck of cards containing (e.g.) a FORTRAN
program. The program was translated to machine language, output on
cards and subsequently run. Around 1960 people tried to reduce wasted
time by automating the operators job. A program called an operating
system was kept in the computer at all times. The programmer provided
certain control cards along with the program that were read and carried
out by the operating system.



Early operating systems read card decks and printed output on the line
printer. These were known as batch systems. In the early 1960s
timesharing systems in which users were connected to the CPU using
terminals and the CPU was shared were introduced. Due to the ease of
introducing new instructions in microprogrammed architectures, by the
1970s instruction sets had grown large and the microprogram large and
slow. At this point researchers realized that by simplifying the instruction
set and implementing it directly in hardware the computer could be much
faster.

Anda mungkin juga menyukai