> > How could be that there is a process with PID 0 before init? > Probably I'm missing something about OpenBSD core. >
As for this small part of the mystery, even init starts out as a skeleton process created early by the kernel, which then does an exec() of /sbin/init so that whatever program lies there on disk replaces the skeleton and retains its pid. When you know that part, it would not be unimaginable to have the kernel create another process (the swapper in this case) even before that happens. After init-from-disk runs, all other processes must in some way be a descendant of it, but that "rule" does not cover the first two pids at least, which you can later see are the only ones without randomized pids. For the rest of your questions, others have chipped in already. -- May the most significant bit of your life be positive.