Brief introduction to Linux process concepts

Source: Internet
Author: User
The Linux operating system is intended for multiple users. At the same time, many users can issue various commands to the operating system.

Introduction

The Linux operating system is intended for multiple users. At the same time, many users can issue various commands to the operating system.

How does the operating system implement multi-user environments?

In modern operating systems, there are procedures and processes.

So what is a program and a process?

In general, a program is a file that contains executable code and is a static file.

A process is an instance of a program that starts execution but has not ended. Is the specific implementation of executable files.

A program may have many processes, and each process can have many sub-processes, which are cyclically generated.

After a program is called to the memory by the system, the system allocates certain resources (memory, devices, and so on) to the program, and then performs a series of complex operations to turn the program into a process for the system to call.

In the system, only processes have no programs. to distinguish different processes, the system assigns an ID (like our ID card) to each process for identification.

In order to make full use of resources, the system also classifies processes into five states: New, running, blocking, ready, and complete.

The process is being created.

The running process is running.

Blocking means that the process is waiting for an event.

Ready indicates that the system is waiting for the CPU to execute the command.

Completion indicates that the process has ended and the system is recycling resources.

========================================================== ======

Another way of saying [this is the information found on the internet and I don't know which one is correct]

There are 5 Processes in linux

1. run (running or waiting in the running queue)

2. interruption (in sleep, blocked, waiting for the formation or receipt of a signal of a condition)

3. do not interrupt (do not wake up when receiving the signal or do not run, the process must wait until there is an interruption)

4. Stiff (the process has been terminated, but the process descriptor exists until the parent process calls wait4 () and is released after the system call)

5. stop (the process stops running after receiving signals from SIGSTOP, SIGSTP, SIGTIN, and SIGTOU)

Five status codes used by the PS tool to identify a process

D. uninterruptible sleep (usually IO) cannot be interrupted)

R run runnable (on run queue)

S interrupt sleeping

T stop traced or stopped

Z dead a defunct ("zombie") process

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.