3. Basic Operational Concepts:
•A typical instruction may be like
Add LOCA, R0
This instruction adds the operand at the memory
location LOCA to the operand in a register R0 and
places the result in the register.
Similarly:
Load LOCA, R1
Add R1,R0
4. • Figure below shows the connection between the
memory and the processor
Figure 1.2. Connections between the processor and the memory.
Processor
Memory
PC
IR
MDR
Control
ALU
Rn 1-
R1
R0
MAR
n general purpose
registers
5. • The processor contains a number of registers used for
different purposes.
• The Instruction Register (IR) holds the instruction that is
currently being executed.
• The Program Counter(PC) is a specialized register which
keeps track of the address of the next instruction to be
fetched and executed.
• The Memory Address Register(MAR) holds the address of the
location to be accessed.
• The Memory Data Register(MDR) contains the data to be
written into or read out of the addressed location.
• The n general purpose registers which stores the contents
6. Interrupt:
• Normal execution of the program may be preempted if some
device requires urgent servicing
• In order to deal with the request, the normal execution is
interrupted and the device raises the interrupt signal.
• ISR (Interrupt Service Routine)
• ISR saves the internal state of the processor, PC, the general
registers and some control information.
• When ISR is completed the state of the processor is restored and
interrupted program may continue its execution.
7. Bus Structures
• A group of lines that serve as a connecting path
for several devices is called a bus.
• The system bus has three parts:
• Data bus
• Address bus
• Control bus
• There are two types of bus:
• Single bus structure
• Multi bus structure
8. Single Bus Structure
• All units are connected to a
single bus.
• Only two devices can connect
at a time.
• Single bus structure is vastly
used because of its low cost
and flexibility.
• The device connected to the
bus widely vary with their
speed of operation.
• Consider the transfer of an
encoded character from the
processor to the printer.
Figure 1.3. Single-bus structure.
MemoryInput Output Processor
9. • Drawback of Single Bus Structure:
• The performance of the computer system suffers when large
number of device is connected to the bus.
• Propagation Delay
• Bus- Bottleneck
Multiple Bus Structure:
• Achieve more concurrency
• Leads to better performance
• Increased cost
10. PERFORMANCE
• Performance is the time taken by the system to
execute a program.
• The parameters that effect the performance are
processor clock speed, type of instruction, memory
access time, type of I/O devices connected, and
data transfer capacity.
• Elapsed time: The total time required to execute the
program.
• Processor Time: The period in which the processor is
active.
12. Processor Clock
• Processor circuits are controlled by a timing signal
called Clock.
• The clock defines a regular time interval called clock
cycles.
• The length P of one clock cycle is an important
parameter that effects the processor performance.
Clock rate R=1/P
• Where P- Length of one clock cycle.
Clock Cycle P=I*CPI
• Where I is number of instructions
• CPI –Average clock cycle per instruction
13. Basic Performance Equation
• Let T be the processor time required to execute a
program.
• Assume that complete execution of the program
requires the execution of N machine language
Instructions.
• Suppose that average number of basic step needed
to execute one machine instruction is S.
• If the clock rate is R cycles per sec then the program
execution time is given by
T= N* S/ R
(Basic performance Equation)
14. Clock Rate
• There are two possibilities of increasing the clock rate R,
• First, Improving the IC technology makes the logical
circuit faster, which reduces the time of execution of
basic steps, This allows the clock period P, to be
reduced and the clock rate to be increased.
• Second, Reducing the amount of processing done in
one basic step.
15. Performance Measurement
• Let us consider two programs P1 and P2 with first
one having all operands in memory and second
having all operands in CPU. Consider two computers
C1 and C2. The clock speed of C1 is greater than
that of C2. However memory access time in C1 is
faster than C2. With these conditions which
program gets executed faster??? Which computer is
faster??
16. • Measure of instruction execution performance are based on
average figures which are usually determined by measuring the
runtimes of representative called benchmark program.
• SPEC (System Performance Evaluation Corporation).
• SPEC rating = Running time on the reference computer
Running time on the computer under test
Let SPEC I be the rating for the program I in the suite
SPEC rating =
Where n is the number of programs in the suite.