典型的Linux内核启动的第一个进程是什么?

前端之家收集整理的这篇文章主要介绍了典型的Linux内核启动的第一个进程是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在互联网上搜索了第一个在系统启动时执行的进程.

我找到了两个init和sched的答案.真的是什么?

哪个先执行? sched进程或init进程?

解决方法

通常它是init进程,其路径被硬编码到内核本身. init执行非常低级的功能,例如在Ubuntu(15.40之前)的情况下启动upstart,或者在Ubuntu 15.04及更高版本的情况下启动系统,Arch,Fedora等,它们加载剩余的进程和设置.请注意,在init运行时系统未完成启动 – 这是一种常见的误解.实际上,init会设置您的登录屏幕和其他相关任务.这是一个关于init: https://en.wikipedia.org/wiki/Linux_startup_process#SysV_init的WikiPedia页面

Init is the father of all processes. Its primary role is to create processes from a script stored in the file /etc/inittab. This file usually has entries which cause init to spawn gettys on each line that users can log in. It also controls autonomous processes required by any particular system. A run level is a software configuration of the system which allows only a selected group of processes to exist. The processes spawned by init for each of these run levels are defined in the /etc/inittab file.

但是,Linux内核确实启动了调度程序,但它不在用户空间中,这是大多数人关联的进程的主页.此外,如果init丢失或无法调用,则可以替换Bourne Shell(/ bin / sh).理论上,您也可以使用此处的init = * some path * Linux内核引导选项将其替换为任何可执行文件.

原文链接:https://www.f2er.com/linux/394039.html

猜你在找的Linux相关文章