0 ratings0% found this document useful (0 votes) 27 views12 pagesComputer Architecture Part 2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
| Basic Structure of Computers ®
The Basic Computers Structures are divided into the following:
Funetional Units
Basic Operational Concepts
Bus Structures
4. Software
5. Performance
3
‘The basic or simple di
gram ofa computer system is shown below
Main Memory System
Adress DDatainstruction
Central Processing Unit (CPU)
Operator, | \
wears || Attnete || (intron
(pepa || | topic une
{comme (Les
LZ contrat unit
kes Se)
Input/Output System
Functional Units
A computer consist of three main parts
1. A processor (CPU)
I. Armain-memory system
TL, An WO system
‘The CPU consists of a control unit, registers, the arithmetic and logic unit, the instruction
execution unit, and the interconnections among these components
‘The information handled by computer ae:
@ Instruction
2 Gov
bets
e transfer
nformation within a computer as well as
.en the computer and its I/O devices
3 Specify the arithmetic and logic operations to be performed
* Data
Numbers and encoded characters that are used as operands by the
instructions
aoft3-———-
v
v
Program
A list of instructions that performs a task is called a
program
The program usually is stored in a memory called
program memory
The computer is completely controlled by the stored
program, except for possible external interruption by an
operator or by I/O devices connected to the machine
Information handled by a computer must be encoded in a
suitable format. Most present-day hardware employs
digital circuits that have only two stable states, 0 (OFF)
and 1 (ON)
Memory Unit
Memory
@ The storage area in which programs are kept when they are
running and that contains the data needed by the running
programs
Types of memory
@ Volatile memory: storage that retains data only if itis receiving
power, such as dynamic random access memory (DRAM)
‘@ Nonvolatile memory: a form of memory that retains data even in
the absence of a power source and that is used to store programs
between runs, such as flash memory
Usually, a computer has two classes of storage
@ Primary memory and secondary memory
Primary memory
Also called main memory. Volatile memory used te hold
programs while they are running; typically consists of DRAM in
today’s computers,
2013y
Secondary memory
© Nonvolatile memory used to store programs and data between
runs; typically consists of magnetic disks in today's computers
The memory consists of storage cells, each capable of
storing one bit of information
4 Thestorage cells are processed in groups of fixed size called
words
4 Toprovide easy access to any word in the memory, a distinct
address is associated with each word location
The number of bits in each word is often referred to as the
word length of the computer
© Typical word length from 16 to 64 bits
The capacity of the memory is one factor that
characterizes the size of a computer
Instruction and data can be written into the memory or
read out under the control of the processor
Itisessential to be able to access any word location in the
memory as quickly as possible
@ Memory in which any location can be reached in a short and
fixed amount of time after specifying its address called random-
access memory (RAM)
The time required to access one word is called the
memory access time
© This time is fixed, independent of the location cof the word being
accessed
The memory of a computer is normally implemented as a
memory hierarchy of three or four levels
© The small, fast, RAM units are called caches
The largest and slowest unit is refered to asthe main memory
303Y
v
v
i
Arithmetic and Logic Unit
Most computer operations are performed in the
arithmetic and logic unit (ALU) of the processor
For example, consider two numbers stored in the memory
are to be added
4 They are brought into the processor, and the actual addition is
cartied out by the ALU. Then sum may be stored in the memory
or retained in the processor for immediate use
Typical arithmetic and logic operation
# Addition, subtraction, multiplication, division, comparison,
complement, etc
When operands are brought into the processor, they are
stored in high-speed storage elements called registers.
@ Each register can store one word of data
Control Unit
The control unit is the nerve center that sends control
signals to other units and senses their states
Thus the control unit serves as a coordinator of the memory,
arithmetic and logic, and input/output units
The operation of a computer can be summarized as
follows:
The computer accepts information in the form of programs and
data through an input unit and stores it in the memory
Information stored in the memory is fetched, under program
control, into an ALU, where it is processed
Processed information leaves the computer through an output
unit
°
°
°
Allactivities inside the machine are directed by the control unit
sof| Computer Components: Top-Level View
Input/Output
Control
Processor
ALU
Ros
general pupose registers
Basic Operational Concepts
Inpu/Output
Control
Processor
R,
general purpose registers
sofPte
> Normal execution of programs may be preempted if some
device requires urgent servicing
To deal with the situation immediately, the normal
execution of the current program must be interrupted
Procedure of interrupt operation
°
The device raises an interrupt signal
«
The processor provides the requested service by executing an
appropriate interrupt-service routine
The state of the processor is first saved before servicing the
interrupt
‘© Normally, the contents ofthe PC, the general registers, and some
‘control information are stored in memory
When the interrupt-service routine is completed, the state ofthe
processor is restored so that the interrupted program may
continue
Classes of Interrupts
» Program
4 Generated by some condition that occurs as @ result of an
instruction execution such as arithmetic overflow, division by
zero, attempt to execute an illegal machine instruction, or
reference outside a usr’s allowed memory space
> Timer
@ Generated by a timer within the processor. This allows the
perating system to perform certain functions ona regular basis
» YO
Generated by an I/O controller, to signal normal completion of
an operation or to signal a variety of error conditions
> Hardware failure
4 Generated by a failure suchas power failure or memory parity
error
60f13Bus Structures
» Agroup of lines that serves a connecting path for several
devices is called a bus
4 Inaddition tothe lines that carry the data, the bus must have
lines for address and control purposes
& The simplest way to interconnect functional units is to use a
single bus, as shown below
Drawbacks of the Single Bus Structure
v
The devices connected to a bus vary widely in their speed
of operation
Some devices are relatively slow, such as printer and keyboard
© Some devices are considerably fast, such as optical disks
4 Memory and processor units operate ae the fastest parts of a
computer
Efficient transfer mechanism thus is needed to cope with
this problem
4 Acommon approach is to include buffer registers with the
devices to hold the information during transfers
4 Ananother approach is to use two-bus structure and an
additional transfer mechanism
12 high-performance bus a low-performance, anda bridge for
transferring the data between the two buses. ARMA Bus belongs to
this structure
Tof 13SN SS
Software
> Inorder for a user to enter and run an application
Program, the computer must already contain some
system software in its memory
System software is a collection of programs that are
executed as needed to perform functions such as
Receiving and interpreting user commands
‘Running standard application programs such as word processors,
or games
Managing the storage and retrieval of files in secondary storage
devices
4 Running standard application programs such as word processors,
ete
© Controlling I/O units to receive input information and produce
‘output results
Translating programs from source form prepared by the user into
object form consisting of machine instructions
© Linking and nmnning user-written application programs with
existing standard library routines, such as numerical computation
packages:
> System software is thus responsible for the coordination
of all activities in a computing system
Operating System
v
Operating system (0S)
© Thisisa large program, or actually a collection of routines, that is
used to control the sharing of and interaction among various
computer units as they perform application programs
> The OS routines perform the tasks required to assign
computer resource to individual application programs
© These tasks include assigning memory and magnetic disk space
to program and data files, moving data between memory and
disk units, and handling I/O operations
> Inthe following, a system with one processor, one disk,
and one printer is given to explain the basics of OS
‘@ Assume that part of the program’s task involves reading a data
file from the disk into the memory, performing some
computation on the data, and printing the results
BoUser Program and OS Routine Sharing
\c 08 rue rites oad ap
fom dikto memory was nl eral crcl
Printer | | end pessesexecutonconal tobe apicaton repr
Disk
oa )
aa Ee
Program
Lt
4 a 4h ty Time
Multiprogramming or Multitasking
Printer
isk |"
os
routines
(
Program |
|
a ee cary Time
eonswv
v
a
x
Performance
The speed with which a computer executes programs is
affected by the design of its hardware and its machine
language instructions
Because programs are usually written in a high-level
language, performance is also affected by the compiler
that translates programs into machine languages
For best performance, the following factors must be
considered
¢ Compiler
Instruction set
© Hardware design
Processor circuits are controlled by a timing signal called
aclock
@ The clock defines regular time intervals, called clock cycles
To execute a machine instruction, the processor divides
the action to be performed into a sequence of basic steps,
such that each step can be completed in one clock cycle
Let the length P of one clock cycle, its inverse is the clock
rate, R=1/P
Basic performance equation
T=(NxG)/R, where Tis the processor time required to execute a
program, Ni the number of instruction executions, and isthe
average number of basi steps needed to execute one machine
instruction
100f 13System Balance is Essential
> Note that system balance is absolutely essential for
improving performance i
» fone replaces a machine's processor with a model
having twice the performance, this will not double the
Overall system performance unless corres ponding,
improvements are made to other parts of the system
CPU-bound task.
Input —* Processing —* Output
WO-bouns tas! {source:B, Parhami, UCSB.
Performance Improvement
> Pipelining and superscalar operation
4 Fipelining: by overlapping the execution of sucessive
instructions
4 Superscalar: different instructions are concurrent executed with
rultipl instruction pipelines. This means that multiple
functional units are needed
> Clock rate improvement
© Improving the inegrated-icuit technology makes logic circuits
faster, which reduces the time needed to complete a basic step
‘6 Reducing amount of processing donein one basic tep also makes
it possible to reduce the clock period, P, However, ifthe actions
thet have to be performed by an instruction remain the same, the
rnumber of basic steps needed may increase
> Reduce the number of basic steps to execute
‘Reduced instruction set computers (RISC) and complex
instruction set computers (CISC)
a1oft3
oll_|_Comparing the AMD i
t Comparing he AMD Das-Coe and ne Dal Core Processor stems ESSE
— SEES
in comparing design aly
ween compules, say Tess oflen the practice to relate the peformares of two
+ X and Y. When computer X is faster than computer Y, this means
that the response time or
Therefore,
Execution time of ¥
Execution time of ¥
AMD Dual-Core and Intel Dual-Core Processor Systems Execution times ———
if SPEC CPU2006 Execution Time in sevonds
f Benchmarks “AM Turion Dual Core | Intel Pentium Dual Core
|1__[00.peribeneh a a
a ie
[2 [aot ad
H 403.gee eae
| 429.mef B92
S.gobmi 813 mcs |
456shmmer 1235
462 fibquantaum
464. h26areE i
lomnetpp
4PB.astar
-483.xalancbmake
7a
955.
a
[~[Totat Execution Time senea 10924 sgeecea
The performance results of HP Pavilion dv3, AMD Turion It P520 Dual-Core Processor ane
Te prfomans mre panu Dud-cre Proce gteted fom SPP CINT2006,
da aac above able and heal excite or he processor a 2S follows:
‘Total Execution time of AMD Processor =11647 seconds
‘Total Execution time of Intel Processor = 10928 seonds
Given,
Execution time of AMD Processor (E*)
Execution time of Intel Processor (Ey)
“To caeulae the percentage ofthe processor execution ti
“Faceution time of AMD Processor (EX) _
Execution me of Intel Processor (Ey) 100
These eS
ata Process
a reser = Exel rcs +2
400 Ex(AMD Processor) ~ Ex (Incl Processor) }= n+ Ey(intel Processor)
Ex(AMD Processor) ~ Ex (Intel Processor) | 100
Fy intel Processor) ai
pe HAT 10924 , 100 41
=~ q0924 TC
ne 734100 _ 72300
= “qopa8 ~ 10924
n= 66185%
120f13