当调用 'spawn' 函数时到底发生了什么?

What exactly happens when one calls a 'spawn' function?

我想了解 BEAM VM 的工作原理,所以我有一个问题。当一个人在 erlang 中生成一个进程时,结果是一个 PID。这是否意味着在生成请求的进程之前暂停进程?

不,进程是相互独立的。这是二郎docs

I am trying to understand how BEAM VM works.

详情在免费书中,"The Beam Book"

Does that mean that a process is suspended until requested process is spawned?

视情况而定。

Erlang is a concurrent language. When we say that processes run concurrently we mean that for an outside observer it looks like two processes are executing at the same time.

In a single core system this is achieved by preemptive multitasking. This means that one process will run for a while, and then the scheduler of the virtual machine will suspend it and let another process run.

In a multicore or a distributed system we can achieve true parallelism, that is, two or more processes actually executing at the exact same time. In an SMP enabled emulator the system uses several OS threads to indirectly execute Erlang processes by running one scheduler and emulator per thread. In a system using the default settings for ERTS there will be one thread per enabled core (physical or hyper threaded).