You are on page 1of 59

Computer Organization

Unit I
Basic Structure of Computer
Computer types, Functional units - input unit; output unit; ALU;
control unit; memory unit,
Basic operational concepts,
Bus structure, Software,
Performance processor clock; basic performance equation;
pipelining and superscalar; operation; clock rate;
instruction set: CISC & RISC;
Multiprocessors & Multi computers,
Historical perspective (generations of a computer).

Digital computer(computer)
Digital computer(computer)
fast electronic calculating m/c that accepts
digitized i/p information, process it according
to a list of internally stored instructions and
produce the resulting o/p information.

Program
List of instructions are called a computer
program

Memory
Storage in a computer system are called
memory.

Computer Organization

Computer Organization

Organization and Architecture


Computer Architecture
refers to those attributes of a system that have a direct
impact on the logical execution of a program.
Examples:
o
o
o
o

the instruction set


the number of bits used to represent various data types
I/O mechanisms
memory addressing techniques

Computer Organization
refers to the operational units and their interconnections
that realize the architectural specifications.
Examples are things that are transparent to the
programmer:
o control signals
o interfaces between computer and peripherals
o the memory technology being used

So, for example, the fact that a multiply instruction is


available is a computer architecture issue. How that
multiply is implemented is a computer organization issue.

Computer types
Exist that differ in
size
cost
computational power
intended use

Types of computers
Personal Computer
Desktop computers
Notebook computer
Workstations
Enterprise systems or main frames
servers
supercomputers

Functional Units

Input Unit

Output Unit
Counterpart of i/p unit
its fn is to sent the processed output
to the outside world
eg: printer
Some units such as graphical
displays, provide both an o/p and an
i/p function.
The dual role of such unit is the
reason for using the single I/O unit in
many cases.

eg: Magnetic disks ,tapes, optical disk(CDs)

Basic Operational Concepts

Separate Memory Access and ALU


Operation
Load LOCA, R1
Add R1, R0
Whose contents will be overwritten?

Registers
When operands are brought into the
processor, they are stored in highspeed storage elements called
registers.

Instruction register (IR)


Program counter (PC)
General-purpose register (R0 Rn-1)
Memory address register (MAR)
Memory data register (MDR)

Interrupts

Bus Structures
There are many ways to connect
different parts inside a computer
together.
A group of lines that serves as a
connecting path for several devices
is called a bus.
Address/data/control
2 Types of bus structures:
Single
Multiple

Comparison of Bus
Structures

Speed Issue
Different devices have different
transfer/operate speed.
If the speed of bus is bounded by the
slowest device connected to it, the
efficiency will be very low.
How to solve this?
A common approach use buffers.

Buffer register
Some electromechanical devices such as KB and printers are
relatively slow.
Others like magnetic or optical disks are considerably faster.
Memory and processor units operate at electronic speeds,
making them the faster part of computer.
Because all of these devices must communicate with each other
over a bus, common approach is to include buffer registers with
the devices to hold the information during transfers.
It prevents a high speed processor from being locked to a slow
I/O device during a sequence of data transfers.
Eg:
Processor sends the character over the bus to the printer buffer.
Since the buffer is electromagnetic register, this transfer
requires relatively little time.
Once the bufffer is loaded, the printer can start printing without
further intervention by the processor.

Software
Inorder for a user to enter and run application program the
computer must contain some system s/w in its memory.
2 types of s/w
System s/w
Eg: Compiler-Translates high level Program to m/c
language program
Text editor-used for entering and editing applications
O/S-Large program, usually collection of routines used
to control the
sharing and interaction among various computer
units as they
execute application programs.
Application s/w
Eg: C,C++, Java, Fortran

System Software

Application Software

usually written in high level language.


In this user will specifies mathematical or text- processing
operations.
Need not know the details of m/c instructions.
Eg: C,C++, Java, Fortran

Operating System

Eg: Unix, Linux, DOS, Windows


Basics of o/s:
Consider a system with 1Pr., 1 disk and one printer.
Assume application program has been compiled from high level
language to m/c language form and stored in the disk.

Sharing process of User Program


and OS routine

Steps involved in running one


application program using O/S

Eg:
Elapsed time: t5-t0
Processor time: Periods labeled Program and O/s routine

Cache

Performance
1.
2.
3.
4.
5.
6.
7.

Processor Clock
Basic Performance Equation
Pipelining & Super Scalar Operation
Clock Rate
Instruction set: CISC & RISC
Compiler
Performance Measurement

1.Processor Clock
Clock
-Pr. ckts are controlled by a timing signal

Clock cycle
-Clock defines regular time intervals
-The execution of each instruction is divided into several steps,
each of which completes in one clock cycle.

Clock Rate (R)


-Clock defines regular time intervals
R=1/ P (Hertz =cycles/second)
where ,P=Length of one clock cycle
million=Mega(M)
billion=Giga(G)

Clock period (t)


500MHz then what is t in
nanoseconds?
500MHz =500Million Cycles/second
t=1/(500* 10^6) =2ns

2.Basic Performance
Equation
T processor time required to execute a program that
has been prepared in high-level language
N number of actual machine language instructions
needed to complete the execution (note: loop)
S average number of basic steps needed to execute
one machine instruction. Each step completes in one
clock cycle
R clock rate
Note: these are not independent to each other

N S
T
R

How to improve T?

3.Pipeline and Superscalar


Operation
Instructions are not necessarily executed one
after another.
The value of S doesnt have to be the number
of clock cycles to execute one instruction.
Pipelining overlapping the execution of
successive instructions.
Add R1, R2, R3
Superscalar operation multiple instruction
pipelines are implemented in the processor.
Goal reduce S (could become <1 !)

Pipelining
It is a key feature in DSP to get parallel instructions

working properly
Requires careful timing

Overlap operations to increase performance


Pipeline CPU operations to increase clock
speed over a sequential implementation
Separate parallel functional units
Peripheral interfaces for I/O do not burden CPU

Basic Ideas
Parallel processing
time

time

P1

a1

a2

a3

a4

P1

P2

b1

b2

b3

b4

P2

P3

c1

c2

c3

c4

P3

P4

d1

d2

d3

d4

P4

Less inter-processor communication


Complicated processor hardware

a1

b1

c1

d1

a2

b2

c2

Pipelined
a3
b3
processing

d2
c3

d3

a4

b4

c4

More inter-processor communication


Simpler processor hardware

Colors: different types of operations performed


a, b, c, d: different data streams processed

d4

4.Clock Rate
Increase clock rate
Improve the integrated-circuit (IC) technology to make the circuits
faster
Reduce the amount of processing done in one basic step
(however, this may increase the number of basic steps needed)

Increases in R that are entirely caused by


improvements in IC technology affect all
aspects of the processors operation
equally except the time to access the main
memory.

5.CISC and RISC


Tradeoff between N and S
A key consideration is the use of
pipelining
S is close to 1 even though the number of basic steps
per instruction may be considerably larger
It is much easier to implement efficient pipelining in
processor with simple instruction sets

Reduced Instruction Set Computers


(RISC)
Complex Instruction Set Computers
(CISC)

Sr.N
o.

CISC

RISC

Complex Instruction Set


Computers

Reduced Instruction Set


Computers

Require small no. of basic


steps to execute

Simple instructions require


small no. of basic steps to
execute

Small value of N & Large


value of S (Individual
instructions to perform more
complex operations)

Large value of N & Small value


of S (Large no. of instructions
to perform a given task)

Complex instructions
Easier to implement efficient
combined with pipelining give pipelining in processors.
best performance.

Complex Multi clock


instructions

Simple Single clock


instructions

Control unit is hard wired and


micro- programmed

Control unit is hard wired only

Memory reference
instructions

Register reference instructions


Except LOAD and STORE
Memory reference instructions

Less Register in CPU

More Register in CPU

6. Compiler
A compiler translates a high-level language
program into a sequence of machine
instructions.
To reduce N, we need a suitable machine
instruction set and a compiler that makes
good use of it.
Goal reduce NS
A compiler may not be designed for a specific
processor; however, a high-quality compiler is
usually designed for, and with, a specific
processor.

7.Performance
Measurement
T is difficult to compute.

Measure computer performance using benchmark programs.


System Performance Evaluation Corporation (SPEC) selects and
publishes representative application programs for different
application domains, together with test results for many
commercially available computers.
Eg:
Program is compiled for computer under test and the running time
on real computer is measured. (no simulation)
The same program is also compiled & run on Reference computer
(such as SUN SPARC, Ultra SPARC- I0 workstation etc)
SPECi=the rating for program i
n=no. of programs

Running time on the reference computer


SPEC rating
Running time on the computer under test
n

SPEC rating ( SPECi )


i 1

1
n

SPEC rating
Because the actual execution is
measured , SPEC rating is measure of
the combined effect of all factors
affecting the performance including
the
compiler
O/S
processor &
memory of computer being tested

Multiprocessors and Multicomputers


Multiprocessor computer

Large computer system contain a no. of pr. units called multi pr.
systems.
Execute a number of different application tasks in parallel
Execute subtasks of a single large task in parallel
All processors have access to all of the memory called shared-memory
multiprocessor systems
High performance comes with increased Cost and complexity.
Increased Cost due to Multiple processors, memory units & complex
interconnection networks

Multicomputers
An interconnected group of computers to achieve high total
computational power.
Each computer only have access to its own memory
Exchange message via a communication network message-passing
multicomputers

Key for Computer Generations

Time Frame
Circuit Components
Elements per Component
Internal Storage
Memory Capacity
Data Input
Popular Computers and Companies
at that time

First Generations
1958

1951-

Vacuum Tubes
Magnetic Drum
4,000 bits
Hard Wire Programs in computers
IBM 650, Univac I
ENIAC

Second Generation 19591964

Transistors
Magnetic Cores
32,000 bits
Punch Cards
CDC, GE, IBM

Third Generation
1974

1965-

Silicon Chips (Integrated circuits)= IC


Cores, ICs
128,000 bits
Keyboard Entry
IBM, NCR, Honeywell

Fourth Generation 19751989


Silicon Chips (Large scale integrated
circuits)=LSI
ICs, LSIs
100 million bits
Read programs off disks
Apple, Xerox, Texas Instrument,
Hewlett-Packard

Fifth Generation 1990present


Silicon Chips ( Very Large Integrated
Circuits) VLSI
LSIs, VLSIs
Unlimited
CdRom, Optical Disk
NEC, Packard Bell, Compaq, Other
Clones

You might also like