- 一、Classes of Computers
- 二、Understanding Performance
- 三、Below your Program
- 四、Levels of Program Code
- 五、Defining Performance
- 六、Relative Performance
- 七、Measuring Execution Time
- 八、Performance Summary
- 課程簡報
- 參考資料
一、Classes of Computers
1. Desktop computers
- General purpose, variety of software.
- Subject to
cost
/performance
tradeoff.
2. Server computers
- Network based.
- High capacity, performance, reliability.
- Range from small servers to building sized.
3. Embedded computers
- Hidden as components of systems.
- Stringent
power
/performance
/cost
constraints.
二、Understanding Performance
1. Algorithm
- Determine number of operations executed.
2. Programming language, compiler, architecture
- Determine number of machine instructions executed per operation.
3. Processor and memory system
- Determine how fast instructions are executed.
4. I/O system (including OS)
- Determines how fast I/O operations are executed.
三、Below your Program
1. Application software
- Written in high-level language.
2. System software
- Compiler: translates HLL code to machine code.
3. Hardware
- Processor, memory, I/O controllers
四、Levels of Program Code
1. High-level language
- Level of abstraction closer to problem domain.
- Provides for productivity and portability.
2. Assembly language
- Textual representation of instrctions.
3. Hardware representation
- Binary digits (bits).
- Encoded instructions and data.
五、Defining Performance
1. Response time
- How long it takes to do a task.
2. Throughput
- Total work done per unit time.
- e.g. tasks / transactions / … per hour
六、Relative Performance
- X is n time faster than Y
七、Measuring Execution Time
1. Elapsed time
- Total response time, including all aspects
- Processing, I/O, OS overhead, idle time.
- Determines system performance
2. CPU time
- CPU Time Example
- Performance improved
- Reducing number of clock cycles.
- Increasing clock rate.
- Hardware designer must often trade off clock rate against cycle count.
3. Instruction Count and CPI
Instruction Count
:指令個數CPI
:每一個指令需要執行多少個週期 (cycle per instruction)
- CPI Example
八、Performance Summary
- Performance depends on
- Algorithm: affects IC, possibly IC
- Programming language: affects IC, CPI
- Compiler: affects IC, CPI
- Instruction set architecture: affects IC, CPI, Tc