[CCC DEV] Ideas on work stealing multicore scheduler for tvm

Carl Ritson C.G.Ritson at kent.ac.uk
Wed Aug 31 09:50:02 BST 2011


Sorry my reply is a little late on this.

> As you may have heard I will be implementing Carl's wait-free work
> stealing scheduler in the transterpreter virtual machine. I just
> wanted to email the list with my plan of attack to see if anyone has
> any comments thoughts or ideas before I really get going in one
> direction.

Sounds good.

> The next step would be to remove the use of pthreads. Currently I
> (Matt and I) am leaning toward llvm libraries because it would provide
> access to low level primitives for concurrency and such while still
> maintaining some level of portability (to machines which have an llvm
> back end).  This is still very up in the air and if anyone has any
> ideas please let me know.

You'll probably still want to use pthreads for a number of things
(creating and managing threads).
I assume you mean remove the use of pthreads for communicating and
synchronizing the schedulers?
It's probably obvious, but the approach I've taken with this in the
past is to wrap pthread functions up and abstract them away, so
nothing uses pthreads directly.
This gives you scope to play with reimplementing them, slotting in
your own code, once you have something working with pthreads.

Hope you're making progress.

Carl



More information about the developers mailing list