COMP3211/9211 03s2 Tutorial Week 02 ----------------------------------- Key: SRQ = Stallings, Review Question; SP = Stallings Problem; P = Patterson & Hennessy Exercise (Note you will in general need to source the P problems in a copy of the Second Edition) Q1. [SRQ2.2] What are the four main components of any general-purpose computer? Q2. [SRQ2.3] At the integrated circuit level, what are the three principal constituents of a computer system? Q3. [SRQ2.4] Explain Moore's Law Q4. [SRQ2.6] What is the key distinguishing feature of a microprocessor? Q5. [SP2.2] In the IBM 360 Models 65 and 75, addresses are staggered in two separate main memory units (e.g., all even-numbered words in one unit and all odd-numbered words in another). What might be the purpose of this technique? Q6. [P2.1] We wish to compare the performance of two different machines: M1 and M2. The following measurements have been make on these machines: program time on M1 time on M2 1 10 seconds 5 seconds 2 3 seconds 4 seconds Which machine is faster for each program and by how much? Q7. [P2.2] Consider the two machines and programs in P2.1. The following additional measurements were made: program instructions executed on M1 instructions executed on M2 1 200 x 10^6 160 x 10^6 Find the instruction execution rate (instructions per second) for each machine when running program 1. Q8. [P2.3] If the clock rates of machines M1 and M2 in P2.1 are 200MHz and 300MHz, respectively, find the clock cycles per instruction (CPI) for program 1 on both machines using the data in P2.1 and P2.2 Q9. [P2.5] Suppose that M1 in P2.1 costs $10,000 and M2 costs $15,000. If you needed to run the program 1 a large number of times (i.e., if you were concerned with throughput instead of response time), which machine would you buy in large quantities? Why? Q10. [P2.6] Suppose you had many more machines to consider besides M1 and M2 described in P2.1 and P2.5 (each with a cost and an execution time for program 1, which you need to run a large number of times). Could you use the cost divided by the execution time as a metric to help you in your purchasing decision? How about the cost multiplied by the execution time? If either of the two formulas cannot be used, present a simple example that demonstrates why not. Q11. [P2.10] Consider two different implementations, M1 and M2, of the same instruction set. There are four classes of instructions (A, B, C, and D) in the instruction set. M1 has a clock rate of 500 MHz. The average number of cycles for each instruction class on M1 is as follows: class CPI for this class A 1 B 2 C 3 D 4 M2 has a clock rate of 750 MHz. The average number of cycles for each instruction class on M2 is as follows: class CPI for this class A 2 B 2 C 4 D 4 Assume that peak performance is defined as the fastest rate that a machine can execute an instruction sequence chosen to maximize that rate. What are the peak performances of M1 and M2 expressed as instructions per second? Q12. [P2.18] You are the lead designer of a new processor. The processor design and compiler are complete, and now you must decide whether to produce the current design as it stands or spend additional time to improve it. You discuss this problem with your hardware engineering team and arrive at the following options: a) Leave the design as it stands. Call this base machine Mbase. It has a clock rate of 500MHz, and the following measurements have been made using a simulator: instruction class CPI frequency A 2 40% B 3 25% C 3 25% D 5 10% b) Optimize the hardware. The hardware team claims that it can improve the processor design to give it a clock rate of 600MHz. Call this machine Mopt. The following measurements were made using a simulator for Mopt: instruction class CPI frequency A 2 40% B 2 25% C 3 25% D 4 10% What is the CPI for each machine? Q13. [P2.20] How much faster is Mopt than Mbase in P2.18? Q14. [P2.33] Consider the following hypothetical news release: "The company will unveil the industry's first 800-MHz version of the chip, which offers a 20% performance boost over the company's former speed champ, which runs at 666 MHz. The new chip can be plugged into system boards for the older original chip (which ran at 400 MHz) to provide a 70% performance boost." Comment on the definition (or definitions) of performance that you believe the company used. Do you think the news release is misleading? Q15. [P2.41] Suppose we enhance a machine to make all floating-point instructions run five times faster. Let's look at how speedup behaves when we incorporate the faster floating-point hardware. If the execution time of some benchmark before the floating-point enhancement is 10 seconds, what will the speedup be if half of the 10 seconds is spent executing floating-point instructions? Q16. [P2.42] We are looking for a benchmark to show off the new floating-point unit described in P2.41, and we want the overall benchmark to show a speedup of 3. One benchmark we are considering runs for 100 seconds with the old floating-point hardware. How much of the initial execution time would floating-point instructions have to account for to show an overall speedup of 3 on this benchmark?