


What are the three categories of processes in Linux?
Processes in Linux are generally divided into three categories: "interactive process", "batch process" and "monitoring process". An interactive process is a process started by a Shell; an interactive process can run in the foreground or in the background. The batch process has no connection with the terminal and is a sequence of processes. The monitoring process, also called a daemon process, is a special process that runs in the background and is not controlled by any terminal. It is used to perform specific system tasks.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
What is a process
A process is a program or command being executed. Each process is a running entity and has its own address space and occupy certain system resources. Once a program is run, it is a process.
A process can be seen as an instance of program execution. A process is an independent entity allocated system resources, and each process has an independent address space. One process cannot access the variables and data structures of another process. If you want one process to access the resources of another process, you need to use inter-process communication, such as pipes, files, sockets, etc.
Process classification
In the Linux operating system, processes can be roughly divided into 3 different types, each Each process has its own characteristics and attributes.
Interactive process: A process started by a Shell. The interactive process can run in the foreground or in the background.
Batch process: This process has no connection with the terminal and is a sequence of processes.
Monitoring process: Also called daemon process, it is a special process that runs in the background and is not controlled by any terminal. It is used to perform specific system tasks.
The composition of the process
A process contains a part of the address space and a series of data structures in the kernel. The address space is a part of the memory marked by the kernel for use by the process, and the data structure is used to record the specific information of each process.
The most important process information includes:
The address space map of the process
The current status of the process (sleeping, stopped , runnable, etc.)
Execution priority of the process
Resource information called by the process
Information about files and network ports opened by the process
Signal mask of the process (indicates which signals are blocked)
Owner of the process
Process status
-
Runnable status
: The process is running at this time Or waiting in the running queue to prepare to run -
Waiting state (blocking state)
: At this time, the process is waiting for an event to occur or some system resource. In the Linux system, the waiting state is subdivided into two waiting states: interruptible waiting state and uninterruptible waiting state -
Interruptible waiting state
: A process in an interruptible waiting state can be interrupted by a certain signal
-
-
Uninterruptible waiting state
: In an uninterruptible waiting state The process is not disturbed by signals and will always wait for the occurrence of an event or some system resource
-
-
Suspended state
: The process in the suspended state is suspended -
Zombie state
: Each process will be in a zombie state after running, waiting for the parent process to call and then release system resources. The process in this state has finished running, but its parent process is still Its system resources are not released
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of What are the three categories of processes in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

vscode built-in terminal is a development tool that allows running commands and scripts within the editor to simplify the development process. How to use vscode terminal: Open the terminal with the shortcut key (Ctrl/Cmd). Enter a command or run the script. Use hotkeys (such as Ctrl L to clear the terminal). Change the working directory (such as the cd command). Advanced features include debug mode, automatic code snippet completion, and interactive command history.

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

Writing code in Visual Studio Code (VSCode) is simple and easy to use. Just install VSCode, create a project, select a language, create a file, write code, save and run it. The advantages of VSCode include cross-platform, free and open source, powerful features, rich extensions, and lightweight and fast.

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

Causes and solutions for the VS Code terminal commands not available: The necessary tools are not installed (Windows: WSL; macOS: Xcode command line tools) Path configuration is wrong (add executable files to PATH environment variables) Permission issues (run VS Code as administrator) Firewall or proxy restrictions (check settings, unrestrictions) Terminal settings are incorrect (enable use of external terminals) VS Code installation is corrupt (reinstall or update) Terminal configuration is incompatible (try different terminal types or commands) Specific environment variables are missing (set necessary environment variables)
