The mach_init process starts the BSD init process. BSD init, which has a process ID (PID) of 1, “owns” every other process on the system, and performs four principal tasks:
Determines if the user wants single-user mode or is booting from a CD-ROM. If either of these conditions apply, an advisory prints and control is handed over to the user.
Runs the system-initialization shell scripts /etc/rc.boot and /etc/rc which complete basic initialization tasks; for details, see “The rc.boot and rc scripts”. /etc/rc runs the SystemStarter program, which handles more specialized initialization tasks specified as “start-up items,” for details see ““Start-up items”.
Via the getty command, init launches the login window application, which displays the login window, validates entered user names and passwords, and completes the login procedures.
As the parent of all processes, init handles all necessary cleanup of processes as they terminate.