Path: ...!uucp.uio.no!fnord.no!news1.firedrake.org!nntp.terraraq.uk!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.os.linux.advocacy Subject: Re: The Ultimate Process List Date: Sun, 28 Apr 2024 23:58:45 -0000 (UTC) Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <17c9ecced6935d68$249590$3268579$802601b3@news.usenetexpress.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 29 Apr 2024 01:58:46 +0200 (CEST) Injection-Info: dont-email.me; posting-host="04215bbbe15e1cd8ac94ba1cee5d62b8"; logging-data="1404772"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pYtxThT5yetPwt7v7HCBh" User-Agent: Pan/0.155 (Kherson; fc5a80b8) Cancel-Lock: sha1:tW+aoKJSDNWjI2axZ8cq1gcu8ZA= Bytes: 2071 On Sun, 28 Apr 2024 23:14:54 -0000 (UTC), vallor wrote: > Here's what it looks like with 64 cores: > [lots of kernel threads shown] Fun fact: in Linux, the parent process ID for kernel threads is not 1, but 2. Traditionally, on *nix systems, the process with ID 1 is the ultimate root of the process tree. That process can never terminate: if it does, the system goes down. However, on Linux, PID 1 is only the root of the userland process tree. The kernel has its own internal housekeeping threads (on Linux, there is very little difference between “processes” and “threads”), and rather than send notifications about them to PID 1, they are in an entirely separate tree, with its own ultimate root, PID 2, aka kthreadd. If you look at the parent process IDs, you will see that every other process/thread apart from these two have a nonzero parent. For these two, the “parent” process ID is zero, indicating they have no parent.