[erlang-questions] Erlang newbie questions

Ulf Wiger ulf.wiger@REDACTED
Tue Oct 18 12:26:14 CEST 2011


On 18 Oct 2011, at 12:20, Joe Armstrong wrote:

> On Tue, Oct 18, 2011 at 11:53 AM, Ulf Wiger
> <ulf.wiger@REDACTED> wrote:
>> 
>> On 18 Oct 2011, at 11:47, Joe Armstrong wrote:
>> 
>> Mutithreaded C implies some kind of data exchange between
>> different C threads - now there are many ways to do this - the
>> cleanest alternative
>> is by copying message passing. The dirtiest - is by shared memory and
>> mutexes.
>> 
>> I beg to differ. The dirtiest way is by shared memory *without* mutexes.
> 
> You mean ... I didn't know that was possible - I though emacs detected
> this and you were instantly
> fired and your house set on fire, and your bones melted down for glue
> and so on …

Like I said… dirty.

I recall an admonition from a seminar on programming for multicore:

"You cannot use priorities for mutual exclusion!"

Presumably, this technique is commonly used, since it was deemed necessary to point out especially that this is not safe on a multicore machine.

http://www.chibios.org/dokuwiki/doku.php?id=chibios:guides:mutual_exclusion_guide#priority_boost

BR,
Ulf

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111018/55cf8473/attachment.htm>


More information about the erlang-questions mailing list