Chapter1 Computer Organization
Progress in computer technology
Underpinned by Moore’s Law
note:
Moore’s Law(第一種說法最為普遍)
- 1、集成電路晶元上所集成的電路的數目,每隔18個月就翻一番。
- 2、微處理器的性能每隔18個月提高一倍,而價格下降一倍。
- 3、用一個美元所能買到的電腦性能,每隔18個月翻兩番。
Power trend 目前科技有兩個困難使得power wall的產生
1.We can’t reduce voltage further
2.We can’t remove more heat
Uniprocessor
單一處理器的效能會受限於
1.power
2.instruction-level parallelism
3.memory latency
目前解決辦法就是
Multiprocessor 從字面上意思可以知道為在一個版子上有多個處理器
多工處理器有以下特點
1. 與ILP相比硬體可以同時執行多個指令和程式者不用管理多工環境(類似linux 指令後加上&)
2. 須處理 load balancing與 Optimizing communication and synchronization
note:
instruction-level parallelism (ILP)
基本上研究所想要考的計算機組織可以用ILP來概括
這邊寫上ILP的定義
ex.
在微架構(計算機組織)一些用來開發ILP的技巧
1.Instruction pipelining
2.Out-of-order execution
3.Register renaming
4.Branch prediction
更多可以詳見wiki: microarchitecture
四個影響效能
1. Alogrithm
Determines number of operations executed
2. Programming language, compiler, architecture
Determine number of machine instructions executed per operation (eg. CISC or RISC)
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
High-level language
|
Assembly language
|
Hardware representation(binary digits)
Defining Performance
Response time: The time it takes to do a task
Throughput: Total work done per unit time
Define Performance = 1/Execution Time
e.g. 
“X is n time faster than Y”
10s on A, 15s on B
So A is 1.5 times faster than B
CPU Time:
note:
1.Cylcle time等同高中物理所學的週期, Rate為頻率
2.白話文為總的需求時間等於多少個週期乘上每個週期所需時間
Instruction Count and CPI
clock cycle 可以在展開成 多少個指令數 乘上每個指令所需週期
note: CPI 每個指令所需週期
e.g.
1.
Computer A: Cycle Time = 250ps, CPI = 2.0
Computer B: Cycle Time = 500ps, CPI = 1.2
Same ISA
--->
2.If different instruction classes take different numbers of cycles
基本
加權平均CPI
有A,B,C三種class,若這三種class同時執行,對其他人來說就好像只有一台D在執行,在台D在sequence 1使用了五個IC,十個clock cycle, 所以CPI =2.0
Performance depends on
Algorithm: affects IC, possibly CPI
Programming language: affects IC, CPI
Compiler: affects IC, CPI
Instruction set architecture: affects IC, CPI, Tc
Amdahl’s Law:
因程式中存在無法分割的序列(serial program,指程式中不能並行執行的部分),就算架構再多的CPU或processor,超級電腦的效能提升仍是受到限制的。 
第一,第三,第四都是不可分割任務,在多的處器都無法更加一步的增快效能
T unaffected即為不可分割任務所需時間
----------> moore’s Gap
額外補充
MIPS:
Millions of Instructions Per Second
----> Pitfalls: MIPS as a Performance Metric
because
Doesn’t account for
Differences in ISAs between computers
Differences in complexity between instructions
參考資料:
1. 吳凱強講義
2. wiki microarchitecture, ILP
3.牛的大腦 (一些基本名詞定義)
4.介紹ILP 很詳細的講義
5.ptt 高手 關於WAR RAW WAW
Alogrithm → Algorithm
回覆刪除