Unit 7 - Computer Organization and Architecture
Unit 7 - Computer Organization and Architecture
1. It is volatile which means that data is lost 1. It is non-volatile which means that permanent data will
when the power is switched off remain even when the power is switched off
2. It is used to store data, files, or part of the 2. It is often used to store the start-up instructions when the
operating system that are currently in use computer is first switched on
4. It usually has a storage capacity of a few 4. It usually has a storage capacity of only a few thousand
gigabytes bytes.
Reasons that why controller is used for communication between I/O hardware and processor are in red
font
Harvard and Neumann
Architecture
Reason Why Harvard Architecture is used by the processor preferably in
embedded / control systems:
• Instruction and data can be accessed simultaneously as instructions and data
are stored in the separate memory whereas von Neumann uses combined
memory for both instructions and data.
• Avoid/reduce bottleneck of single data/address bus(es) // avoid/reduce
delays waiting for memory fetches;
• Being able to use exclusively ROM for instruction memory prevents the
program being modified/hacked;
• Instruction and data memory can have different word lengths;
• Different technologies can be used to implement instruction and data
memory;
•Different quantities of instruction and data memory means that address lengths
can differ between the two // memory address structures can differ;
•Harvard Architecture is widely used in embedded system ( mobile phones,
burglar alarms rather than general purpose PCs. These embedded devices use
Digital Signal Processing ( DSP). DSP take real world data such as audio or video
and then compress it for fast processing. Chip that is optimized for DSP uses low
power consumption which is ideal for embedded systems
Control Unit
The control unit coordinates and controls all of the activities taking place
within the CPU
• Breaks down processing into sequential steps fetching address,
data/instruction , decoding and manages execution
• It receives signals from the system clock
• It directs the timing and control of other parts of the CPU, much like the
conductor of an orchestra
The system clock — also simply referred to as the clock —
generates regular clock pulses by emitting a signal that
continuously oscillates between a low (or '0') and a high (or
'1') state. The clock signal is used to synchronise the
operations of the processor components.
System Clock
A 'rising edge' is a change from a low (or '0') state to a high
(or '1') state. The opposite is called a 'falling edge'. The time
taken between two sequential rising edges is called
the clock period and it corresponds to one clock cycle.
FETCH Instructions to be executed are fetched by the processor using buses from the RAM
and stored in registers in the processor
DECODE Instruction in CIR is decoded by the control unit to understand the instruction and
signals are sent to execute the instruction
General-purpose registers
•Having to access the main memory can slow
down the execution of instructions.
Therefore, the processor uses registers to
temporarily store and access the results of
operations. The ALU is connected to a set of
general-purpose registers that are used to
keep the results of the intermediate
calculations that are produced as part of a
larger computation
Dedicated registers
Unit 7
Fetch:
•Contents of Program Counter / PC transferred to Memory Address Register /MAR
•Address bus used to transfer this address to main memory
•Transfer of content uses the data bus
•Contents of addressed memory location loaded into the Memory Buffer Register /MBR
•Increment (contents of) Program Counter / PC A. at any part of fetch process after transferring
PC to MAR
•Increment Program Counter / PC and fetch simultaneously
•Contents of MBR copied to CIR
Decode:
•Decode instruction held by the (Current) Instruction Register / (C)IR
FDE Cycle •The control unit decodes the instruction
•Instruction split into opcode and operand
Execute:
•If necessary, data is fetched
•If necessary, data is stored in memory
•The opcode identifies the type of operation/instruction to be performed (by the
•processor)
•Result (maybe) stored in register/accumulator
•The operation (identified by the opcode) is performed by the processor. A. ALU
Status register updated
•If jump / branch required Program Counter/PC is updated
(increase the) data bus width: Enables more bits (A. data) to be transferred between main memory and
the processor at one time (so fewer read/write operations needed);
(increase the) clock speed enables more instructions to be executed per unit of time/second. Clock
generates a signal that is used to synchronize the operation of the process and movement of the data
around the other components of the computer
How (increase the) amount of cache memory; cache memory is faster than main memory so the more that can
be stored in cache memory the less frequently the main memory needs to be accessed;
processor (increase the) word length; larger word size means that the processor can process more bits in one go;
Increase the width of address Bus: More Addressable locations are possible
performance (change the) type/ capacity of cache memory; some types of cache memory can be accessed faster; More
instructions/data can be stored in the cache; This increases the probability that a particular data
can be item/instruction is in the cache when fetched // this increases the probability of a cache hit // fewer
fetches from main memory will be required;
improved (increase the) number of general-purpose registers: more intermediate results/variables can be kept in
processor registers rather than in main memory;
Increase number of cores
the more cores a computer has, the more instructions it can execute at the same time. As a result, the
computer will perform more efficiently than computers with the same type of processor but fewer cores.
Note that having a quad-core instead of a dual-core processor (both running at the same speed) does not
mean that the amount instructions that can be processed in the same time frame will double. However,
the quad core will still achieve a significant improvement because data and instructions need to be fed to
the cores appropriately and so the computer system will need to spend time organising which cores
receive which data and instructions. Also, the efficiency of a multicore processor depends on the nature of
the required task, i.e. if it is possible to divide a computation into subtasks that can be processed in parallel
(one task per core at the same time). This is known as parallel processing, and it is only possible on
multicore systems
Why • To execute the instruction, processor may
have to fetch more instructions/ data from
instructions the memory, this will overwrite the
stored in CIR instruction in MBR
• This is the reason first instruction are stored
are processed to CIR and then decode and execution starts
and if instruction/ data execution is to fetch
but not in data/ instruction that will be fetched and will
be stored to MBR
MBR
Handling
of Interrupt by The processor can be interrupted for a number of reasons,
including:
the processor •A hardware device has signaled that it has data to
process
•A hardware device has completed a task that it was
Interrupt is the signal to the
processor to stop doing its asked to do
•A software process needs a service to be provided or OS
current job and service the
interrupt, Interrupt can be function to be performed
initiated by Software and •An allotted amount of time has expired, and an action
Hardware . The purpose of the needs to be performed
interrupts are to help the •A hardware failure has occurred and needs to be
processor to prioritize and addressed
execute multiple tasks
simultaneously.
Why content of registers are stored
before the interrupt is serviced:
Processor can return to the current
processing of the program after interrupt
is serviced.
Process of servicing an interrupt
Machine Instruction opcode and operand
operation – • Black/white bands reflect different amounts of light // black reflects less
light // white reflects more light;