Module 1 (BKM)
Module 1 (BKM)
Organization
Dr. Bimal Kumar Meher
Associate Professor
Dept. of CSE
Topics to be covered
• Computer Architecture vs Organization
• Functional units of a computer
• Basic operational concepts
• Bus structure
• Performance
Challenges before a Computer Designer
• A Computer Designer has some key challenges:
• Selection of Important attributes
• Performance optimization
• Energy efficiency
• Cost-effective
• To meet these challenges a designer should have the skills of
• Instruction set design
• Functional organization
• Hardware design
Computer architecture
• Computer architecture covers all three aspects of computer Design
• Instruction Set Architecture (ISA)
• Computer Organization or microarchitecture
• Hardware design
• ISA-It is programmer visible machine interface such as
• instruction set
• registers
• memory organization
• exception handling etc.
• Two main approaches are
• CISC (Complex Instruction Set Computer)
• RISC (Reduced Instruction Set Computer)
Computer Organization
• Computer Organization (or microarchitecture) includes high-level
aspects of a computer’s design, such as
• the memory system,
• the memory interconnect
• design of the internal processor or CPU
• Note: It is possible that, two processors have same instruction set
architectures but have different organizations
• Example:
• AMD Opteron and the Intel Core i7 processors implement the x86
instruction set, but they have very different organizations (pipeline
and cache organizations)
Hardware
• Hardware refers to the internal details of a computer
• the detailed logic (IC) design
• the packaging technology
• Power and cooling mechanism etc.
• Note: Computers with identical instruction set architectures and
nearly identical organizations, can differ in the detailed hardware
implementation.
• Example:
• the Intel Core i7 and the Intel Xeon 7560 belong to two different class
of computers because of different clock rates and different memory
systems.
Functional Units of a Computer
• Input
Arithmetic
• Output Input and
• Memory logic
Memory
• Arithmetic and Logic
Control
Unit (ALU)
Output
• Control
Registers
I/O
Processor
Operations of a Computer (summary)
• The computer accepts
information (programs and data)
through the input unit and
stores it in memory. Arithmetic
Input and
• The information is then fetched logic
from memory into the ALU for
Memory
desired operation (processing).
Control
• Processed information leaves Output
the computer through output
Registers
unit. I/O
Processor
• All of these activities are
coordinated by the control unit.
Control Unit
• It is the nerve center which sends the
control signal to other units and senses
their states.
• It decodes an instruction and generate
necessary signals to complete execution. Arithmetic
Input and
• Selects registers to be used as source and logic
destination in an operation.
Memory
• Timing signals for I/O operations are
generated by the control circuits Control
Output
• Data transfer between the processor and
memory are also controlled by the Registers
control unit through the timing signal. I/O
Processor
• Note: Timing signals are signals that
determine when a given action is to take
place.
Arithmetic and Logic Unit (ALU)
• The instructions are executed in the ALU
of the processor.
• Example:
• Let there be an instruction to add two Arithmetic
Input and
numbers. logic
• Step 1: First load the operands into Memory
memory
Control
• Step 2: Then bring them into the Output
processor and store them in registers
• Step 3: Then perform addition in ALU I/O
Registers
and store the result back in the register. Processor
PC R0
R1
Processor
IR
ALU
Rn - 1
n general purpose
Single Bus
Single Bus vs Multiple Bus
• Single Bus: This is the simplest way to connect the functional units.
• Only two units can actively use the bus at any given time.
• Bus control lines are used to arbitrate multiple requests to use of the
bus.
• The benefit of single bus is its low cost and flexibility for attaching
peripheral devices.
• Multiple Bus: More than one buses can exist between the devices.
• Benefit of this is, more than one transfer is possible at a time
(concurrency).
• Although this leads to better performance, but incurs more cost.
Speed issues in Bus
• We know that, 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 is to use Buffer Registers with the devices.
• A Buffer register holds the information during transfer.
Single Bus
Speed issues in Bus (contd…)
• Example: Let a processor sends characters to the printer.
• Since the speed of processor is much higher than the printer, hence
there will be synchronization problem.
• To address this issue, a buffer is maintained with the printer.
• Once the buffer is loaded, the printer can start printing without the
intervention of the processor.
• So the processor and bus can provide service to other devices.
Output
Input Buffer Memory Processor
Single Bus
Performance of a Computer
• The most important measure of a computer is how quickly it can
execute programs.
• Three factors affecting performance:
• Hardware design
• Instruction set
• Compiler
• Hardware design mainly refers to the design of processor, memory
and bus.
• Instruction set refers to the machine level instructions for a certain
processor in order to achieve faster execution.
• Since a compiler translates a program in HLL to machine level
code/object code so design of an efficient compiler also increases
performance.
Performance of a Computer (contd…)
• The processor and a relatively small cache memory can be fabricated
on a single integrated circuit chip.
• So, the cache keeps the frequently used instructions and data by
fetching them from main memory.
• Since the access time of cache memory is less than the access time of
main memory, hence it minimizes the execution time.
Main Cache
memory memory Processor
Bus
Processor Clock
• Processor circuits are controlled by the timing signal called the clock.
• Clock cycle: The regular time intervals.
• Note 1: To execute a machine instruction, the processor divides the
instruction into a sequence of basic steps.
• Note 2: Each step should be completed in one clock cycle.
• Note 3: Therefore, the length of one clock cycle (P) is an important
parameter that affects processor performance.
• Clock rate (R): It is defined as the no. of cycles per sec(Hz).
• Therefore, R = 1 / P
• Modern processors measures the R in millions (mega) or billions (Giga)
cycles per sec
• Example 1: 500 million cycle per sec = 500 MHz
• Example 2: 2500 million cycles per sec = 2.5 GHz.
Basic Performance Equation
• How to achieve high performance?
• Let T = processor time required to execute a program written in HLL
• Let N = no. of actual machine level instructions required for execution
• Let S = average no. of basic steps needed to execute one machine
instruction. Each step completes in one clock cycle.
• Then T is calculated by using the basic performance equation:
• T = (N x S) / R, where R is the clock rate (cycles per sec.)
• Note: To achieve high performance, the computer designer should
reduce the value of T which implies
• reducing the value of N and S, and
• increasing the value of R.
How to increase the clock rate (R)?
• There are two possibilities to increase the clock rate (R) as follows:
1. Improve the integrated-circuit (IC) technology to make the circuits
faster
• This reduces the time needed to complete a basic step.
• This allows the clock period P to be reduced and the clock rate R to be
increased.
2. Reduce the amount of processing done in one basic step
• however, this may increase the number of basic steps needed
Problem
• Let there be a processor P1 of clock rate 700MHz, N=5, and S=2 and
another processor P2 of clock rate 900MHz, N=5, and S=3, then which
processor is faster?