Chapter 1
Chapter 1
Arithmetic
Input and
logic
Memory
Output Control
I/O Processor
The System Bus
Memory organization
Connection of the memory to the processor
What is an accumulator?
The Accumulator (Register A) is the main MAR Memory Address Register
register concerned with arithmetic and MDR Memory Data Register
logical operations because the result of PC Program counter
nearly all such actions is loaded into the IR Instruction Register
accumulator
Structure
• Structure is the way in which
components relate to each other
• There are four main structural
components:
—Central processing unit (CPU)
—Main memory
—I/O
—System interconnection
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 Logic
Control
Internal
Unit
Bus
Control Unit
Registers Registers and
Decoders
Control
Memory
Function
• Function is the operation of individual
components as part of the structure
• All computer functions are:
—Data processing
—Data storage
—Data movement
—Control
Simplified View of Major Elements of a Multicore
Computer
Performance Issues
Amdahl’s Law
p is the number of processor cycles needed to decode and execute the instruction
m number of memory references
k the ratio between memory cycle time and processor cycle time
Performance Factors and System Attributes
Example 1
Calculate the average CPI and the corresponding MIPS rate when the
above program is executed on a uniprocessor with the above trace
results.
Example 2
Example 3
Example 4
Example 5
Four benchmark programs are executed on three computers with the following results:
The table shows the execution time in seconds, with 100,000,000 instructions executed
in each of the four programs. Calculate the MIPS values for each computer for each
program. Then calculate the arithmetic and harmonic means assuming equal weights
for the four programs, and rank the computers based on arithmetic mean and harmonic
mean.
Calculating the Means
Top Level View of
Computer Function and
Interconnection
Computer Components
Computer Function:
Instruction Fetch and Execute
Basic Instruction Cycle
Characteristics of a Hypothetical Machine
Characteristics of a Hypothetical Machine
Instruction Cycle State Diagram
Interrupts
Functions of Interrupts
• An interrupt allows some module (I/O, memory) to stop the
normal processing of the processor
• Interrupts are a way to improve processing efficiency
• Interrupts are also used to stop a process when some type
of error has occurred
Classes of Interrupts
Transfer of Control via Interrupts
Instruction Cycle with Interrupts
Multiple Interrupts
Priority Interrupts