[Gecode] Sharing between original and clones

Christian Schulte schulte at imit.kth.se
Thu Oct 21 14:07:19 CEST 2004


Dear all,

as you might recall a recent observion is that Gecode is by construction
ready for concurrent and parallel search: no state is changed between spaces
created by cloning. No sharing means that no means for synchronization have
to be taken and that all complexity for concurrency control can be safely
delagted to the search engine.

However, this is not as clear as it seems... Consider as an example a
reference counted data structure (such as a domain specification shared
among clones of a propagator etc): reference counting requires concurrency
control (as is well known). Many other examples of course exist: shared
resources where sharing involves some form of management.

Therefore I extended copying of spaces by an additional bool argument that
tells whether resources are to be shared or not. That means that clone()
takes an optional boolean argument. If it is true things work as before, if
it is false (for example when a space is to be created to be executed in
adifferent thread) a true copy is attempted resolving sharing.

What I didn't due so far is to adapt domain specifications. It will follow
shortly. Please reconsider also the propagators you did whether sharing
needs to be taken into account. For an example look to the regular
propagator which shares DFAs.

Christian

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 





More information about the gecode-users mailing list