Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

COMPUTER ARCHITECTURE & ORGANIZATION

CHAPTER ONE
INTRODUCTION
What Is a Computer?
A computer is an electronic device, operating
under the control of instructions stored in its
own memory that can accept data (input),
process the data according to specified rules,
produce information (output), and store the
information for future use.
Cont’d…

Input Output
Processing

first, Accepts data such as raw facts, figures, and


symbol
then, Processes data into information
(Data that is organized, meaningful, and
useful )
finally, Produces and stores results for the futures.
Computer Architecture Vs Computer
Organization
Computer Architecture:-
It is concerned with the specifications of the various
functional modules, such as processors and memories and
structuring them together into a computer system.
It uses higher-level building blocks to optimize the overall
system performance
A computer architect, however, is not concerned with the
internal details of the components (e.g. ALU).
Architecture is those attributes visible to the programmer
includes: Instruction set, number of bits used for data
representation, I/O mechanisms, addressing techniques.
For example: It is an architectural design issues whether the
computer system will have a multiply instructions.
Computer Organization
It is concerned with the way the hardware computer operate and the way they
are connected together to form the computer s/m.
The various components are assumed to be in place and the task is to
investigate the organizational structure to verify that the computer parts
operate.
It refers to the operational units and their interconnections that realize the
architectural specifications.
Organizational attributes includes those hardware details transparent to the
programmer such as control signals, interfaces between the computer and
peripherals, and memory technology.
For example: It is an organizational issues whether the multiply instruction
will be implemented by special multiply unit or by a mechanism that makes
repeated use of the add unit of the system.
Organizational decision may be based on speed, costs or physical sizes.
The difference between computer architecture and
computer organization:
Structure & Function
Structure is the way in which components
relate to each other

Function is the operation of individual


components as part of the structure
Function
All computer functions are:
– Data processing
– Data storage
– Data movement
– Control
Functional View
Operations (a) Data movement
Operations (b) Storage
Operation (c) Processing from/to
storage
Operation (d)
Processing from storage to I/O
Structure - Top Level

Peripherals Computer

Central Main
Processing Memory
Unit

Computer
Systems
Interconnection

Input
Output
Communication
lines
Structure - The CPU

CPU

Computer Arithmetic
Registers and
I/O Login Unit
System CPU
Bus
Internal CPU
Memory Interconnection

Control
Unit
Structure - The Control Unit

Control Unit

CPU
Sequencing
ALU Login
Control
Internal
Unit
Bus
Control Unit
Registers Registers and
Decoders

Control
Memory
Assignment-I(10%)
1.2 Computer Evolution and performance
Computer performance
Computer performance is the amount of work
accomplished by a computer system.
Performance analysis should help answering
questions such as how fast can a program be
executed using a given computer?
The word performance in computer performance
means “How well is the computer doing the work it
is supposed to do?”. It basically depends on
response time, throughput and execution time of a
computer system.
Cont’d…
• Response time is the time from start to
completion of a task. This also includes:
 Operating system overhead.
 Waiting for I/O and other processes
 Accessing disk and memory
 Time spent executing on the CPU or execution time. This is
also referred to as execution time.
Throughput is the total amount of work done in a
given time.
CPU execution time is the total time a CPU spends
computing on a given task(excludes time for I/O or
running other programs). This is also referred to as
simply CPU time.
Cont’d…
 Performance is determined by execution time as performance
is inversely proportional to execution time.
 Performance = (1 / Execution time)
 (Performance of A / Performance of B) = (Execution Time of B
/ Execution Time of A)
Example –
Machine A runs a program in 100 seconds, Machine B runs the
same program in 125 seconds
(Performance of A / Performance of B) = (Execution Time of B /
Execution Time of A) = 125 / 100 = 1.25 That means machine A is
1.25 times faster than Machine B.
Computing CPU Time
 The time to execute a given program can be computed as
 CPU time = CPU clock cycles x clock cycle time „Since
clock cycle time and clock rate are reciprocals
 CPU time = CPU clock cycles / clock rate „The number
of CPU clock cycles can be determined by
 CPU clock cycles = (instructions/program) x (clock
cycles/instruction) = Instruction count x CPI(Cycles
per Instruction) which gives
 CPI =CPU clock cycles for the program/
Instruction count
 CPU time = Instruction count x CPI x clock cycle time
 CPU time = Instruction count x CPI / clock rate „
CPU Time Example „
• Example 1: ‰ CPU clock rate is 1 MHz ‰Program
takes 45 million cycles to execute ‰What’s the
CPU time?
45,000,000 * (1 / 1,000,000) = 45 seconds
Calculation of CPI (Cycles Per Instruction)
For the multi-cycle MIPS
Load 5 cycles
Store 4 cycles
R-type 4 cycles
Branch 3 cycles
Jump 3 cycles
If a program has
50% R-type instructions
10% load instructions
20% store instructions
8% branch instructions
2% jump instructions
then what is the CPI?
CPI = (4x50 + 5x10 + 4x20 + 3x8 + 3x2)/100 = 3.6

• MIPS : millions of instructions per second ‰
MIPS = instruction count / (execution time x
10^6 )
• MIPS =Instruction count/Execution time x
10^6 =Clock rate/CPI x 10^6
Examples
Solution
Cont’d…
Cont’d…
Cont’d…
Cont’d…
Cont’d…
Modeling a computer system
 Computer modeling is the process of using a computer to
make model of plan or design, especially in order to discover
how to make or improve a product.
VON NEUMANN ARCHITECTURE MODEL
In Von-Neumann architecture, there is no separate
data and program memory. Instead, a single memory
connection is given to the CPU.
Speed of execution is slower since it cannot
fetch the data and instructions at the same
time.
Speed of execution is slower since it cannot
fetch the data and instructions at the same
time.
Eg PC intel architecture computers
Harvard architecture model
• The Harvard architecture is a computer architecture with
separate storage and signal pathways for instructions and data.
Speed of execution is faster because the processor
fetches data and instructions simultaneously .
Controlling becomes complex since data and
instructions are to be fetched simultaneously.
It results in wastage of space since if the space is left
in the data memory then the instructions memory
cannot use the space of the data memory and vice-
versa.
Difference between Harvard architecture and
von-Neumann architecture
Harvard architecture model Von Neumann architecture model

The name is originated from “Harvard Mark I” It is named after the mathematician and early
a relay based old computer. computer scientist John Von Neumann.

It required two memories for their instruction It required only one memory for their
and data. instruction and data.
Design of the von Neumann architecture is
Design of Harvard architecture is complicated.
simple.

Harvard architecture is required separate bus Von Neumann architecture is required only
for instruction and data. one bus for instruction and data.

Processor can complete an instruction in one Processor needs two clock cycles to complete
cycle an instruction.
Easier to pipeline, so high performance can be Low performance as compared to Harvard
achieve. architecture.
Comparatively high cost. It is cheaper.

You might also like