Artix Linux Forum

Artix Linux => Tutorials and HOWTOs => Topic started by: mrbrklyn on 30 October 2019, 12:52:55

Title: threads and LWP tutorial
Post by: mrbrklyn on 30 October 2019, 12:52:55
https://opensourceforu.com/2011/08/light-weight-processes-dissecting-linux-threads/

Quote
What is a Light-Weight Process?

An LWP is a process created to facilitate a user-space thread. Each user-thread has a 1Ɨ1 mapping to an LWP. The creation of LWPs is different from an ordinary process; for a user process ā€œPā€, its set of LWPs share the same group ID. Grouping them allows the kernel to enable resource sharing among them (resources include the address space, physical memory pages (VM), signal handlers and files). This further enables the kernel to avoid context switches among these processes. Extensive resource sharing is the reason these processes are called light-weight processes.

Nice coding example included