During boot, after the BIOS performs a successful power-on-self-test, describe everything that occurs until the console is presented to the user.
----------------------------------------------------------------------
This is in no way a complete answer
PCI device tree is formed
BIOS loads the MBR
MBR points to the kernel image stored which is then loaded
Kernel boots with one process with pid 1
Kernel imports the PCI device tree and based on PCI IDs loads the corresponding modules.
Now the kernel is able to do DMA by itself (either over disk or network)
在类UNIX操作系统中,新进程都衍自系统调用fork()。fork()调用会将子进程的PID返回给父进程,使其可以之指代子进程,从而在需要时以之为函数参数。例如,若以子进程PID为参数调用waitpid(),可使父进程以休眠状态等待子进程结束;若以之为参数调用kill(),便可结束对应子进程。
在各PID中,较为特别的是0号PID和1号PID。PID为0者为交换进程(英语:swapper),属于内核进程,负责分页任务;PID为1者则常为init进程,主要负责启动与关闭系统。值得一提的是,1号PID本来并非是特意为init进程预留的,而init进程之所以拥有这一PID,则是因为init即是内核创建的第一个进程。不过,现今的许多UNIX/类UNIX系统内核也有以进程形式存在的其他组成部分,而在这种情况下,1号PID则仍为init进程保有,以与之前系统保持一致[1]。
PID的分配机制则因系统而异,一般从0开始,然后顺序分配,直到达到一个最大值(亦因系统而异),而后又从300开始重新分配;在Mac OS X和HP-UX下,则是由100开始重分配。在分配PID时,若遇到已分配的PID,则直接跳过,继续递增查找下一个可分配PID。
After this comes the init levels which I am not really sure about. Here's a skeletal idea.
The first level is single user mode
Then a multi-user mode and a shell is spawned.
Then X is launched if configured.