CPSC 418, Problem Set #1, Due 10am, January 21, 1999 (Remember: No late homework!) Problem 1: (15 points) Something like Moore's Law also applies to the amount of computing power you can buy for a given amount of money. For example, $2000 today buys you twice as fast of a machine as $2000 did 18 months ago, or equivalently, a machine that cost $2000 18 months ago will only cost $1000 today. (a) Assuming that price/performance drops smoothly at this rate, halving every 1.5 years, how much do prices drop every week? (b) Note that anything related to price is sensitive to the choice of currency. If we assume that the rate in (a) is based on US dollars, and we assume that the Canadian dollar is losing 1 percent per week in value against the US dollar, when is the best price/performance available in Canadian dollars? Problem 2: (25 points) Foobar Computer Company makes a microprocessor with a die size of 100 square millimeters. They are currently built in a fab on 20cm diameter wafers. The wafers cost $3000. Defect density in the fab is 1.0 defects per square centimeter. For the current process, Alpha=3.0. Testing costs $10 per die. Packaging costs $15 per die. Using the cost model presented in class, calculate the cost of each microprocessor. You may assume a final test yield of 1.0. Foobar is considering switching to a more advanced process, which would shrink the die size to 90 square millimeters. The wafers are still 20cm diameter, but cost $4000 in the newer process. Defect density is the same, but the more complex process has Alpha=4.0. Furthermore, testing is more expensive at $15 per die. Packaging costs are the same. Would the microprocessor be more or less expensive in the new process? Problem 3: (15 points) On a set of four benchmark programs, a certain computer has run times of 12 seconds, 9 seconds, 3 seconds, and 4 seconds. (a) Compute the arithmetic mean and geometric mean of these times. (b) Suppose that because of measurement error, the times above can be up to 1 second off from the true run time (e.g., on the first program, the true run time could have been as much as 13 seconds or as little as 11 seconds). In the worst case, how far off could the arithmetic mean be? The geometric mean? Problem 4: (15 points) The new Foobium II processor runs exactly like a Pentium II, except that floating point square root has been sped up by a factor of 10. (a) If your applications spend 5% of the time doing floating point square root, how much speed up will you observe for this application on the Foobium II over a Pentium II. (b) Your buddy reports that on *his* programs, his new Foobium II is twice as fast as an old Pentium II. What fraction of his time did he used to spend on floating point square root? Problem 5: (30 points) You have been hired as a benchmarketing consultant by Foobar Computer Company. They have designed the new Foo1000 processor, which is completely compatible with the competitor's product. However, thanks to Foobar's amazing computer designers, the new Foo1000 can execute NOP (no-op -- an instruction that does nothing) instructions in zero clock cycles, whereas the competitor requires one clock cycle to execute a NOP. On all other instructions, the two machines have the same CPI. Unfortunately, the Foo1000 runs at only 90Mhz, whereas the competitor runs at 100Mhz. Your task is to write a short "benchmark" program that takes at least 10 seconds on a Foo1000, and that shows that the Foo1000 is more than twice as fast as the competitor. You may use the following instructions: ADD Rdst,Rsrc,Rsrc Add. The destination register gets the sum of the src registers. CPI=1 ADDI Rdst,Rsrc,#constant Add Immediate. The destination register gets the the source register plus the constant. CPI=1 BGT Rsrc, Label If the source register is greater than zero, branch to Label. CPI=3. There are no branch delay slots. NOP No op. Does nothing LDI Rdst, #constant Load Immediate. The destination register gets loaded with the constant. CPI=1 You have 32 registers named R0..R31. The constant in the immediate field can be any number between -16 and 15 inclusive for ADDI, and between -512 and 511 inclusive for LDI. You must explain why your solution achieves the desired goal.