Skip to content

Commit ad6c2d8

Browse files
committed
add cpu arch ascii
1 parent 612dd21 commit ad6c2d8

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

memory_barrier.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,47 @@
33
memory barrier 也称为 memory fence。
44

55
```
6+
┌─────────────┐ ┌─────────────┐
7+
│ CPU 0 │ │ CPU 1 │
8+
└───────────┬─┘ └───────────┬─┘
9+
▲ │ ▲ │
10+
│ │ │ │
11+
│ │ │ │
12+
│ │ │ │
13+
│ ▼ │ ▼
14+
│ ┌────────┐ │ ┌────────┐
15+
│◀───┤ Store │ │◀───┤ Store │
16+
├───▶│ Buffer │ ├───▶│ Buffer │
17+
│ └────┬───┘ │ └───┬────┘
18+
│ │ │ │
19+
│ │ │ │
20+
│ │ │ │
21+
│ │ │ │
22+
│ ▼ │ ▼
23+
┌──┴────────────┐ ┌──┴────────────┐
24+
│ │ │ │
25+
│ Cache │ │ Cache │
26+
│ │ │ │
27+
└───────┬───────┘ └───────┬───────┘
28+
│ │
29+
│ │
30+
│ │
31+
┌──────┴──────┐ ┌──────┴──────┐
32+
│ Invalidate │ │ Invalidate │
33+
│ Queue │ │ Queue │
34+
└──────┬──────┘ └──────┬──────┘
35+
│ │
36+
│ Interconnect │
37+
└───────────────┬───────────────┘
38+
39+
40+
41+
42+
┌───────┴───────┐
43+
│ │
44+
│ Memory │
45+
│ │
46+
└───────────────┘
647
```
748

849
参考资料:

monodraw/cpu_arch.monopic

2.94 KB
Binary file not shown.

0 commit comments

Comments
 (0)