Classification and characteristics of Linux threading mechanisms

Source: Internet
Author: User

(1) User-level threading

The main solution is the problem of context switching, its scheduling algorithm and scheduling process will be all by the user to resolve, at run time do not need a specific kernel support. The operating system often provides a line libraries of user space, which provides the ability to create, schedule, and revoke threads, while the kernel still manages the process. If a thread in a process calls a blocked system call function, the process includes threads that are also blocked at the same time. The main disadvantage of this user-level thread is the inability to perform multiprocessor benefits in the scheduling of multiple threads in a process.

(2) Lightweight process

A lightweight process is a user thread supported by the kernel and an abstract object for kernel threads. Each thread has one or more lightweight threads, and each lightweight thread is bound to one kernel thread, respectively.

(3) Kernel thread

This thread does not allow threads in different processes to be dispatched according to the same relative priority scheduling method, so that the multi-processor concurrency advantage can be played.


Process is the basic unit of program execution and resource allocation in the system.

Each process has its own data segments, code snippets, and stack segments.



Classification and characteristics of Linux threading mechanisms

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.