[erlang-questions] Re: Shared/Hybrid Heap

Morten Krogh <>
Thu Oct 14 10:22:52 CEST 2010


>>
>
> You are missing the point -- or at least the point which I think 
> Richard is making. In the scheme you propose, T2's execution will be 
> influenced by a piece of data that _in principle_ is not shared. For 
> example, T2 needs to be stopped executing or synchronized with T1 by 
> garbage collection which might take place when process T1 allocates 
> some big D2.
>
> How is that different than the two processes sharing everything?
>
> Kostis

Kostis,

I don't understand you. Are you saying that it is impossible to 
implement multithreading unless the threads share everything, and 
garbage collection will be slow?

What about two erlang processes that share a binary. Isn't that how it 
works today?
What about two erlang processes that share a nif resource?
What about other languages and virtual machines. They have multithreading.

We must be talking past each other here.

By the way, I am not advocating such a change to erlang. I think you can 
get around shared memory by choosing the right processes, partition data 
correctly etc.
It is only the most computationally intensive cases where you can't, and 
there one can use a nif resource or some external way of sharing data.



More information about the erlang-questions mailing list