Skip to main content
Topic: threads and LWP tutorial (Read 762 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

threads and LWP tutorial

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