Review Introduction to Computer System, Fall (PPI, FDU)
Mid Term Exam 2015/11/13 09:30 Z2208A 2 hours. Evaluation Chapter 5 Cache Lab
Performance and Its Factors CPU execution time = CPU clock cycles X Clock cycle time CPU execution time = CPU clock cycles / Clock rate CPU clock cycles = Instructions for a program X Average clock cycles per instruction CPU time = Instruction count X CPI X Clock cycle time = Instruction count X CPI / Clock rate CPU time= Seconds= Instructions x Cycles x Seconds Program Program Instruction Cycle CPU time= Seconds= Instructions x Cycles x Seconds Program Program Instruction Cycle
CPI: Average Cycles per Instruction CPI = (CPU Time * Clock Rate) / Instruction Count = Clock Cycles / Instruction Count CPI = CPI F where F = I i = 1 n i i i i Instruction Count CPI = ideal CPI + Memory_Stalls/Inst + Other_Stalls/Inst Memory_Stalls/Inst = Instruction Miss Rate x Instruction Miss Penalty + Loads/Inst x Load Miss Rate x Load Miss Penalty + Stores/Inst x Store Miss Rate x Store Miss Penalty
Other Metrics MIPS (million instructions per second) = Instruction count / (execution time x 10 6 ) = Instruction count * clock rate / (Instruction count * CPI * 10 6 ) = Clock rate / (CPI * 10 6 )
Amdahl's Law
Data flow Discuss the optimization of the combine 1 ~ 7 in the textbook. Tell the point in each step. For combine5,6,7, explain how they work with data-flow graph, draw the graphs your own and explain how they works and why with your own word (Do not copy from the textbook, show your own understanding after reading). Besides, explain the relationship between this three optimization.