Chapter 1
Chapter 1
Chapter 1
one
Introduction Computer Basics and computer
performance
Contents
Computer Architecture
Computer organization
Structure Vs Function
CPU Structure
Computer evolution
Computer Performance
Introduction
The term computer is derived from the word
compute. The word compute means to calculate.
A computer is an electronic machine that accepts
data from the user, processes the data by
performing calculations and operations on it, and
generates the desired output results.
Computer performs both simple and complex
operations, with speed and accuracy.
Architecture vs Organization
Computer Architecture
Computer Architecture refers to those attributes of
a system that have a direct impact on the logical
execution of a program.
is a functional description of requirements and
design implementation for the various parts of a
computer.
It deals with the functional behavior of computer
systems. It comes before the computer organization
while designing a computer.
Architecture describes what the
computer does.
The architecture of a CPU is actually its
The instruction set
Architecture vs Organization
Computer Organization
Computer Organization refers to the operational
units and their interconnections that realize the
architectural specifications.
Comes after the decision of Computer Architecture.
It is how operational attributes are linked together
and contribute to realizing the architectural
specification and deals with a structural relationship.
Organization describes how Computer
does.
Examples:
Control signals
Interfaces between computer and peripherals
The memory technology being used
Example
Take two different models from a same vendor like
Intel are brought to analyze.
Both the models(lap top and desk top) have same
processor like core 3 .
That means both models understand the same
instruction set as you know each processor
understands a fixed no of instructions. Hence their
architecture is same.
Due to the placement of various hardware components,
one model (laptop) is slim and other is bulky. Hence
their organization is different
A core, or CPU core, is the "brain" of a CPU. It receives instructions, and
performs calculations, or operations, to satisfy those instructions. A CPU can
have multiple cores.
A processor with two cores is called a dual-core processor; with four cores, a
quad-core; six cores, hexa-core; eight cores, octa-core. As of 2019, most
consumer CPUs feature between two and twelve cores. Workstation and server
CPUs may feature as many as 48 cores.
Each CPU core can perform operations separately from the others. Multiple
cores may also work together to perform parallel operations on a shared set of
data in the CPU's memory cache.
Structure vs Function
Modern computers contain millions of electronic
components
The key to describing such systems is to recognize their
hierarchical nature
They are a set of layers or levels of interrelated
subsystems
Each level consists of a set of components and their
inter-relationships
The behavior of each level depends only on a simplified,
abstracted characterization of the system at the next
lower level
At each level, the designer is concerned with:
Structure: The way in which the components are
interrelated
Function: The operation of each individual component
as part of the structure.
Structure vs Function
Function
A functional view of the computer
Basic functions that a computer can perform:
Data processing: Computer must be able to process
data which may take a wide variety of forms and the
range of processing.
• Data storage: Computer stores data either
temporarily or permanently.
• Data movement: Computer must be able to move
data between itself and the outside world.
• Control: There must be a control of the above three
functions by instructions provided by the user of the
computer (i.e. their programs)
• Input/output - when data are received from or
delivered to a peripheral, a device connected directly
Structure vs Function
Structure
Simplest possible view of a computer:
Storage
Processing
Peripherals
Communication Lines
Structure vs Function
Functional view of a computer
Storage Operation
Data movement operation
Peripherals
Main Memory
Input/Output
actual processing of data with out CU. CU organizes the processing of data and
instructions.
It acts as a supervisor, controls and coordinates the activity of the other units of
computer.
CU tells when to fetch the data and instructions, what to do, where to store the
Arithmetic and Logic Unit (ALU): Performs the computer's data processing
functions. ALU consists of two units arithmetic unit and logic unit.
The arithmetic unit performs arithmetic operations on the data that is made
A data bus: Provides read or write signals to the device to indicate if the
CPU is asking for information or sending it information.
this contains the contents that have been read from the memory location or are to be
Cont.…
A control bus: this manages the information flow between components
indicating whether the operation is a read or a write and ensuring that the
operation happens at the right time
Example: A CPU has registers A, B, C, and D and it has an 8-bit data
bus and a 16-bit address bus. The CPU can access memory from
addresses 0000 to FFFFH
Assume that the code for the CPU to move a value to register A is B0H
and the code for adding a value to register A is 04H. The action to be
performed by the CPU is to put 21H into register A, and then add to
register A values 42H and 12H
After the CPU brings the value (42H), it provides the contents of register A
along with this value to the ALU to perform the addition.
It then takes the result of the addition from the ALU’s output and puts it in
register A
The program counter becomes 1404, the address of the next instruction
Address 1404H is put on the address bus and the code is fetched into the CPU, decoded, and
executed. This code is again adding a value to register A. The program counter is updated to
1406H
The contents of address 1406 are fetched in and executed. This HALT instruction tells the CPU
to stop incrementing the program counter and asking for the next instruction
CPU and GPU
GPU companies CPU companies
•AMD
•AMD
•ARM Holdings
•Apple
•Imagination Technol
•ARM Holdings
ogies
•Microchip Technolog •ASRock
y •Centaur Technology
•NVIDIA •Gumstix
•SAPPHIRE •Intel
•Vivante •VIA
•ZiiLABS
Computer Evolution
Generations of computer
The evolution of computers to their present state is divided into five
generations of computers, based on the hardware and software they use,
their physical appearance and their computing characteristics.
o First generation (1940 to 1956): Using vacuum tubes
in judging systems.
There are two main measurements of performance.
Where
T=the processor time
f=clock rate/ frequency
FLOPS
Stands for ‘Floating Point Operations Per
Second.
These are common in many scientific and
game applications.
It can be defined as follows:
Example 1
Find the performance of each processors in terms of instruction per
second for the given table
Processors Clock rate CPI
(GHz)
P1 3 1.5
P2 2.4 1
P3
Given 4 2.2
Clock rate=cycle/second find: instruction/second
CPI=cycle/instruction I/S=C/S*1/CPI
P1= 3 x =2x
P2=2.4xx1 =2.4x
P3= 4xx ½.2 =1.82x
Find #cycles and # instructions if each processors executed a
program in 10 seconds and I/S is calculated as above
Exercise
We want to compare the computers R1 and R2, which differ that R1 has the machine instructions
for the floating point operations, while R2 has not (FP operations are implemented in the
software using several non-FP instructions). Both computers have a clock frequency of 400 MHz.
In both we perform the same program, which has the following mixture of commands:
Instruction duration (Number of
Dynamic Share of
clock periods CPIi)
Instruction Type instructions in
program (pi)
R1 R2
FP addition 16% 6 20
FP
10% 8 32
multiplication
FP division 8% 10 66
Non - FP
66% 3 3
instructions