[Stackless] CSP functionality
Christian Tismer
tismer at tismer.com
Tue Jul 1 01:31:31 CEST 2003
Hi Tom,
> I have read with interest Christian's comments on the website about
> Limbo and CSP ideas.
Still valid, but nothing but reading happened, yet.
> Do you still intend to move in this direction Christian? If so, I might
> be able to offer some pointers and some help.
Great!
> I am a PhD student under Peter Welch at the university of Kent, UK
> (although I'm now an external student living in the US). At Kent I've
> worked extensively on CSP related technologies. Do you know of Peter
> Welch? He is one of the best minds of the academic CSP scene.
>
> Kent publishes JCSP (open source), a library providing CSP primitives
> for Java, implemented on top of Java's threads and wait/notify. It's a
> very full implementation which includes PAR and ALT.
>
> http://www.cs.kent.ac.uk/projects/ofa/jcsp/
Yes, I have read a lot about it, quite some while ago.
Unfortunately, this isn't the only implementation,
and there are other ways to do it. I was just unable
to judge *which* way is the way to go, so I didn't go at all.
> Although I'm very new to Stackless, I'm guessing it would be possible to
> port JCSP to Stackless. This would be a good thing to do, because JCSP
> was a lot of work, and this stuff is *hard* to get right (especially the
> ALT - there is now a formal proof of correctness for the JCSP ALT
> (limited to 2 clients))
Hmm. After what I read in the TCSP book, it seems to be true that
the whole theory is proven, and I could do better. Am I mislead?
> The main question is, what synchronization primitives does Stackless
> provide? If it has monitors (wait/notify), then porting JCSP should be
> fairly straightforward.
Stackless has Limbo-like channels, or a subset of that.
> Going further, it may be possible to improve on the JCSP implementation.
I'd like to see a sketch of this idea.
> I understand that micro-threading in Stackless is pre-emptive, but if
> there is a way to have an atomic block of code where there can be no
> scheduling, then significant improvements to the JCSP algorithms are
> possible. This was not possible in Java, as there was no way to have an
> uninterruptible block.
All scheduling in Stackless is in the user's hand. (S)he may use
exlicit scheduling or pre-emptive scheduling (currently being
developed), and in the latter case, there is an atomic construct
to prevend certain blocks from being interrupted.
And if something is missing, I can surely build it in. :-)
ciao - chris
--
Christian Tismer :^) <mailto:tismer at tismer.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
_______________________________________________
Stackless mailing list
Stackless at www.tismer.com
http://www.tismer.com/mailman/listinfo/stackless
More information about the Stackless
mailing list