4) We are interested in two implementations of a machine, one with and one witho
ID: 3877665 • Letter: 4
Question
4) We are interested in two implementations of a machine, one with and one without special floating-point hardware. Consider a program P with the following mix of operations: Instruction Type Floating-point multiply Floating-point add Floating-point divide Integer instructions Frequency in Mix 10% 15 % 5% 70 % Machine MFP (Machine with floating-point) has floating point hardware and can therefore implement the floating-point operations directly. It requires the following number of clock cycles for each instruction class: Instruction Type Floating-point multi Floating-point add Floating-point divide Integer instructions Number of Clock Cvcles 6 4 20 2 Machine MNFP (Machine with no floating-point) has no floating-point hardware and so must emulate the floating-point operations using integer instructions. The integer instructions all take 2 clock cycles. The number of integer instructions needed to implement each of the floating-point operations is as follows: Instruction Type Floating-point multipl Floating-point add Floating-point divide Number of Integer Operations 30 20 50 Assume that both machines have the same clock rate of 100 Mhz Find the MIPS ratings for both machines. If the machine MFP executes 300,000,000 instructions for this program, how many integer instructions does machine MNFP require for the same program? Determine the CPU time for each machine and compare the MIPS ratings with the CPU times for the same machines. Suppose that the research department says that the MFP machine in the previous problem can be re-engineered so that all floating-point instructions run 25% faster. There is no corresponding improvement in the rate of processing integer instruction. What performance gain for the MFP will this improvement produce? a. b. c. d.Explanation / Answer
Convert the MNEP data into no. of cycles
Floating point multiply,
30 x 2 = 60 cycles
20 x 2 = 40 cycles
50 x 2 = 100 cycles
Using weighted AM method, find an average CPI for machine MFP and MNFP
Average CPI for MFP = (0.10 * 6) + (0.15 * 4) + (0.05 * 20) + (0.70 * 2) = 3.6 CPI
Average CPI for MNFP = (0.10 * 30) + (0.15 * 20) + (0.05 * 50) + (0.70 * 2) = 9.9 CPI
Clock rate = 100 MHZ
MIPS ratings for MFP = 100 / 3.6 = 27.77 MIPS
MIPS ratings for MNFP = 100 / 9.9 = 10.1 MIPS
Number of instructions = 300 million
Number of integer instructions required for 300 million instructions = 300 x 9.9
= 2970 million.
CPU time for MFP = Number of instructions / MIPS = 300 / 27.77 = 10.8 sec.
CPU time for MNFP = Number of instructions / MIPS = 300 / 10.1 = 29.70 sec.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.