2

I have been stuck on a problem in my class for a week now. I was hoping someone could help steer me in the right direction.

a busy cat http://www.designedbychristian.com/unnamed.png

Processor R IS A 64-BIT RISC processor with a 2GHz clock rate. The average instruction requires one cycle to complete, assuming zero wait state memory accesses. Processor C is a CISC processor with a 1.8GHz clock rate. The average simple instruction requires one cycle to complete, assuming zero wait state memory accesses. The average complex instruction requires two cycles to complete, assuming zero wait state memory accesses. Processor R can't directly implement the complex processing instructions or Processor C. Executing an equivalent set of simple instructions requires an average of three cycles to complete, assuming zero wait state to memory accesses.

Program S contains nothing but simple instructions. Program C executes 70% simple instructions and 30% complex instructions. Which processor will execute program S more quickly? What percentage of complex instructions will the performance of the two processor be equal?


I attached an image above translating the data into excel the best I could. I am not asking you guys to answer this for me but I am stuck completely and I would some help on where to start and what my answer should look like.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Christian4423
  • 1,746
  • 2
  • 15
  • 25
  • Which processor will execute program S more quickly? Both processors take the same number of cycles to process a simple instruction. S is completely simple, so both processors will take the same amount of cycles to execute S. Whose cycles are quicker? – RaGe May 05 '15 at 02:18
  • The RISC processor will do program S the fastest. It is what it was build build for, simple instructions. Since it is 2GHz and not 1.8GHz, like processor C, it will do finish processing faster. The Program C has complex instructions(30%), which processor C was built for. But since Processor R will do the other part(70%) faster and slow down at the 30%, Processor C should catch up and then beat it. I just need to find out the formula to support this. – Christian4423 May 05 '15 at 02:38

1 Answers1

0

For the second part:

Processor R Total cycles = 1 x #simpleInstructions + 3 x #complexInstructions
Processor C Total cycles = 1 x #simpleInstructions + 2 x #complexInstructions

So, how much time for R, and how much time for C?

When expressing complex/simple instructions as a percentage,

RCycles = 1 x 0.7 x totalInstructions + 3 x 0.3 x totalInstructions
CCycles = 1 x 0.7 x totalInstructions + 2 x 0.3 x totalInstructions

Which is faster?

Now replace the percentages with a variable, equate the Rtime and Ctime and calculate percentage.

RaGe
  • 22,696
  • 11
  • 72
  • 104