除了 Erlang 之外,还有哪些系统是基于“绿色流程”的?
我正在 Green Thread (Wikipedia) 上阅读此信息页面,我想知道:还有哪些其他编程系统依赖 Erlang 之外的“绿色进程”?
编辑:“绿色线程!=绿色进程”
基于
- Erlang
- Inferno
绿色线程基于
- Go
Native进程基于
- C,C ++
更新:没有人回答直接回答这个问题,所以我接受了一个答案,该答案为我提供了有关绿色流程的更多信息。
I was reading this informative page on Green Thread (Wikipedia) and I wonder: what other programming systems rely on "green processes" beside Erlang?
Edit: " Green Thread != Green Process "
Green Process based
- Erlang
- Inferno
Green Thread based
- Go
Native Process based
- C, C++
Updated: Nobody answered the question directly and so I have accepted an answer that provided me with more information with regards to Green Processes in general.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
关于整个“绿线”的名称,请参阅这篇文章的评论:
我希望我们可以使用操作系统中的术语,例如线程的用户空间与内核调度。毕竟,这是操作系统级别的区别。 “绿色线程”这个名字只是Java的历史。
Regarding the whole "green thread" as a name, see comments on this post:
I wish we could use the terminology from operating systems instead, e.g. user-space vs kernel scheduling of threads. After all, it is an operating system level distinction. The name "green thread" is only Java history.
据我了解,这些“绿色进程”其实和绿色线程没有本质区别。缺乏共享状态是由语言设计造成的,而不是由任何技术或巨大的概念差异造成的。 Erlang 简单地说:
因此,两个进程无法访问相同的内存,即使它们可能在操作系统级别共享虚拟内存(我猜这使得 Erlang 更容易在没有操作系统级别线程的体系结构上实现)。
As I understand it, these "green processes" are in fact not fundamentally different from green threads. The lack of shared state results from the language design, not from any technolgical or huge conceptual difference. Erlang simply:
Thus, there is no way for two processes to access the same memory, even though they might have shared virtual memory on the OS level (which I guess makes Erlang easier to implement on architectures that don't have OS-level threads).
Java 直到 1.2 才使用它们。然后他们意识到,调度两次的较轻线程效率并不高。
Java used them until 1.2.. then they realized that having a lighter thread that is scheduled twice wasn't so efficient.
现在,还有 Rust(参见 rust-lang.org),它有一个用于 N:M 线程的模块和一个用于内核线程的模块。
Now, there is also Rust (see rust-lang.org) which has a module for N:M threads and one for kernel threads.