Hi Marc,
This is a general question on how to use SMP (and single-processor) Gambit:
If you're running some algorithm or other code that requires fine-granularity work stealing or otherwise parallel execution and/or data structure access, how are you supposed to implement that, in a way that should have good performance and be effective? -
Are mutex lock/unlock operations with zero-timeouts, and/or the use of condition variables, and/or the use of thread message passing with zero timeout, intended to satisfy these use cases, or do you propose other primitives or methods?
Also, do you plan to implement any additional parallelism primitives now with SMP Gambit?
Thanks!
Afficher les réponses par date
Zooming out, the memory ordering question is in here also.
Do you intend to implement a (barrier!) primitive for platforms with weak memory ordering?
2017-09-17 18:19 GMT+08:00 Adam adam.mlmb@gmail.com:
Hi Marc,
This is a general question on how to use SMP (and single-processor) Gambit:
If you're running some algorithm or other code that requires fine-granularity work stealing or otherwise parallel execution and/or data structure access, how are you supposed to implement that, in a way that should have good performance and be effective? -
Are mutex lock/unlock operations with zero-timeouts, and/or the use of condition variables, and/or the use of thread message passing with zero timeout, intended to satisfy these use cases, or do you propose other primitives or methods?
Also, do you plan to implement any additional parallelism primitives now with SMP Gambit?
Thanks!
And, Gambit's memory management's approach on memory alignment issues play in here even more now than before.
Learning to know your approach and any related hints would be great to understand how to approach this in Gambit on the user level.
Thanks! Adam
2017-09-17 22:25 GMT+08:00 Adam adam.mlmb@gmail.com:
Zooming out, the memory ordering question is in here also.
Do you intend to implement a (barrier!) primitive for platforms with weak memory ordering?
2017-09-17 18:19 GMT+08:00 Adam adam.mlmb@gmail.com:
Hi Marc,
This is a general question on how to use SMP (and single-processor) Gambit:
If you're running some algorithm or other code that requires fine-granularity work stealing or otherwise parallel execution and/or data structure access, how are you supposed to implement that, in a way that should have good performance and be effective? -
Are mutex lock/unlock operations with zero-timeouts, and/or the use of condition variables, and/or the use of thread message passing with zero timeout, intended to satisfy these use cases, or do you propose other primitives or methods?
Also, do you plan to implement any additional parallelism primitives now with SMP Gambit?
Thanks!
My end goal is to implement futures so that extremely fine-grained parallelism can be expressed. Load balancing with work stealing will be done efficiently with the message-passing protocol I designed for my PhD thesis. This used to work in Gambit when it had a M68000 code generator (back in the 90’s!). Basically, for fine-grained parallelism, use divide-and-conquer algorithms and the fork/join model. In Gambit Scheme the fork is (let ((x (future …))) …) and the join is (touch x) or (force x) or implicit if the system is built with --enable-auto-forcing. Read my thesis for details!
Talking about code generators… if anyone is interested in working on native code generators for Gambit let me know!
Marc
On Sep 17, 2017, at 6:19 AM, Adam adam.mlmb@gmail.com wrote:
Hi Marc,
This is a general question on how to use SMP (and single-processor) Gambit:
If you're running some algorithm or other code that requires fine-granularity work stealing or otherwise parallel execution and/or data structure access, how are you supposed to implement that, in a way that should have good performance and be effective? -
Are mutex lock/unlock operations with zero-timeouts, and/or the use of condition variables, and/or the use of thread message passing with zero timeout, intended to satisfy these use cases, or do you propose other primitives or methods?
Also, do you plan to implement any additional parallelism primitives now with SMP Gambit?
Thanks!