Q3. Take two distinct computers (M1 and M2) with the same instruction set as an example. The instruction set is made up of the three classes A, B, and C of instructions. M1 has a clock frequency of 6 GHz, whereas M2 has a frequency of 3 GHz. According to M1 and M2, the CPI for each instruction class is as follows:
Class A B c
CPI on M1 5 2 3
CPI on M2 2 1 2
Compiler 1 40% 30% 30%
Compiler 2 40% 20% 40%
Compiler 3 20% 60% 20%
The last three columns show the instruction usage in percentage for three different compliers which generate the same number of instructions for a given program a. Determine which machine is faster and compare the machines in terms of performance
while using Compiler 1 on both? b. Using Complier 2 on both machines, determine which is faster and by how much? c. Discover which compiler would you prefer out of all three for machine M1? And which for machine M2? d. Show that which machine and compiler combination would result in the best performance?