Need Help Understanding a Problem About CPUs

  • Thread starter Thread starter olen501
  • Start date Start date
AI Thread Summary
The discussion centers on understanding a CPU performance problem involving clock cycles and instruction sets. The original CPU has a clock cycle of 20 ns, while a modified CPU reduces it to 18 ns by removing 4 percent of instructions, which must be replaced by three new instructions each. The user initially finds the wording of the problem confusing but clarifies their understanding by comparing the instruction sets and their execution times. The key questions involve determining which CPU performs better, the percentage of code that removed instructions would need to comprise for equal performance, and the clock cycle at which both CPUs would match in performance. Ultimately, the user expresses that they have resolved their confusion regarding the problem's wording.
olen501
Messages
6
Reaction score
0

Homework Statement


This is the problem:

Consider a CPU that has a clock cycle of 20 nanoseconds (ns). It is possible to remove some instructions from its assembly language instruction set to form a second CPU and reduce its clock cycle to 18 ns. These instructions comprise 4 percent of all code in a typical assembly language program, and each of these removed instructions would have to be replaced by 3 instructions from the reduced set. Assume that every instruction requires the same number of clock cycles, c, to complete (i.e., to be fetched, decoded, and executed with results written back).
(a.)
Which CPU has the better performance?
(b.)
What percentage of typical code would the removed instructions have to comprise in order for the two CPUs to have the same performance?
(c.)
For what clock cycle for the original CPU would the two CPUs have the same performance?


Homework Equations



T = (N*S)/R

N = actual number of instructions
executed in program
S = average number of cycles for
instructions in program
R = clock rate
T = program execution time


The Attempt at a Solution



I actually don't need help solving the problem (not yet anyways).
My problem is that to me it seems this problem is worded kind of
poorly and I don't really understand what it's trying to say about
the new instructions comprising 4 percent of the code and the
removed instructions being replaced by 3 instructions from the
reduced set. Can someone explain this problem to me?
 
Physics news on Phys.org
olen501 said:
I actually don't need help solving the problem (not yet anyways).
My problem is that to me it seems this problem is worded kind of
poorly and I don't really understand what it's trying to say about
the new instructions comprising 4 percent of the code and the
removed instructions being replaced by 3 instructions from the
reduced set. Can someone explain this problem to me?

Let's say that there are instructions A-Y and performing instructions BCD in order will do the same thing as instruction A will do by itself. Now, you have the choice between a chip that will do all of A-Y in 20 ns each, or one that will do B-Y (so you have to replace all the A's with BCD) in 18 ns each.
 
Thanks for the help, I've got it now
 
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...
Back
Top