Suppose that machine Ml in Problem 12 costs $10,000 and M2 costs $15,000. If you
ID: 3666144 • Letter: S
Question
Suppose that machine Ml in Problem 12 costs $10,000 and M2 costs $15,000. If you ran program 1 on machines M1 and M2, clearly M2 executes the program faster (5 secs instead of 10 secs). However, you may not want to spend $5.000 extra on machine M2 to get a gain of 5 seconds for just a single run of program 1. But if you needed to run program 1 a large number of times and were concerned with the cost/performance ratio over thousands of runs instead of a single run, which machine would you buy in large quantities and why? Consider two different implementations, Ml and M2, of the same instruction set. There are four classes of instructions (A, B, C, and D) in the instruction set. Ml has a clock rate of 500 MHz. The average number of cycles for each instruction class on Ml is as follows: M2 has a clock rate of 750 MHz. The average number of cycles for each instruction class on M2 ie ae follows: Peak performance is defined as the fastest rate that a machine can execute an instruction sequence. It is determined by assuming that ALL instructions in a given instruction sequence execute at the smallest number of cycles. Determine the peak performance of machines Ml and M2 expressed as instructions per second.Explanation / Answer
16)
given
cost of m1 = 10000
cost of m2 = 15000
execution time for m1 = 10 sec
execution time for m2 = 5 sec
suppose we bought 3 m1 computers which cost $30000
and we bought 2 m2 computers which cost the same
in 10 seconds , we can run program1 three times in these machines
in 10 seconds , we can run program 1 , four times in these machines, hence
it is always better to buy m2 in large quantities instead of m1
17)
given
frequency of M1 = 500MHz
number of cycles required to run 1 instruction of ABCD each = 10
hence 4 instructions require 10 clock cycles
=> 1 instruction require 2.5 clock cycles
=> 1 instruction require 2.5/500M = 5 * 10-9 sec
hence number of instructions can be executed in 1 sec = 1/(5*10-9) = 2*108
given
frequency of machine M2 = 750 MHz
number of clock cycles required to execute 1 instruction of type A,B,C,D each = 12 clock cycles
=> 4 instructions require 12 clock cycles
=> 1 instrcution require 3 clock cycles
=> 1 instruction require 3/750M = 4*10-9 Sec
=> it can excute 1/(4*10-9) = 2.5 * 108 instructions in 1 sec
hence
peak performance of machine M1 = 2*108 instructions per second
peak performance time of machine M2 = 2.5*108 instructions per second
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.