- Light-weight process
In computer
operating system s, a light-weight process (LWP) is a means of achieving multitasking. In contrast to a regular (full-blown) process, an LWP shares all (or most of) its logical address space and system resources with other process(es); in contrast to a thread, a light-weight process has its own privateprocess identifier and parenthood relationships with other processes.Moreover, while a thread can either be managed at the application level or by the kernel, an LWP is always managed by the kernel and it is scheduled as a regular process. One significant example of a kernel that supports LWPs is theLinux kernel .On most systems, a light-weight process also differs from a full-blown process, in that it only consists of the bare minimum execution context and accounting information that is needed by the scheduler, hence the term "light-weight". Generally, a process refers to an instance of a program, while an LWP represents a thread of execution of a program (indeed, LWPs can be conveniently used to implement threads, if the underlying kernel does not directly support them). Since a thread of execution does not need as much state information as a process, a light-weight process does not carry such information.
As a consequence of the fact that LWPs share most of their resources with other LWPs, they are unsuitable for certain applications, where multiple full-blown processes are needed, e.g. to avoid
memory leaks (a process can be replaced by another one) or to achieveprivilege separation (processes can run under other credentials and have other permissions).Using multiple processes also allows the application to more easily survive if a process of the pool crashes or is exploited.See also
*
Computer multitasking
*Thread (computer science)
*Process (computer science)
*Light Weight Kernel Threads External links
* [http://moss.csc.ncsu.edu/~mueller/pthreads/threads-faq.html#5-5-Lightweight-process comp.programming.threads FAQ: Lightweight process]
Wikimedia Foundation. 2010.