Assignment 1: Performance and Measures: Problem#01
Assignment 1: Performance and Measures: Problem#01
Problem#01: We wish to compare the performance of two different computers: M1 and M2. The following measurements have been made on these computers: [4 points].
a) Which computer is faster for each program and how man! times as fast is it" b) #ind the instruction e$ecution rate %instructions per second& for each computer when running program 1. c) The cloc' rates for M1 and M2 are ( )*+ and , )*+ respectivel!. #ind the -./ for program 1 on both machines. d) 0uppose that program 1 must be e$ecuted 1122 times each hour. 3n! remaining time should used to run program 2. Which computer is faster for this wor'load" .erformance is measured here b! the throughput of program 2.
Problem#02:0uppose !ou wish to run a program . with 4., 5 126 instructions on a , )*+ machine with
a -./ of 1.2. a) What is the -.7 e$ecution time" b) When !ou run program . it ta'es ( seconds of wall time to complete. What is the percentage of the -.7 time program . received"
Problem#03:
-onsider two different implementations M1 and M2 of the same instruction set. There are five classes of instructions %3 8 - 9 and :& in the instruction set. M1 has a cloc' rate of 4 )*+ and M2 has a cloc' rate of 1 )*+.
a) 3ssume that pea' performance is defined as the fastest rate that a computer can e$ecute an! instruction se;uence. What are the pea' performances of M1 and M2 e$pressed in instructions per second" b) /f the number of instructions e$ecuted in a certain program is divided e;uall! among the classes of instructions e$cept that for class 3 which occurs twice as often as each of the others how much faster is M2 than M1"
Problem#04: -onsider two different implementations M1 and M2 of the same instruction set. There
are three classes of instructions %3 8 and -& in the instruction set. M1 has a cloc' rate of 1 )*+ and M2 has a cloc' rate of ( )*+. The -./ for each instruction class on M1 and M2 is given in the following table:
The above table also contains a summar! of the usage of instruction classes generated b! three different compilers: -1 -2 and -(. 3ssume that each compiler generates the same number of instructions for a given program. a) 7sing -1 compiler on both M1 and M2 how much faster is M1 than M2" b) 7sing -2 compiler on both M1 and M2 how much faster is M2 than M1" c) /f !ou purchase M1 which compiler would !ou use" d) /f !ou purchase M2 which compiler would !ou use" e) Which computer and compiler combination give the best performance"