• edited by
769 views
0 0 votes
A pipelined processor with a separate instruction & data cache has 5- stages, the cycle time 30 nano sec. It can start a new instruction on every cycle when there were no hazards. It is used with copy- back data cache with a block size of one - word. T cache = 30 ns, Tm = 80 ns. The hit ratio of cache 90%. ignore write back time of dirty pages. If 25% of all instructions are load and store which only result hazards. What is the throughout of CPU.

a) 31 MIPS
b) 24 MIPS
c) 48 MIPS
d) 10 MIPS

1 Answer

0 0 votes

Option A) is correct

It is given that the pipelined processor has separate instructions and data cache. So for instructions it will use instructions cache and for data it will use data cache.
We know that Throughput =number of instructions/total execution time.

Given,
It can start new execution on every cycle when there is no hazard,i.e CPI=1
Cycle time=30ns (for instructions)

Now for data cache
Tcache=30ns
Tm=80ns
Hit%=90%
avg access time =hit(Tcache) +(1-hit) {Tcache+Tm}

                              =0.9(30) +0.1(30+80) ns

                             =27+11=38ns

 
And given that total 25% of all instructions are load and store (uses data cache) other 75% uses instruction cache.

 
So avg time =25% of Access time in data cache + 75% of access time in instructions cache


=(0.25*38+0.75*30)ns

=32ns

 
There are 3 types of Hazard =Data hazard, Control hazard and Structural hazard.

Data hazards occurred in execution time, so in this case no data hazard


Control hazard occurred mainly in brunch instructions but there is no case of brunch instructions.

Structural hazard occurred due to resource conflict. It is mentioned also in the question,that hazard occurred only in store and load.

******But we know that structural hazard can be resolve using Register Renaming. According to register renaming we divide the memory in two part i) Code or Instructions memory ii) Data memory

That's what actually done in our case to resolve the hazard. In the question it is mentioned that it uses separate memory for instructions and data, so technically no hazard occurs.

But due to separate memory avg time cycle changes in our case it is 32 ns.

There is no change in CPI which remains 1.

So avg execution time for one instruction(ET) =CPI*Time cycle

=1*32 ns


=32x10^-9 sec


And now Throughput =total instructions/total execution time 

=1/ET

=1/32x10^-9 sec


=0.03125 x10^9 instructions/sec

=31.125 x10^6 instructions/sec

= 31MIPS (answer).

Position:
Show:

Related questions

3 3 votes
1 1 answer
4.4k
4.4k views
hem chandra joshi asked Aug 13, 2017
4,446 views
what is the throughput of pipelining ? If it has 4-stage pipelining with 800,500,400 and 300 picoseconds stage delays.
10 10 votes
3 answers 3 answers
12.2k
12.2k views
Akanksha Kesarwani asked Jan 9, 2016
12,191 views
Consider a machine with 10 ns clock and it takes 4 clock cycle per ALU instruction, 5 clock cycle per branch instruction, 6 clock cycle memory instruction. There exists 4...