Erlang VM

Erlang VM的基本介绍

Get Started. It's Free
or sign up with your email address
Rocket clouds
Erlang VM by Mind Map: Erlang VM

1. 从源码的结构看ERTS

1.1. [OTP]/erts/

1.1.1. emulator/

1.1.1.1. beam/

1.1.1.2. HiPE/

1.1.2. etc/

2. 从组成上来看ERTS

2.1. BEAM解释器

2.2. Processes

2.2.1. Stack

2.2.2. Heap

2.2.3. MailBox

2.2.4. PCB(process control block)

2.2.5. PID

2.3. 调度器

2.4. GC

2.4.1. copying GC

2.4.2. 性能表现

2.4.3. generational GC

2.5. HiPE(native code compilation)

2.6. I/O

3. 从内存分布上看ERTS

3.1. ERTS code

3.1.1. GC

3.1.2. Scheduler

3.1.3. BEAM

3.1.4. Sockets

3.1.5. etc...

3.1.6. The TAG Scheme

3.1.6.1. list sharing

3.2. C stack

3.3. Queues

3.3.1. Processes

3.3.1.1. PCB

3.3.1.1.1. htop

3.3.1.1.2. stop

3.3.1.1.3. heap

3.3.1.1.4. hend

3.3.1.1.5. cp

3.3.1.1.6. fcalls

3.3.1.1.7. reds

3.3.1.1.8. id

3.3.1.1.9. flags

3.3.1.1.10. next

3.3.1.2. MessageQueue

3.3.1.3. Stack&Heap

3.3.1.3.1. 优点

3.3.1.3.2. 缺点

3.3.1.4. Native Stack

3.4. Binaries

3.4.1. 大于64bytes的会存储于特定的区域

3.4.2. 每个进程保存一个它所见的binary list

3.4.3. sub binary

3.5. BEAM CODE

4. 总结

4.1. process start with small heaps

4.2. lists take space

4.3. sharing is nice but can explode

4.4. copying GC uses twice sapce

4.5. binaries are reference counted

4.6. **every process has seen a binary has to forget it, before it goes away**

4.7. use binary:copy/ on sub binaries