ch-3
ch-3
Organization
Architecture
Instruction set
Hardware system
Architecture
Architecture
History of Computer Architecture
• The first document of the computer architecture was a correspondence
between Charles Babbage and Ada Lovelace that describes the analytical
engine.
• The example of other important machines : John Von Neumann and Alan
turing.
• Computer Architecture is the art of determining the need of the user of a
structure and then designing to meet those needs as effectively as possible
with economic status and as well as technological constraints.
• In ancient period, computer architecture was prepared on the paper and then
directly build into the final hardware form.
• In today’s computer architecture, prototypes were physically built in the form
of a transistor logic (TTL) computer such as prototypes of the 6800 and the
PA-RISC tested and tweaked before committing to the final hardware form.
Von Neumann Architecture
• The modern computers are based on a stored program concept
introduced by John Von Neumann.
• In this architecture program data and instruction data are stored in a same
memory and instructions are fetched from memory one at a time in
order(serially) and executes program following the fetch-decode-execute
cycle.
• It consisted of a control unit, Arithmetic and Logic unit(ALU), Registers and
I/Os.
Central Processing Unit
• The part of the computer that performs bulk of data processing operations is
called CPU. It can also defined as an electric circuit responsible for executing
the instructions of a computer program.
• The major Components of CPU are Arithmetic and logic unit (ALU), Control
unit (CU), and Registers.
• The ALU performs required micro-operations for executing the instructions.
ALU allows arithmetic (add, subtract etc) and logical (AND, OR, NOT etc)
operations to be carried out.
• Control unit of a computer system controls the operations of a component
like ALU, Memory, Input Output devices. The control unit consists of a
Program counter that contains address of the instruction to be fetched and
an instruction register into which instructions are fetched from memory for
execution.
• Registers refers to high speed storage area in the cpu. The data processed by
the CPU are fetched from the register.
Register :-
• Memory Address Register (MAR)- Hold the memory location of data that need to
be accessed.
• Memory Data Register (MDR) – Hold the data that is being transferred to or from
memory.
• Accumulator (AC)- where arithmetic and logic results are stored.
• Program Counter (PC)- contains the address of the next instruction to be executed.
• Instruction Register (IR)- contains the current instruction during processing.
Buses :-
• Buses are the means by which data is transmitted from one part of a computer to
another connecting all major internal components to the CPU and Memory.
• Address Bus – carries the addresses of the data between the processor and
memory.
• Data Bus- Carries data between the processor, memory unit and I/O devices
• Control Bus – Carries control signal from cpu in order to control and coordinate all
the activities within the computer.
Advantage:-
• Control unit retrieves data and instruction in the same manner
from one memory. Design development of control unit is simplified
cheaper, and faster.
• Organization of memory is done by programmers which allows
them to utilize the memory’s whole capacity.
Disadvantage:-
• Parallel implementation of program is not allowed due to
sequential instruction processing.
• Instruction can only carried out one at a time and sequentially.
Harvard Architecture:-
• It contains separate storage and separate buses (signal path) for
instruction and data.
• It was basically developed to overcome the bottleneck of Von
Neumann architecture.
• The main advantage of having separate buses for instructions and
data is that cpu can access instructions and read/write data at the
same time.
Memory Hierarchy
• In the design of computer system, a processor, as well as large amount of memory
devices, has been used. The main problem is, these parts are expensive. So the
memory organization of the system can be done by memory hierarchy.
• Memory hierarchy is an enhancement of to organize the memory such that it can
minimize the access time. The memory hierarchy was developed based on a
program behavior known as locality of reference.
• Memory hierarchy design is divided into two main types-
1. External / secondary Memory- Comprising of magnetic disk, optical disk, magnetic tape i.e.
peripheral storage devices which are accessible by the processor via I/O module.
2. Internal or Primary memory- comprising of main memory & CPU registers. This is directly
accessible via processor.
Based on a speed and use memory in a computer can be divided into five
hierarchies. The processor can move from one level to another level based on its
requirement.
The five hierarchies in the memory are registers, cache, main memory, magnetic
discs, and magnetic tape. The first three hierarchies are volatile memories where
are the last two hierarchies are non volatile.
Increase
Speed
& Processor
Cost per bit
Always on the
Processor
chip
Cache usually
SRAM – faster
but more
expensive
May also be on
Secondary Cache the processor chip
L2
Main usually
DRAM – cheap
Main Memory enough to be large
Secondary
Increase
Storage
Size
Characteristics of Memory Hierarchy:-
1.Performance :- previously designing of computer system was done without
memory hierarchy, and the speed gap among the main memory as well as the
cpu registers enhances because of the huge disparity in access time, which will
cause the lower performance of the system. The enhancement of this was
designed in the memory hierarchy model due to system performance increase.
2.Ability :- the ability of memory hierarchy is the total amount of data the
memory can store.
3.Access Time :- the access time in a memory hierarchy is the interval of time
among the data availability as well as request to read or write. When we move
from top to bottom inside the memory hierarchy , then access time will
increase.
4.Cost per bit :- When we move from top to bottom inside the memory hierarchy,
then cost per bit will decrease.
Memory Hierarchy
• Capacity cost and speed of different types of memory plays a vital role while designing a
memory system for a computer. If the memory has larger capacity more applications
run smoothly. Moreover for practical system cost should be reasonable.
• There is a trade-off between these three characteristics cost, speed and access time.
One cannot achieve all these quantities in same memory module because-
If capacity increases access time increases (slower) due to which cost per bit decreases.
If access time decreases(faster) capacity decreases and due to which cost per bit increases.
• Memory hierarchy is to obtain highest possible access speed while minimizing the total
cost of the memory system.
• The memory unit that directly communicate with cpu is called is called the main
memory.
• Devices that provide backup storage is called auxiliary memory.
• The memory hierarchy system consists of all storage devices employed in a computer
system from the slow by high capacity auxiliary memory to a relatively faster main
memory, to an even smaller and faster cache memory.
• The main memory occupies a central position by being able to communicate directly
with the cpu and with auxilary memory devices through an I/O processor.
Memory Hierarchy Design:-
• The memory hierarchy in the computer includes the following:-
1.Registers :- Register is the Static RAM in the processor of the computer which is
used for holding the data word which is 64 bits or 128 bits. The program counter
register is most important which is found in all processors.
2.Cache Memory :- cache memory can also be found in the processor, however it
may be another IC which is separated into levels. The cache holds the chunk of
data which are frequently used from main memory. Present multicore processor
will be having three, 2 levels for each one core and one level is shared.
3.Main memory :- it directly communicates with cpu and with the auxillary devices
through an I/O processor. Main memory is less expensive than cache memory and
larger in size. The memory is implemented by using DRAM.
4.Secondary Storage :- Secondary storage devices like magnetic disk are present at
level 3. they are used as backup storage. They are cheaper than main memory and
larger in size.
5.Tertiary Storage :- tertiary storage devices like magnetic tapes are present at level
4. they are used to store removable files and are cheapest and largest in size.
Internal or Main Memory
• Central unit of a computer system. It is relatively large and fast
memory to store programs and data during the computer operation.
These memories employ semiconductor integrated circuits. The basic
element of semiconductor memory is memory cell.
• The memory cell has three functional terminals which carries electrical
signal.
The select terminal – it selects the cell.
The data terminal – it is used to input data as 0 or 1 and data out or sense
terminal is used for the output of the cell’s state.
Control terminal – it controls the function. i.e. it indicates read and write.
Random Access Memory(RAM)
• Memory cells can be accessed for information transfer from any desired random location.
• The process of locating a word in a memory is the same and requires an equal amount of
time no matter where the cells are located physically in memory thus named “Random
Access”.
• RAM are available in two possible operating modes, static and Dynamic.
Main Memory
Level-2 Cache Level-3 Cache
CPU Level-1 Cache
Fastest
Fast Less Fast Slow
Hard disk
• It is a storage device that used magnetically platters to store data,
instructions and information.
• It is a storage device that is used to write rewrite and access the data. It
uses a magnetization process.
• Organization :-
1.The entire disk is divided into platters.
2.Each platters consists of a concentric circles called as tracks.
3.These tracks are further divided into sectors which are the smallest
divisions in the disk.
• A cylinder is formed by combining the tracks at a given radius of a
disk pack.
• There exist a mechanical arm called read/write head.
• It is used to read from and write to the disk.
• Head has to reach at a particular track and then wait for the
rotation of the platter.
• The rotation causes the required sector of the track to come
under the head.
• Each platter has 2 surfaces –top and bottom and both the
surfaces are used to store the data.
• Each surface has its own read/write head.
Disk performance parameters :-
• The time taken by the disk to complete an I/O request is called as
disk access time.
• Disk Access time = Seek time + Rotation latency + transfer time.
1.Seek time :- the time taken by the read/write head to reach the
desired track is called seek time. The lower the seek time, faster the
I/O operation.
2.Rotation latency :- the time taken by the desired sector to come
under the read/write head is called as rotation latency.
data to be transfer
3.Transfer time = ;
𝑡𝑟𝑎𝑛𝑠𝑓𝑒𝑟 𝑟𝑎𝑡𝑒
4.Transfer rate = No. of heads(surface) * capacity of one track * No of
rotation in
one second
5.Disk size = Total number of surface * Number of tracks per surface *
number of sectors per track * storage capacity of one sector.
Instruction Cycle
• Time required to execute and fetch an entire instruction is
called instruction cycle. A program residing in the memory
unit of the computer consists of a sequence of instrucions.
• The program is executed in the computer by going through
the cycle for each instruction. Each instructions cycle in turn
subdivided into sequence of a sub cycle. Each instrucions
cycle consists of following phases :-
1. Fetches instructions from memory.
2. Decode the instruction.
3. Read the effective address from memory.
4. Execute the instruction.
Instruction Codes
• An instruction code is a group of bits that instruct computer to
perform a specific operation.
• A computer usually has a variety of instruction code format. It is
the function of the control unit within the cpu to interpret each
instruction code and provide the necessary control functions
needed to process the instruction.
• The bits of the instruction are divided into groups called fields.
The most common fields in the instruction formats are –
o An operation code field that specifies the operation to be performed.
o An Address field that designates memory address or a processor register.
o A Mode field that specifies the way the operand or effective address is
determined.
• The Instructions are stored in a computer memory in the same
manner that data is stored.
• The control unit interprets these instructions and uses these
operations code to determine the sequence of micro operations that
must be performed to execute the instruction.
• The operands are specified by indicating the registers and/or memory
locations in which they are stored.
• The simplest design is to have one processor register and two fields in
the instruction, one for the opcode and one for the operand.
• Any operation that does not need memory operand frees the other
bits to be used for the purposes, such as specifying different
operations.
• A basic computer has three instruction code format –
1. Memory – reference instruction
2. Register – reference instruction
3. Input-output instruction
• Memory Reference Instruction – In memory reference instruction, 12 bit
of memory is used to specify a address and 1 bit to specify the addressing
mode ‘I’. If I=0, it represents direct and if I=1 then it represents indirect
addressing mode.
Addressing Modes:-
• There are four different types of operands that can appear in an
instruction :
• Direct operand- an operand stores in a register or in the memory
location specified.
• Indirect operand- an operand whose address is stored in the
register or in the memory location specified.
Transmitter
Keyboard INPR AC
Interface
FGI =1