Lightweight processes in Linux

Source: Internet
Author: User

In Linux, a lightweight process can be a process, or it can be a thread. What we call threads, in Linux, is actually the lightweight process of sharing code snippets, file descriptors, signal processing, global variables when;

If not shared, it is what we call a process.

A process is the smallest unit of resource management, and a thread is the smallest unit of program execution. In the design of the operating system, the main purpose of the process evolution is to reduce the cost of multi-process context switching.

The initial process definition contains the program, the resource and its execution three parts, in which the program usually refers to the code, resources at the operating system level usually includes memory resources, IO resources, signal processing and other parts,

The execution of the program is generally understood as the execution context, including the CPU footprint, which later evolved into a thread. In order to reduce the overhead of process switching, the operating system designers gradually corrected the process before the thread concept appeared

concept, gradually allowing the resources occupied by the process to be stripped out of its principal, allowing some processes to share some of the resources, such as files, signals, data memory, and even code, to develop the concept of a lightweight process.

The Linux kernel has already implemented a lightweight process in the 2.0.x version, and the application can use a unified clone () system call interface, with different parameters to specify whether to create a lightweight process or a normal process.

Lightweight processes in 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.