(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