lightweight-processes

What the difference between lightweight process and thread?

戏子无情 提交于 2019-12-20 10:32:57
问题 I found an answer to the question here. But I don't understand some ideas in the answer. For instance, lightweight process is said to share its logical address space with other processes. What does it mean? I can understand the same situation with 2 threads: both of them share one address space, so both of them can read any variables from bss segment (for example). But we've got a lot of different processes with different bss sections and I dunno how to share all of them. 回答1: From MSDN,

Erlang - map each “erlang process” to new kernel thread

前提是你 提交于 2019-12-11 08:54:16
问题 I am studying an erlang based system, and trying to analyze the sequence of events that take place in the system. Is there a way to force erlang run-time or the elang vm to create a new kernel thread, each time "spawn" is called. This would make the system slower, but it would make the study a lot easier. I have tried the +S flag, and enabled smp already, but I suspect the system is still mapping multiple processes to one kernel thread, or erlang scheduler. Are there any inputs/configuration

What other systems beside Erlang are based on “Green Processes”?

喜欢而已 提交于 2019-12-06 03:17:35
问题 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. 回答1: Regarding the whole "green thread" as a name, see

What the difference between lightweight process and thread?

橙三吉。 提交于 2019-12-02 23:01:59
I found an answer to the question here . But I don't understand some ideas in the answer. For instance, lightweight process is said to share its logical address space with other processes. What does it mean? I can understand the same situation with 2 threads: both of them share one address space, so both of them can read any variables from bss segment (for example). But we've got a lot of different processes with different bss sections and I dunno how to share all of them. From MSDN, Threads and Processes : Processes exist in the operating system and correspond to what users see as programs or

What's the difference between “green threads” and Erlang's processes?

自作多情 提交于 2019-11-30 14:00:58
问题 After reading about Erlang's lighweight processes I was pretty much sure that they were "green threads". Until I read that there are differences between green threads and Erlang's processes. But I don't get it. What are the actual differences? 回答1: Green Threads can share data memory amongst themselves directly (although synchronization is required of course). Erlang doesn't use "Green Threads" but rather something closer to "Green Processes": processes do not share data memory directly but

Haskell lightweight threads overhead and use on multicores

与世无争的帅哥 提交于 2019-11-28 15:16:16
I've been reading the "Real World Haskell" book, the chapter on concurrency and parallelism. My question is as follows: Since Haskell threads are really just multiple "virtual" threads inside one "real" OS-thread, does this mean that creating a lot of them (like 1000) will not have a drastic impact on performance? I.e., can we say that the overhead incurred from creating a Haskell thread with forkIO is (almost) negligible? Please bring pactical examples if possible. Doesn't the concept of lightweight threads prevent us from using the benefints of multicore architectures? As I understand, it is

Haskell lightweight threads overhead and use on multicores

心不动则不痛 提交于 2019-11-27 09:07:39
问题 I've been reading the "Real World Haskell" book, the chapter on concurrency and parallelism. My question is as follows: Since Haskell threads are really just multiple "virtual" threads inside one "real" OS-thread, does this mean that creating a lot of them (like 1000) will not have a drastic impact on performance? I.e., can we say that the overhead incurred from creating a Haskell thread with forkIO is (almost) negligible? Please bring pactical examples if possible. Doesn't the concept of

Technically, why are processes in Erlang more efficient than OS threads?

放肆的年华 提交于 2019-11-26 15:35:37
Erlang's Characteristics From Erlang Programming (2009): Erlang concurrency is fast and scalable. Its processes are lightweight in that the Erlang virtual machine does not create an OS thread for every created process. They are created, scheduled, and handled in the VM, independent of underlying operating system. As a result, process creation time is of the order of microseconds and independent of the number of concurrently existing processes. Compare this with Java and C#, where for every process an underlying OS thread is created: you will get some very competitive comparisons, with Erlang

How, if at all, do Erlang Processes map to Kernel Threads?

℡╲_俬逩灬. 提交于 2019-11-26 09:18:47
问题 Erlang is known for being able to support MANY lightweight processes; it can do this because these are not processes in the traditional sense, or even threads like in P-threads, but threads entirely in user space. This is well and good (fantastic actually). But how then are Erlang threads executed in parallel in a multicore/multiprocessor environment? Surely they have to somehow be mapped to kernel threads in order to be executed on separate cores? Assuming that that\'s the case, how is this

Technically, why are processes in Erlang more efficient than OS threads?

对着背影说爱祢 提交于 2019-11-26 04:29:18
问题 Erlang\'s Characteristics From Erlang Programming (2009): Erlang concurrency is fast and scalable. Its processes are lightweight in that the Erlang virtual machine does not create an OS thread for every created process. They are created, scheduled, and handled in the VM, independent of underlying operating system. As a result, process creation time is of the order of microseconds and independent of the number of concurrently existing processes. Compare this with Java and C#, where for every