What is the difference between LWP and threads?
来源:互联网 发布:c语言编程图形 编辑:程序博客网 时间:2024/06/10 07:20
This explains the difference between LWP-Process-Thread:
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 private process 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 the Linux 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 achieve privilege 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.
- What is the difference between LWP and threads?
- what is the difference between processes and threads
- What is the difference between user level threads and kernel level threads?
- What is the difference between test, [ and [[ ?
- what is the difference between the setTimeout and setInterval
- What is the difference between DHTML and the DOM?
- What is the difference between the mouseover and mouseenter events?
- What is the difference between AWT and SWT?
- What is the difference between User Control and Custom Control?
- What is the difference between an EXE and a DLL?
- What is the difference between XML and C or C ?
- What is the difference between SMOD and CMOD?
- what is the difference between little-endian and big-endian.
- What is the difference between procedural and nonprocedural language?
- What is the difference between a thread and a process?
- What is the difference between objectForKey and valueForKey?
- What is the difference between Microsoft TMG and UAG ?
- What is the Difference Between http and https?
- 最终一致性
- 【并查集买一送一】Poj 2524——Ubiquitous Religions
- 一个父亲和儿子的故事 并查集相关内容
- openssl windows成功安装步骤
- shell 判断文件是否存在
- What is the difference between LWP and threads?
- web pdf操作
- MyEclipse6.5安装SVN插件
- js只trim
- PKIX path building failed
- COM组件介绍
- 千字文
- 为什么清理这么难
- 单链表翻转