Boost logo

Boost :

Subject: Re: [boost] [stratified] library for micro-/userland-threads
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-07-02 07:13:38


> Just a few comments from a first glimpse at the library:
> - It is not really thread safe (for example the static scheduler
> initialization and the spawning of new stratums)

you missunderstood for what boost.stratified was intended for.
a stratum is a userland-thread which means it runs during its live-time only in one thread - cooperativly scheduled. you can not migrated a stratum between threads.

> - It would be nice if the whole scheduling of stratums would be more
> transparent and configurable to for example deal with different multicore
> architectures.

see above - it runs only on one core, in one thread.

> - Lightweight synchronization primitives are missing

what about the mutex, condition- and event-variables? the objects in boost.stratified use context switching (boost.context) which consumes ca. 40 CPU cylces.

> And now for the shameless plug ... if you are looking for something that
> does all this, you might want to take a look at HPX
> (http://stellar.cct.lsu.edu)

Yes, I know the work on HPX, but it is intended for other purposes.

boost.stratified as well as boost.context is a derived from my previous library - boost.task (started in 2006/2007 as boost.defere/boost.threadpool etc.).
Because I was ask to provide the implementation details regarding to context switching/userland-threads (used inside a threadpool -> work stealing) as separate libraries, I refactored the code and boost.context/boost.stratified are the results.

> It has all the features described above and more (for example support
> for distributed memory machines through a global address space).

boost.stratifed does not focus on the features of HPX.

> P.S.: the code in the archive doesn't compile for me (boost trunk, gcc
> 4.7 and intel 13 beta)

was tested with boost 1.49 only - but the archive is updated and should work now

best regards,
Oliver


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk