prelims coe elec2
TRANSCRIPT
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 1/72
Computer Systems Organization and Architecture
- A Review -
Miss Sheena I. Sapuay
Instructor, CoE Elec 2
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 2/72
ARCHITECTURE
± A general term referring to the structure of all or
part of a computer system.
± The term also covers the design of system
software, such as the operating system (the
program that controls the computer), as well as
referring to the combination of hardware and
basic software that links the machines on a
computer network.
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 3/72
ARCHITECTURE cont.
Computer architecture refers to an entire structure and
to the details needed to make it functional.
Thus, computer architecture covers computer systems,
microprocessors, circuits, and system programs.
the term does not refer to application programs, such as
spreadsheets or word processing, which are required to
perform a task but not to make the system run.
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 4/72
COMPUTER
Machine that performs tasks, such as
calculations or electronic communication,
under the control of a set of instructions
called a program.
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 5/72
USES OF COMPUTER
In business, computers track inventories with bar codes
and scanners, check the credit status of customers, and
transfer funds electronically.
In homes, tiny computers embedded in the electroniccircuitry of most appliances control the indoor
temperature, operate home security systems, tell the
time, and turn videocassette recorders (VCRs) on and off.
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 6/72
USES OF COMPUTER cont.
Computers in automobiles regulate the flow of fuel,
thereby increasing gas mileage.
Computers also entertain, creating digitized sound on
stereo systems or computer-animated features from adigitally encoded laser disc.
Educators use computers to track grades and
communicate with students (computer aided
instruction).
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 7/72
USES OF COMPUTER cont.
Computers are used extensively in scientific
research to solve mathematical problems,
investigate complicated data, or model
systems that are too costly or impractical to
build, such as testing the air flow around the
next generation of aircraft.
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 8/72
USES OF COMPUTER cont.
The military employs computers in
sophisticated communications to encode and
unscramble messages, and to keep track of
personnel and supplies.
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 9/72
BASIC COMPUTER ORGANIZATION
The physical computer and its components are known ashardware.
Computer hardware includes: ± the memory that stores data and program instructions;
± the central processing unit (CPU) that carries out program instructions;
± the input devices, such as a keyboard or mouse, that allow the user tocommunicate with the computer;
± the output devices, such as printers and video display monitors, thatenable the computer to present information to the user;
± buses (hardware lines or wires) that connect these and other computercomponents.
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 10/72
BASIC COMPUTER ORGANIZATION
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 11/72
STORED PROGRAM ARCHITECTURE
one that keeps its programmed instructions,
as well as its data, in read-write, random-
access memory (RAM)
This architecture is implemented using Von
Neumann Architecture
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 12/72
VON NEUMANN ARCHITECTURE
a design model for a stored-program digital
computer that uses a central processing unit
(CPU) and a single separate storage structure
("memory") to hold both instructions and
data.
It is named after the mathematician and early
computer scientist John von Neumann.
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 13/72
VON NEUMANN ARCHITECTURE
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 14/72
VON NEUMANN ARCHITECTURE
All temporary computer designs are based on
this architecture
KEY CONCEPTS: ± Data & instructions are stored in a single read-
write memory
± Contents of memory are addressable by location
± Execution occurs in a sequential fashion
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 15/72
VON NEUMANN BOTTLENECK
separation between the CPU and memory
± the limited throughput (data transfer rate)
between the CPU and memory compared to the
amount of memory
seriously limits the effective processing speed
when the CPU is required to perform minimal
processing on large amounts of data
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 16/72
VON NEUMANN BOTTLENECK
The CPU is continuously forced to wait for
needed data to be transferred to or from
memory.
Since CPU speed and memory size have
increased much faster than the throughput
between them, the bottleneck has become
more of a problem, a problem whose severityincreases with every newer generation of CPU.
1/9/2012
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 17/72
CENTRAL PROCESSING UNIT
Otherwise known as processor
the portion of a computer system that carries
out the instructions of a computer program,and is the primary element carrying out the
computer's functions
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 18/72
ACTIONS PERFORMED BY CPU
Processor Memory
± Data may be transferred from processor to
memory & vice versa
Processor I/O
± Data may be transferred to or from a peripheral
device by transferring bet. the processor and anI/O module
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 19/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 20/72
INSTRUCTION PROCESSING
Processor reads (fetch) instruction from
memory one at a time & executes each
instruction
PROGRAM EXECUTION:
± F ETCH CYCLE instruction & data is taken from
the memory
± EXECUTE CYCLE instruction is executed by the
processor
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 21/72
INSTRUCTION CYCLE
also called fetch-and-execute cycle or fetch-
decode-execute cycle
the time period during which a computerprocesses a machine language instruction
from its memory or the sequence of actions
that the central processing unit (CPU)
performs to execute each machine codeinstruction in a program
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 22/72
Basic Instruction Cycle
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 23/72
INSTRUCTION CYCLE
Fetch the instruction
± The CPU presents the value of the program
counter (PC) on the address bus.
± The CPU then fetches the instruction from main
memory via the data bus into the memory data
register (MDR).
±The value from the MDR is then placed into theinstruction register (IR).
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 24/72
INSTRUCTION CYCLE
Decode the instruction
± The instruction decoder interprets and
implements the instruction.
± The instruction register (IR) holds the current
instruction, while the program counter (PC) holds
the address in memory of the next instruction to
be executed. ± Fetch required data from main memory to be
processed and place it into data registers.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 25/72
INSTRUCTION CYCLE
Execute the instruction
From the instruction register, the data forming theinstruction is decoded by the control unit.
It then passes the decoded information as asequence of control signals to the relevant functionunits of the CPU to perform the actions required bythe instruction such as reading values from
registers, passing them to the Arithmetic logic unit(ALU) to add them together and writing the resultback to a register.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 26/72
PROGRAM COUNTER (PC)
Holds the address of the instruction to fetched
next
Unless told otherwise, the processor always
increment the PC after each instruction is fetched
EX. PC=300,
± The processor will the next instruction at location 300
±After fetching, PC is incremented the next value of PCis 301, then 302, 303, and so on.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 27/72
INSTRUCTION REGISTER (IR)
Register inside the CPU where the fetched
instruction is loaded
a circuit that holds the instruction temporarilyso that it can be decoded and executed
INSTRUCTION
± Bits specifying the action of the processor to take
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 28/72
ILLUSTRATIVE EXAMPLE
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 29/72
Example of Program Execution(contents of memory and registers in hexadecimal)
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 30/72
INTERRUPTS & INSTRUCTION CYCLE
The processor can be engaged in executing
other instructions while an I/O operation is in
progress
An interruption of the normal sequence of
program execution
Execution resumes when interrupt processing
is completed
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 31/72
INTERRUPTS
Interrupt the normal sequencing of the
processor
Provided to improve processor utilization ± Most I/O devices are slower than the processor
± Processor must pause to wait for device
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 32/72
Transfer Control via Interrupt
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 33/72
CLASSES OF INTERRUPTS
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 34/72
INSTRUCTION CYCLE W/ & W/O INTERRUPTS
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 35/72
Instruction Cycle with Interrupts
1/9/2012 Miss Sheena I. Sapuay
HALT
Fetch Next
Instruction
Fetch Cycle Execute Cycle
Execute
Instruction
Check for
Interrupt;
Process
Interrupt
START
Interrupts
disabled
Interrupts
enabled
Interrupt Cycle
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 36/72
SIMPLE INTERRUPT PROCESSING
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 37/72
MULTIPLE INTERRUPT PROCESSING
Suppose an interrupt occurs while another
interrupt is being processed.
± E.g. printing data being received via
communications line.
Two approaches:
± Disable interrupts during interrupt processing
± Use a priority scheme.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 38/72
THE MICROPROCESSOR
An electronic circuit that functions as thecentral processing unit (CPU) of a computer,providing computational control.
one type of ultra-large-scale integrated circuit.
Integrated circuits, also known as microchips orchips, are complex electronic circuits consisting
of extremely tiny components formed on asingle, thin, flat piece of material known as asemiconductor.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 39/72
THE MICROPROCESSOR
Modern microprocessors incorporate
transistors (which act as electronic amplifiers,
oscillators, or, most commonly, switches), in
addition to other components such as
resistors, diodes, capacitors, and wires, all
packed into an area about the size of a
postage stamp.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 40/72
THE MICROPRESSOR: SECTIONS
Arithmetic/Logic Unit (ALU)
performs calculations on numbers and makes logical
decisions
Registers
the registers are special memory locations for storing
temporary information much as a scratch pad does
Control Unit deciphers programs; logic which controls the data
paths
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 41/72
THE MICROPRESSOR: SECTIONS
Buses
± carry digital information throughout the chip and
computer
Cache memory
± Internal data storage
± speed up access to external data-storage devices
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 42/72
THE MICROPROCESSOR
Modern microprocessors operate with buswidths of 64 bits, meaning that 64 bits of datacan be transferred at the same time.
A crystal oscillator in the computer provides aclock signal to coordinate all activities of themicroprocessor.
The clock speed of microprocessors allowsbillions of computer instructions to beexecuted every second.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 43/72
MACHINE INSTRUCTION
The operation of the CPU is determined by the
instructions it executes
Each CPU comprises an INSTRUCTION SET
± Collection of instructions that the CPU executes
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 44/72
ELEMENTS OF MACHINE INSTRUCTION
Each instruction must contain the information
required by the CPU for execution
OPERATION CODE specifies the operation to
be performed (ADD, MOV etc.), specified by a
binary code
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 45/72
ELEMENTS OF MACHINE INSTRUCTION
SOURCE OPERAND
± Operands that are input for the operation
RESULT OPERAND ± Operation may produce result
NEXT INSTRUCTION REFERENCE
± Tells the CPU where to fetch the next instruction.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 46/72
INSTRUCTION REPRESENTATION
Each instruction is represented by a sequenceof bits
Ex.
OPCODES are represented by abbreviations calledmnemonics that indicate operations
1/9/2012 Miss Sheena I. Sapuay
OP CODE OPERAND REF OPERAND REF
4 bits 6 bits 6 bits
16 bits
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 47/72
INSTRUCTION TYPES
A high-level language expresses operation in a
concise algebraic form using variables
A machine language expresses operation in a
basic form involving movement of data to or
from registers
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 48/72
INSTRUCTION TYPES
Data Processing
± Arithmetic/logic instructions
Data Storage ± Memory instructions
Data Movement
± I/O instructions
Control
± Test and branch instructions
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 49/72
TYPES OF OPERANDS
Addresses
Numbers
±
Numeric data types (integer, float, decimal) Characters
± Text or character strings
Logical Data ± Boolean data
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 50/72
INSTRUCTION SET
a list of all the instructions, and all theirvariations, that a processor can execute
Instructions include:
Arithmetic such as add and subtract
Logic instructions such as and, or, and not
Data instructions such as move, input, output, load,
and store Control flow instructions such as goto, if ... goto, call,
and return.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 51/72
INSTRUCTION SET ARCHITECTURE (ISA)
is the part of the computer architecture related
to programming, including the native data types,
instructions, registers, addressing modes,memory architecture, interrupt and exception
handling, and external I/O
An ISA includes a specification of the set of
OPCODES, the native commands implemented
by a particular processor.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 52/72
CISC
stands for Complex Instruction Set Computer
Most PC's use CPU based on this architecture
Typically CISC chips have a large amount of different and complex instructions.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 53/72
CISC
The philosophy behind this is hardware is
always faster than software, therefore one
should make a powerful instruction set, which
provides programmers with assembly
instructions to do a lot with short programs.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 54/72
RISC
stands for Reduced Instruction Set Computer.
The philosophy behind it is that almost no one
uses complex assembly language instructions
as used by CISC, and people mostly use
compilers which never use complex
instructions.
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 55/72
RISC
fewer, simpler and faster instructions would be
better, than the large, complex and slower CISC
instructions. However, more instructions are needed to
accomplish a task.
because of the more simple instructions, RISCchips require fewer transistors, which makes
them easier to design and cheaper to produce
1/9/2012 Miss Sheena I. Sapuay
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 56/72
CISC versus RISC
1/9/2012 Miss Sheena I. Sapuay
CISC RISC
Emphasis on hardware Emphasis on software
Includes multi-clockcomplex instructions
Single-clock,reduced instructiononly
Memory-to-memory:"LOAD" and "STORE"incorporated ininstructions
Register to register:"LOAD" and "STORE"are independentinstructions
Small code sizes,high cycles per
second
Low cycles per second,
large code sizes
Transistors used forstoringcomplex instructions
Spends more transistorson memory registers
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 57/72
Decades of Computing
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 58/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 59/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 60/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 61/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 62/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 63/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 64/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 65/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 66/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 67/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 68/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 69/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 70/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 71/72
8/3/2019 Prelims Coe Elec2
http://slidepdf.com/reader/full/prelims-coe-elec2 72/72