Source: OSNews
Article note: This is a way more interesting piece than I expected when I first saw it go by, it goes into the full history and explores where the common wrong answers came from, and the modern refinements to deal with computers being way more complicated and dynamic than they once were.
I've actually refined my mental explanation after reading, I was close but it's now: "PID 0 is the null process that gets scheduled when nothing else is ready to run. When running, it tries to not be running by ceding to another process or turning off resources."
The very short version: Unix PIDs do start at 0! PID 0 just isn’t shown to userspace through traditional APIs. PID 0 starts the kernel, then retires to a quiet life of helping a bit with process scheduling and power management. Also the entire web is mostly wrong about PID 0, because of one sentence on Wikipedia from 16 years ago.
There’s a slightly longer short version right at the end, or you can stick with me for the extremely long middle bit!
But surely you could just google what PID 0 is, right? Why am I even publishing this?
↫ David Anderson
What a great read. Just great.