[erlang-questions] yet another way to communicate between processes

Morten Krogh mk@REDACTED
Fri Jan 21 13:56:25 CET 2011


Mutating Nifs, if that wasn't included in your list somehow.


Cpu usage:

Process A and B wants to communicate a bit. A starts a long computation 
a little before a predefined time if the bit is 1.
B probes the CPU by timing known functions, and can hence see if A is 
using the CPU.
This requires that A and B share CPU and that no other process starts a 
heavy job. The last one can be fixed by a more elaborate scheme. A, 
either do or don't start a
computation at various predefined times, that no other process randomly 
would hit. This also gives error correction.

Morten.




On 1/21/11 1:25 PM, Matthias Lang wrote:
> How many ways can processes communicate?
>
>    - Message passing, obviously.
>
>    - Going outside Erlang, e.g. through files, sockets, pipes, etc.
>
>    - ETS
>
>    - Hipe lets you destructively update binaries
>
> Today, I saw a new one: (ab)use erlang:process_info(Pid, dictionary) to
> read another process' process dictionary. user_drv:interfaces/1 does it.
>
> Matt
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>



More information about the erlang-questions mailing list