News for hackers. Stuff that matters.
Re:Windows NT vs. Unix: A design comparison by immibis on Monday September 09, 2024 @02:57PM (#41492183)
This was written about Windows kernels.

Linux is the only Unix-like kernel I actually know anything about. In Linux, processes essentially do not exist. You have threads, and thread groups. A thread group is what most of the user-space tooling calls a process. It doesn't do very much by itself. As the name implies, it mostly just groups threads together under one identifier.

Linux threads and "processes" are both created using the "clone" system call, which allows the caller to specify how much state the new thread shares with the old thread. Share almost everything, and you have a "thread". Share almost nothing, and you have a "process". But the kernel treats them the same.

By contrast, processes in NT are real data structures that hold all kinds of attributes, none of which is a running piece of code, since that's still handled by a thread in both designs.

Re:Windows NT vs. Unix: A design comparison by ithkuil on Monday September 09, 2024 @03:37PM (#41492601)
IIRC indeed Linux preserves the time honoured Unix semantics of a process ID by leveraging the thread group ID