Suppose that you have a single-cycle processor which requires 10 clock cycles to
ID: 656423 • Letter: S
Question
Suppose that you have a single-cycle processor which requires 10 clock cycles to perform a memory access, 4 cycles to perform a branch, and 2 cycles to perform all other instructions. Suppose further that the processor clock frequency is 1 GHz.
Suppose a program runs for 100 million instructions. The instructions consist of 30% memory accesses, 10% branches, and 60% other instructions. What is the average clock cycles per instruction? How much time will the program take to run?
A new design technique allows you to run the processor at 2000 MHz, but memory accesses now take 15 cycles. How much faster would a processor using the new design technique be?
Explanation / Answer
number of clock cycles required to perform a memory access =10
number of clock cycles required to perform a branch=4
number of clock cycles required to perform other instructions=2
processor clock frequency=1ghz=10^9
program runs instrucions=100 million=10^8
this instructions contains =3*10^7memory access,1*10^7branch,6*10^7other instructions
number of clocks required to perform 3*10^7memory access=10* 3*10^7
number of clocks required to perform 1*10^7branch=4*1*10^7
number of clocks required to perform 6*10^7other instructions=2*6*10^7
average number of clock required per instruction=(10* 3*10^7+2*6*10^7+4*1*10^7)/total numeber of instructions
=46*10^7/10^8
=4.6clocks/cycle
time taken to run this program = frequency of the processor/total number of clocks required by the program
=10^9/46*10^7=2.17 seconds
according to new design total number of clocks required by the program=45*10^7+2*6*10^7+4*1*10^7=61*10^7
time taken to run this program = frequency of the processor/total number of clocks required by the program
=10^9/61*10^7=1.63 seconds
now processor is faster than older design= ((2.17-1.63)/2.17)*100=24.8%faster
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.