Need Help Understanding a Problem About CPUs

  • Thread starter Thread starter olen501
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on a CPU performance comparison between two configurations: one with a 20 nanosecond (ns) clock cycle and another with an 18 ns clock cycle achieved by removing 4% of the assembly language instructions. The removed instructions must be replaced by three new instructions, impacting overall performance. The key equations for analyzing performance include T = (N*S)/R, where T is execution time, N is the number of instructions, S is the average cycles per instruction, and R is the clock rate. The participants clarify the implications of instruction removal and replacement on CPU performance.

PREREQUISITES
  • Understanding of CPU clock cycles and performance metrics
  • Familiarity with assembly language instruction sets
  • Knowledge of performance equations, specifically T = (N*S)/R
  • Concept of instruction replacement and its impact on execution time
NEXT STEPS
  • Research CPU performance metrics and benchmarking techniques
  • Learn about assembly language optimization strategies
  • Explore the implications of instruction set architecture (ISA) on CPU design
  • Study the relationship between clock cycles and instruction execution efficiency
USEFUL FOR

Computer engineers, performance analysts, and students studying computer architecture who seek to understand CPU performance optimization and instruction set implications.

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
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 25 ·
Replies
25
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 23 ·
Replies
23
Views
6K
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
934
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
Replies
1
Views
2K