Threads

Francois-Rene Rideau fare@tunes.org
Sat, 16 Sep 2000 01:41:46 +0200


On Thu, Sep 14, 2000 at 12:47:24AM -0400, Derek L. VerLee wrote:
> Sorry if this is a dumb question.  What are the thoughts on threads and
> process schedualing in TUNES? [...]

The general point of view of TUNES is that as many low-level tactics
as considered useful may be declared, and that as grows in sophistication,
the system will dynamically choose whichever tactic seem better fit for
its current goals, according to higher-level strategies.

Generic threads may be defined in terms of linear continuations.
Light-weight continuations yield light-weight threads,
and may be used when everything is known (or otherwise assumed)
to be safe at compile-time.
heavy-weight continuations yield heavy-weight threads,
and hardware-protected continuations can be used
to virtualize some unsafe Tunes operations,
or to run the PIG Is GNU emulator.
Functions known to return in bounded time can be weaved together
without thread-switching, optimizing the shared use of temporary buffers.
Declarative programs may be compiled in code optimized for the number
of available processors (and their connection topology), with one thread
per processor; etc.

That's my way to say that we may do it all the ways:
eventually, the system must learn to dynamically decide for itself;
if you think some method is better than others in some cases,
you may tell the system about it.
As for the low-level bootstrap phase, we'll "just" map semi-low-level threads
into lightweight linear continuations using an instance of
a generic threading mechanism, just like our friend Kaufmann said
has been done in so many systems.

PS: I'm back from a nice meeting on Meta-Knowledge with Jacques Pitrat's
team. A reference I was given there that is relevant to this topic
is one to Yannick Parcheval's works on dynamic expert system optimization
(including data representation) through monitoring by a meta-system.
So once again, what I propose has already been done in the past.

Yours freely,

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
[  TUNES project for a Free Reflective Computing System  | http://tunes.org  ]
Never try not to think, it won't work. -- Tril