threads branch status update

Stefan Seifert nine at detonation.org
Mon Apr 16 14:50:01 UTC 2012


Dear parrot developers,

I made a lot of progress on the threads branch these past few months. 
Threading works as outlined in my bachelor's thesis at: 
http://niner.name/Hybrid_Threads_for_the_Parrot_VM.pdf

The branch is up to date with regards to the current master. It passes 
fulltest with gcc and g++ on my machine. It also passes Rakudo's spectest 
except for a failure in t/spec/S11-modules/require.t which I also see in 
master.

Using moritz++' mandelbrot-color.pl on an optimized Parrot build as a 
benchmark I could not measure any performance degradation. In fact threads was 
even a bit faster than master, but this is surely within the error margin.

I got a couple of test programs in examples/threads which demonstrate how to 
use the new threading capabilities.

Though the threading support itself uses the old OS abstraction macros and 
thus should work on Windows as well, green threads still don't. And since 
green threads are used for supporting threading, there's still no progress 
there. On the other hand, there's not much that's missing: we just need 
replacements for POSIX alarms and pipes. In other words: some timer and a 
means for having threads block and wait for new work if idle so they don't 
burn CPU. Sounds like standard threading tutorial examples and a quick fix for 
someone with a Windows programming environment handy.

So I guess it's time to throw a couple of more eyeballs at this branch. It 
will also offer plenty of opportunity for further improvements. It's got 
everything from a beginner's exercise like making the number of threads 
configurable or even auto-tuned to the number of available CPU cores to 
challenges like getting rid of the locks in the GC.

And of course, simply using it in real programs will turn up some hidden bugs 
and limitations which might warrant some fixes as well ;)

Regards,
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20120416/505e8149/attachment.asc>


More information about the parrot-dev mailing list