File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,29 +49,35 @@ rebalancing is expensive
4949 service discovery, request routing
5050```
5151
52-
5352## consistency
5453linearizable: single copy illusion, single leader + election consensus + sync replication
54+
5555causal: vector clocks + dependency tracking
56+
5657eventual: async replication + conflict resolution
5758
5859## consensus
5960raft: majority ack, term number fencing
6061
61- paxos
62- pbft: o(n2)
63-
6462## atomic commit
65632PC: ask all, commit if they all ack, like marriage, coordinator spof
6664practical: 2pc + raft for coordinator failover
67- k
65+
6866## time and order
6967NTP, GPS
7068
7169lamport clock: single counter per process, can only tell if A happens-before B
70+
7271vector clocks: list of counters per process, can detect concurrency, detects conflicts
72+
7373version vector: each replica tracks versions of replicated data objects
7474
75+ ```
76+ lamport int
77+ vector []int
78+ versions map[object]version
79+ ```
80+
7581## availability
7682heartbeat pings with timeout, adapt to network conditions
7783lease with ttl
Original file line number Diff line number Diff line change 11---
22---
3- ## address space
43```
5- code <- PC program counter or IP instruction pointer
4+ address space
5+ code <- IP or PC
6+ instruction pointer or program counter
7+ data
8+ heap
9+ malloc
10+ stack <- SP
11+ params
12+ return address
13+ local vars
14+ open files
615
7- data
8-
9- stack <- SP
10- return address
11- open files
12- params
13- local vars
14-
15- heap
16- new()
17- malloc()
18- ```
19-
20- time sharing, save/load registers to switch ctx
21- scheduler: policy vs mechanism
22-
23- ```
2416fork()
2517exec()
2618wait()
@@ -36,9 +28,7 @@ pthread
3628 cond
3729 wait
3830 signal
39- ```
4031
41- ```
4232IPC
4333 shared memory
4434 threads
@@ -53,12 +43,10 @@ signals
5343 SIGINT
5444 SIGTERM
5545 SIGHUP
56- ```
5746
58- ## virt
59- ```
60- host os, qemu, kvm
61- vm, guest os, containerd, runc
62- kubelet, kube-proxy, coredns
63- pod, container
47+ virt
48+ host os, qemu, kvm
49+ vm, guest os, containerd, runc
50+ kubelet, kube-proxy, coredns
51+ pod, container, process
6452```
Original file line number Diff line number Diff line change @@ -27,10 +27,7 @@ systemd
2727 syslogd
2828 journald
2929
30- ```
3130
32- ## users
33- ```
3431user types
3532 root
3633 service accounts
You can’t perform that action at this time.
0 commit comments