Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Computer Architecture Note W11D1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Computer Architecture Note W11D1

Q: Why do we need memory reorder buffer?

A: For Process SYNC & IPC (Inter-Process Communication). (e.g. we may have memory barrier)

Q: Is it always better to have more stages in the CPU pipeline?

A: No. (e.g. the story of Pentium 4)

*Some interesting stories and comments about Kuan Yang...*

- Hyper-threading Technology (HTT) (e.g. one core, two registers)
- Simultaneous Multi-threading (SMT)
24 changes: 24 additions & 0 deletions Computer Architecture Note W15D1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Computer Architecture Note W15D1

(Recitation by Alei)

## Virtual Cache VS Physical Cache

1. Core + Cache (V) + VM

synonym & alias problem: page table per process

2. Core + VM + Cache (P)

performance problem: TLB (translation lookaside buffer)

**Distinguish Synonym from Alias**

Synonym: one va to different pa

Alias: different va to same pa

## VLIW (Very Long Instruction Word)

a technology of parallelism

55 changes: 55 additions & 0 deletions Computer Architecture Note W7D1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Computer Architecture Note W7D1

## Reduce the Miss Rate

### How can we reduce misses?

1. change Block Size

2. change Associativity

3. **change Compiler**

### Reducing misses by compiler optimizations

1. merging arrays

e.g. 把key和value放在结构体里再一起开数组,而不是开两个数组

2. loop interchange

e.g. 改变遍历二维数组的循环顺序

3. blocking

e.g. 分块计算矩阵乘法

## Reduce the Miss Penalty

### L2 Cache

Q: Why not increase L1 Cache directly?

A: Larger capacity would lead to lower hit speed.

### Write Policy

- Write-through

update cache and underlying memory/cache

- Write-back

simply update cache, another *dirty* control bit

### Read Priority over Write on Miss

Using **Write Buffer** for both write-through and write-back.

Special case: *Read miss replacing dirty block (write-back)*

- Copy the dirty block to a write buffer, then do the read and write parallel

### Early Restart and Critical Word First

Generally useful only in large blocks.