Performance
Response Time :
How long it takes to do a task
Throughput :
Total work done per unit time
Definition of Performance :
Performance = 1 / Execution Time
If X is n time faster than Y, Performance(x) / Performance(y) = n
Execution Time :
1.Elapsed time :
Total response time
Determines system performance
Ex: time sharing ---->太快感覺不出來
★ 2.CPU time: (通常用這個比較)
Time spent processing a given job
CPU Time :
CPU Time = CPU Clock Cycles * Clock Cycle Time
= CPU Clock Cycles / Clock frequency
又
Clock Cycles = Instruction Count (Ci) * Cycles per Instruction (CPI)
CPI : 一個 instruction 有幾個 Cycle
因此,
CPU Time = Ci * CPI * Clock Cycle Time
= Ci * CPI / Clock frequency
Ci 影響因素:
----> program, instruction set architecture (ISA 指令集架構) and compiler
CPI影響因素:
-----> ISA,different instructions have different CPI
因此, 要比較就要在Same ISA 下~~~~
★★★ If different instruction classes take different numbers of cycles.....
--> 每個狀況都加總起來
因此,