upvote
Still doesn't. The Linux kernel makes no distinction between threads and processes. What we commonly call "processes" are in fact "thread groups" and play a minor role, mostly related to signal handling and the ability to exit them all at once with a syscall.

The clone syscall allows you to fork a thread with varying levels of sharing. Usually a thread library will share almost everything and a process fork will share almost nothing, but those aren't the only choices. Yu can choose, say, to duplicate the memory map but share the file descriptor table.

reply
Yep, and poll(2) (or later select(2)) to coalesce all possible events into one logical event queue.
reply
this is talking about the kernel not the userland.
reply
Same difference.

The kernel is a global lock on shared (hardware) resources and stuff like pipe buffers. It is also a library of hardware drivers. Calling the kernel just happens to be termed calling the system "syscall".

From this perspective the BEAM VM or the language run-time are also "kernel".

reply