REVIEW Chap1
:material-circle-edit-outline: 约 223 个字 :material-clock-time-two-outline: 预计阅读时间 1 分钟
20240331
Computer abstractions and Technology
ISA: Instruction set architecture
*What is a Computer?
- Computer is
- an electronic device
- that manipulates data
- according to a list of instructions (program),
- with capability of a Turing machine.
- Electronic realization
- A set of instructions in a well-defined manner --> general-purpose
- Execution of a pre-recorded list of instructions --> program-controlled
- Memory that can store instructions and data --> stores program
- Turing-complete in theory --> equivalent to Turing machine
Computer design: performance and idea
- response time / execution time
- throughput / bandwidth
- total work per unit time
performance = \(\frac{1}{execution\, time}\)
- Elapsed time: total response time in all aspects
- CPU time: without I/O time and other aspects
- CPU time has two ways to calculate
- Clock Cycle / Clock Rate
- Instruction Count x CPI
- CPU time has two ways to calculate
- CPI: Cycles per Instruction
- Clock Rate: 即每个周期的运行速度
- cycle类比s,rate类比v,time即t
- cycle time即单位路程使用的时间,与s相乘可得t,是v的反比
\[
CPU\, Time=(CPU)\, Clock \,Cycles \times Clock\, Cycle\, Time\\=\frac{(CPU)\, Clock \,Cycles}{Clock\,Rate}
\]
\[
Clock\,Rate = \frac{1}{Clock\, Cycle\, Time}=\frac{Clock \,Cycles}{CPU\, Time}
\]
\[
Clock\,Cycles = Instruction\,Count \times CPI
\]
\[
CPU\,Time=Instruction \,Count\times CPI\times Clock\,Cycle\,Time\\=\frac{Instruction \,Count\times CPI}{Clock\,Rate}
\]