Professional Documents
Culture Documents
Architecture
Sumathi A
Associate Professor, ECE
BNM Institute of Technology
COA, SA,ECE,BNMIT 1
Computer
1. Computer is a fast electronic calculating
machine that accepts digitized input,
processes it as per the instructions and
produces the output.
2. List of instructions: Program
3. Internal storage: Memory
COA, SA,ECE,BNMIT 2
COA
■ Computer Architecture
– It is concerned with the way hardware components
are connected together to form a computer system.
■ Computer Organization
– It is concerned with the structure and behaviour of
a computer system as seen by the user. ...
■ A programmer can view architecture in terms of
instructions, addressing modes and registers.
COA, SA,ECE,BNMIT 3
Basic/Key Elements
COA, SA,ECE,BNMIT 4
Computer Types
Based on size, cost, computational power
and intended use (specs).
1. Personal Computers
4. Embedded Computers
COA, SA,ECE,BNMIT 5
Personal computers
COA, SA,ECE,BNMIT 11
Grid Computers
By evenly distributing the computational workload
across the grid, it is possible to achieve high
performance on large applications ranging from
numerical computation to information searching.
COA, SA,ECE,BNMIT 12
Embedded Computers
Embedded computers are integrated into a
larger device or system in order to
automatically monitor and control a physical
process or environment.
They are used for a specific purpose rather
than for general processing tasks.
Typical applications include industrial and
home automation, appliances, mobiles,
digital camera and vehicles.
COA, SA,ECE,BNMIT 13
COA, SA,ECE,BNMIT 14
Emerging trends
■ Emerging trends
■ Cloud computing
■ Edge computing
■ Automation
■ IoT
■ Blockchain
■ Virtual Reality
■ VLSI
16
COA, SA,ECE,BNMIT 15
Functional Units
COA, SA,ECE,BNMIT 16
Functional Units
Arithmeti
Input c and
logic
Memory
Output Control
I/O Processo
r
COA, SA,ECE,BNMIT 18
Information handling
1. Instruction
2. Commands to perform particular task-
Program
3. Controlled by stored programs, except
few interrupts
4. Programs are stored in memory
COA, SA,ECE,BNMIT 19
Information handled by a
computer..
Data
Digital information-number-encoded characters
Data are also stored in the memory.
COA, SA,ECE,BNMIT 20
Information handled by a
computer..
• Data
• It is represented in either ON or OFF state (1 or 0)
– bits
• 4 bits=1 nibble
• 8 bits=2 nibbles = 1 byte
• 16 bits=2 bytes=1 word
• Coding schemes:
• ASCII( American Standard Code for Information
Interchange) – 7 bits
• EBCDIC (Extended Binary Coded Decimal
Interchange) – 8 bits
COA, SA,ECE,BNMIT 21
Input Unit
• Secondary/Auxiliary
COA, SA,ECE,BNMIT 23
Primary Storage
• Fast memory
• Semiconductor storage cells
• Word- word length
• Store and retrieve – address
COA, SA,ECE,BNMIT 24
Primary Storage
1. Random Access Memory (RAM)
2. Memory access time -> fixed -> independent of
location
1. It typically ranges from a few
nanoseconds (ns) to about 100 ns for
modern RAM units.
3. Memory Hierarchy
Caches - small, fast, tightly coupled with processor
Main memory - large, slow
30
COA, SA,ECE,BNMIT 25
Memory Unit..
Although primary memory is essential, it
tends to be expensive and does not retain
information when power is turned off.
COA, SA,ECE,BNMIT 26
Memory Unit..
Secondary storage is used when large amounts of data
and many programs have to be stored.
Particularly for information that is accessed infrequently.
Access times for secondary storage are longer than
for primary memory.
Examples - magnetic disks, optical disks
(DVD and CD), and flash memory devices.
COA, SA,ECE,BNMIT 27
Arithmetic and Logic Unit (ALU)
1. Arithmetic and logic operations – addition,
subtraction…….comparison
2. Operands are brought to the processor.
3. Example – add two numbers
4. Stored in high speed storage elements called
Registers
5. Each register can store one word of data
6. Access time are shorter than cache unit
COA, SA,ECE,BNMIT 28
Output Unit
• Processed results to outside world
• Both input and output: touchscreen, digital
camera, pen drive.
COA, SA,ECE,BNMIT 29
Control Unit
1. CU coordinates the operation of all other units like
input, output, ALU and memory.
2. I/O transfers
3. Data transfers between memory & processor
4. Timing signals determine when action to be
performed
5. Control lines carry signals for timing and
synchronization of events in all units.
COA, SA,ECE,BNMIT 30
Control Unit..
Much of the control circuitry is physically
distributed throughout the computer.
A large set of control lines (wires) carries the
signals used for timing and synchronization of
events in all units.
COA, SA,ECE,BNMIT 31
Functional Units
Arithmeti
Input c and
logic
Memory
Output Control
I/O Processo
r
COA, SA,ECE,BNMIT 33
Basic Operational Concepts
1. Activity in a computer is controlled by
instructions.
2. Task program memory individual
instruction are brought from memory to
processor execute
Add LOCA,R0
Processor
Memory
COA, SA,ECE,BNMIT 34
Two instruction sequence
Add LOCA,R0
Load LOCA,R1
Add R1,R0
Processor
Memory
COA, SA,ECE,BNMIT 35
Connection between
processor and memory
■ N general purpose registers
■ IR instruction register hold the
instruction currently being
executed
■ PC program counter-keeps
track of execution of programs
■ It points to memory location of
next instruction to be fetched
■ Memory address register
(MAR)
■ Memory Data Register (MDR)
■ Facilitate communication with
memory
COA, SA,ECE,BNMIT 36
Registers
Instruction register (IR)
Hold the instruction that is currently being executed
Program counter (PC)
Keeps track of the execution of a program
It contains the address of the next instruction to be fetched and
executed
General-purpose register (R0 – Rn-1)
Memory address register (MAR)
Holds the address of the memory location to be accessed
Memory data register (MDR)
Contains the data to be written into or read out of the addressed
location
COA, SA,ECE,BNMIT 37
Typical Operating Steps
• Programs reside in memory
• PC points to instruction1
• Contents of PC are transferred to
MAR
• And read signal is sent to
memory
• Address word is read out of
memory and loaded into MDR
• Contents from MDR are
transferred to IR
• Now instruction is ready to be
decoded and executed
• Now, PC increments by one and
point to instruction2
COA, SA,ECE,BNMIT 38
Operating Steps if ALU is
involved
If operation is performed by ALU, then
operands should be obtained
In addition to data
transfer between
memory and
processor, I/O
devices also transfer
data. I/O instructions
COA, SA,ECE,BNMIT 39
Interrupt
COA, SA,ECE,BNMIT 40
Interrupt
COA, SA,ECE,BNMIT 41
Interrupt
COA, SA,ECE,BNMIT 42
Bus Structures..
1. Computer has many units
and there are multiple ways
to connect them together.
2. When a word is transferred,
all the bits are transferred in
parallel over many wires,
one bit per line.
3. This group of lines is
referred as bus
COA, SA,ECE,BNMIT 43
Single Bus Structure
1. Unidirectional and bidirectional bus
1. Low cost
2. Flexible for attaching peripheral
devices
2. Multiple buses-better performance
with increased cost
COA, SA,ECE,BNMIT 44
Types of Bus
COA, SA,ECE,BNMIT 45
Speed Issue
Different devices have different transfer/operating speed.
Some electromechanical devices, such as keyboards and
printers, are relatively slow
Magnetic or optical disks are considerably faster
Memory and processor units operate at electronic speeds -
fastest
If the speed of bus is bounded by the slowest device
connected to it, the efficiency will be very low.
How to solve this?
1. Use buffer registers: Example Printer
2. These hold information during transfers
3. This smooth out timing difference among processor, memories and
I/O devices
COA, SA,ECE,BNMIT 46
Software
1. System software
1. Used for operating computer hardware
2. Installed when operating system is installed
2. Application software
1. User to perform specific task.
2. Installed according to user’s requirements
COA, SA,ECE,BNMIT 47
System Software
It is a collection of programs that are
executed to perform the functions:
1. Receiving and interpreting the user commands
2. Entering and editing application programs and
storing them as files in secondary storage devices
3. Secondary storage management: store and
retrieve
4. Running standard application programs: word
processors, spreadsheets with data supplied by
the user
COA, SA,ECE,BNMIT 48
System Software
It is a collection of programs that are
executed to perform the functions:
1. Controlling I/O units
2. Translating programs from source form into object
form
3. Linking and running user-written application
programs with existing standard library routines
COA, SA,ECE,BNMIT 49
System Software
1. Compiler
High level language to machine language
ADD LOCA, R0
2. Text editor
Entering and editing application program
3. File
A sequence of alphanumeric characters or binary data
that is stored in memory or in secondary storage.
COA, SA,ECE,BNMIT 50
Operating System
1. Large program-collection of routines
2. It controls sharing of various computer units and
their interaction
3. OS routines perform tasks like
1. Assign computer resources to individual
programs
2. Assign memory and magnetic disk space to
programs
3. Moving data between memory and disk units
4. Handling I/O operations
COA, SA,ECE,BNMIT 51
Basics of Operating System
1. Example: one processor, one disk and one printer
2. Application program compiled transfer object
file to memory then execution of program starts
part requires reading data file…..
3. Multiprogramming or multitasking
COA, SA,ECE,BNMIT 52
Performance
COA, SA,ECE,BNMIT 53
Performance
The most important measure of the
performance a computer is how quickly it can
execute programs.
Three factors affect performance:
Hardware design
Instruction set
Compiler
So design all the above in a coordinated way
70
COA, SA,ECE,BNMIT 54
Performance..
■ t5-t0 total time required to execute the program
■ This is elapse time, a measure of the performance
of the entire computer system
■ This is affected by speed of the processor, disk and
printer.
COA, SA,ECE,BNMIT 55
Performance..
To discuss the performance of the processor,
we should consider only the periods during
which the processor is active.
These are the periods labelled Program and OS
routines
Sum of these periods is referred as the processor
time needed to execute the program.
COA, SA,ECE,BNMIT 56
Performance..
Processor time to execute a program depends on the hardware
involved in the execution of individual machine instructions.
Main Cache
memor memor Processor
y y
Bu
s
The processor
cache.
COA, SA,ECE,BNMIT 57
Performance..
The processor and a relatively small cache
memory can be fabricated on a single
integrated circuit chip.
A program will be executed faster if the
movement of instructions and data between the
main memory and the processor is minimized,
which is achieved by using the cache.
COA, SA,ECE,BNMIT 58
COA, SA,ECE,BNMIT 59
Performance..
At the start of execution, all program instructions and the
required data are stored in the main memory.
As execution proceeds, instructions are fetched one by
one over the bus into the processor, and a copy is
placed in the cache.
When the execution of an instruction calls for data
located in the main memory, the data are fetched and a
copy is placed in the cache.
Later, if the same instruction or data item is needed a
second time, it is read directly from the cache.
COA, SA,ECE,BNMIT 60
Processor Clock
Processor circuits are controlled by a timing
signal called a clock.
The clock defines regular time intervals,
called clock cycles.
The execution of each instruction is divided
into several steps, each of which completes in
one clock cycle.
Length of one clock cycle is denoted as P.
COA, SA,ECE,BNMIT 61
Processor Clock..
COA, SA,ECE,BNMIT 62
Basic Performance Equation
T – processor time required to execute a program that has been
written in high-level language
Compiler converts source code to object code/machine language
instructions
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 –R cycles per second
Program execution time is given by
NS
T
R
How to improve T?
COA, SA,ECE,BNMIT 63
Basic Performance Equation
COA, SA,ECE,BNMIT 65
Few terminologies
■ Superscalar – parallel processing
COA, SA,ECE,BNMIT 66
Few terminologies
■ RISC and CISC architecture Kiran
Sumanth
■ Reduced Instruction Set Computing-Apple gagan
■ Complex Instruction Set Computing-Intel
COA, SA,ECE,BNMIT 67