How, if at all, do Erlang Processes map to Kernel Threads?

前端 未结 4 1246
情深已故
情深已故 2020-11-28 22:20

Erlang is known for being able to support MANY lightweight processes; it can do this because these are not processes in the traditional sense, or even threads like in P-thre

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 23:12

    I'm purely guessing here, but I'd imagine that there's a small number of threads, which pick processes from a common process pool for execution. Once a process hits a blocking operation, the thread executing it puts it aside and picks another. When a process being executed causes another process to become unblocked, that newly unblocked process gets placed into the pool. I suppose a thread might also stop execution of a process even when it's not blocked at certain points to serve other processes.

提交回复
热议问题