Article Title: independent and non-independent processes in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I. linux Startup Process and sequence:
* Power up the computer and call bois settings.
* Bois calls the grub boot device in the Hard Disk Master Boot Record mbr.
* The grub boot loader calls the kernel for hardware detection and initialization.
* The kernel will call the first process init process in linux.
* The init process is called the parent process of the linux system, that is, the process calls all other sub-processes in the linux system,
* The user name and password,
II. Introduction to the init process:
* For the init process in linux, run the ps-e command to check whether the process number is 1, indicating that the process is the first started process,
Linux processes are called by the linux kernel,
* Other processes in linux must be called by the init process. Therefore, the init process is called as the parent process,
* Other linux processes must run according to the corresponding configuration file,
The other corresponding configuration files are/etc/inittab.
3. Introduction to the inittab configuration file:
1. The configuration file location of the init process
/Etc/inittab
2. Different Levels and descriptions of linux systems:
There are seven levels in the system: Level 1 2 3 4 5 6 0
Level 0 -- enter this level, the system will shut down all programs, and disconnect the power [shutdown]
Level 1 -- enter this level to allow only the root user to access, not the network. This level is used by the root user for system maintenance,
Level 2-linux's character-only interface mode, does not support the network, but supports multiple users to log on to the current system,
Level 3-linux's character-only interface mode, supports Network, supports multi-user login, linux system's various servers, usually
Run at this level,
Level 4 -- the linux system does not define this level,
Level 5-graphic interface for linux systems, usually used by beginners and graphics workstations,
Level 6-linux system will shut down all programs and restart the system,
3. Description of the inittab configuration file:
1) in this file, each row adopts the following format
No.: running level: trigger action: Run Command
2) Number and running level:
Number. In the/etc/inittab file, you only need to ensure that the number is not repeated. Generally, the number consists of 1 to 4 characters,
The running level refers to the level at which the current trigger action occurs. Only the specified level has this action,
To automatically execute specific commands,
3) trigger:
* Initdefault -- this action is the default entry level when linux is started.
You can change the level of the action from Level 5 to level 3,
* Sysinit -- this action is initiated when linux is started,
This action requires that a program/etc/rc. d/rc. sysinit be automatically executed.
* Wait -- enter the corresponding level and the corresponding command,
For example, 13: 3: wait:/etc/rc. d/rc 3
Indicates that the rc 3 command is automatically run once when Level 3 is entered.
Note: The rc 3 command calls all programs in the/etc/rc3.d directory. If these programs start with k
That is, the name of the object to be disabled,
* Ctrlaltdel -- at any level, press ctrl + alt + del on the keyboard to execute the command
/Sbin/shutdown-t3-r now the command is to immediately restart the computer,
* Powerfail-when the ups notifies the external power-off, the corresponding command is executed, as shown in figure
This command will shut down the system after two minutes [Power Failure]
* Poweerokwait-when preparing to shut down the instance, if the ups notifies the external power to recover, the corresponding command,
For example,/sbin/shutdown-c indicates that the shutdown command is canceled and [the power supply is normal]
* Respawn-when a specified program ends, it will be executed again. This action is usually intended for virtual characters.
When you exit the first virtual character interface, the system runs the first virtual character interface again.
Character interface, requiring the user to log on, the corresponding command is/sbin/mingetty tty1
4. Introduction to independent processes and non-independent processes:
1. Independent processes:
* All independent processes and process scripts are stored in the independent process directory, that is,/etc/rc. d/init. d.
* All independent processes can be manually started and controlled by the system administrator, or the specified independent process can be enabled on the specified system
Level,
* For an independent process, whether or not a user accesses the process, it will always occupy system resources,
In general, independent processes are system programs that are mostly used and important,
2. Non-independent processes:
* All non-independent processes and their process scripts are stored in the directory of non-independent processes, that is,/etc/xinetd. d.
* Non-independent processes are usually processes that are rarely used and occupy less system resources,
When a user accesses the service, the system starts a non-independent process to provide services for the user.
Process,
Startx & ----- enter the GUI on the character-only interface
[1] [2] Next page