CareerCup After the BIOS performs a successful power-on-self-test, describe everything

本文详细介绍了计算机系统从加电自检到用户界面呈现的整个启动过程。包括PCI设备树的建立、MBR加载、内核启动及模块加载等内容,并解释了关键进程ID的作用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 XHP-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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值