1: Process: An in-memory program + program required data + hypervisor for various status information.
2: The process is managed by the kernel, the kernel uses the scheduler, gives the process a time slice to run, and then switches to the next process.
3: Process Fork
Fork: Create a child process wait: force the process to pause, and so on another process finishes exec: Change the program that the current process executes (starts a program in the current process) exit: Terminates the current process kill: kills a process
4: Differentiate parent process or child process
The parent process calls fork to return the process ID of the child process;
The child process calls fork to return 0.
5: The source of the system process--init process
During the system boot process, the kernel manually creates an idle process #0, the idle process creates the initialization process # #, then is in an infinite loop state and does nothing, so it is not found on the process table and is not considered to exist.
While the process of the kernel of the relevant settings and the end of the boot-related operations, during this time to open the console , mount the file system , run the system initialization script , etc., process of the outstanding multi-sub-process, So become the init process.
When any child process in the system becomes an orphan process, the INIT process automatically takes over the role of the parent process to ensure that the child process ends normally.
6: Foreground process and background process
Foreground process: After startup, the shell waits for its end to run.
Background process: After startup, the process runs in the background, and the shell waits for the next command directly.
Command &: Add & After command to make the program perform as a background process
7: Process hibernation
Sleep time [s,m,h,d]
8: Job Control
9: Job suspend and resume
In the currently running job, press ^z to suspend the job and enter the FG recovery job.
Suspend and resume of 10:shell
Suspend: Suspending shell
FG: Recovery
11: Show All current jobs
Jobs
12: Resume Job (move to foreground)
FG Job
13: Move the job to the background
BG%job
14: View process information, status
Ps
15: Kill the process
Kill Pid|jobid
16: Low-priority operation
Nice command
17: Daemon
"Unix&linux University Course" Study note seven: Process and job control