Why do most processes run as children of launchd?

When did most processes run as a child of launchd instead of the kernel pid ?


macOS comes from the Unix tradition of operating systems. Here processes are arranged in a tree, i.e. a hierarchy with parent and child processes.

From this follows that there most be a root process from which other processes are spawned. This process on modern macOS is launchd.

On earlier versions of OS X a process named initd took the place of launchd. Launchd is essentially a modern replacement and superset of initd.

There’s no inherent “offering” in having launchd as your parent process.

The reason it is not for example kernel_task is that it stands for computation that happens in kernel mode - i.e. a privileged mode on the CPU.

Launchd is the first user-mode process started by the kernel when the system boots. User-mode means that it is less privileged than kernel mode. Launchd then handles starting the rest of the processes necessary to have a working, usable system.