The frequency of different types of instruction executed by

The frequency of different types of instruction executed by a machine is tabulated as:

Addressing Mode Frequency

Register 30

Immediate 20

Direct 22

Memory Indirect 17

Index 11

Assuming 2 clock cycle are consumed for an operand to be read from the memory, 1 clock cycle for

index arithmetic computation and 0 clock cycle if operand is available in register or within instruction

itself. How much would be the average operand fetch rate of the machine?

Solution

Given :  

Register 30

Immediate 20

Direct 22

Memory Indirect 17

Index 11

solution:

Register-1 reg reference required -1Cycle

Immediate-1Cycle

Direct-1 mem ref-2 Cycle

Memory Indirect-2 mem ref-4 Cycle

Indexed-1 reg ref,1 arith,1 mem-6 Cycle

Total clock cycle for 1 instruction:-0.3*1+0.2*1+0.22*2+0.17*4+0.11*6=2.28cycle ==>2.3 cycle

Time req for 1 instruction= 2.3*10^9 (Since CPU is 1 GHZ) ==>2.3 nano sec

1 instruction----2.9 nano sec

#instruction? in 1 sec= 1/2.3*1000=434.78MIPS

The frequency of different types of instruction executed by a machine is tabulated as: Addressing Mode Frequency Register 30 Immediate 20 Direct 22 Memory Indir

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site