(013) The process of Linux

Source: Internet
Author: User

Fundamentals of the ten-year OPS series-Linux

Zeng Lin

Contact: [Email protected]

Website: www.jplatformx.com

Copyright: Please do not reprint the article without permission

First, Introduction

Modern operating systems typically support multi-tasking (multitasking). Multitasking refers to the simultaneous execution of multiple tasks by quickly switching between running programs. The Linux kernel manages multiple tasks by using processes. A process is a form of organization that Linux uses to schedule different programs to wait for CPU scheduling.

Ii. How the process works

When the system starts, the kernel first initializes some of its programs to the process, and then runs a program that becomes init. The INIT program will run a series of shell scripts called script initialization (placed in the/etc directory), which will start all system services. Many of these services are implemented through the Daemon (daemon program). and backstage programs just stay in the background and do their own thing, and there's no user interface. Therefore, even if no user is logged in, the system is busy executing some routines.

Running a program can trigger other programs to run, and in a process system such a situation is expressed as a parent process that creates a child process.

The kernel saves the information for each process to ensure that the task is in order. For example, each process will be assigned a number called the process ID (PID). Process IDs are allocated in ascending order, and the PID of the INIT process is always 1. The kernel also records the memory information assigned to each process and the process readiness information used to recover the run. Similar to the file system, there are owners, user IDs, valid user IDs, and so on in the process system.

(013) The process of Linux

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.