[gambit-list] Memory ordering considerations in Gambit SMP?

Marc Feeley feeley at iro.umontreal.ca
Mon Nov 13 08:44:18 EST 2017


> On Nov 11, 2017, at 5:13 PM, Adam <adam.mlmb at gmail.com> wrote:
> 
> Dear Marc,
> 
> Are there any constraints on what underlying hardware platform SMP Gambit can work on, e.g. architectures with strong memory ordering (AMD64) versus architectures with weak memory ordering (ARM64)?

No foreseen constraints.

> 
> Does Gambit export any memory barrier primitive?

No

> 
> Do any particular Gambit primitives imply a memory barrier, so these are abstracted away from the user?

mutex-lock! and there might be others…

> 
> E.g. (thread-send! t (list 1 2 3)) would imply a memory barrier on weakly ordered systems, if t is being executed on another OS thread, so that when the message is received on the other side, Gambit has automatically ensured that the structure is actually accessible on the receiving end?

This should work.  If it doesn’t please submit an issue report.

Marc

> 
> (https://en.wikipedia.org/wiki/Memory_ordering#Runtime_memory_ordering)
> 
> Will appreciate a lot to understand how to manage this.
> 
> Thanks!
> Adam




More information about the Gambit-list mailing list