Stackless/microthreads merge news

Will Ware wware at world.std.com
Mon Mar 13 13:49:52 EST 2000


Konrad Hinsen (hinsen at cnrs-orleans.fr) wrote:
> Indeed. But what then are the applications for which one might
> profitably use microthreads? ...Or is it memory efficiency that you
> are aiming for?

Memory efficiency is a big part of it, and context switching should
presumably be faster (tho I haven't clocked it). What motivated my
interest in microthreading was a wish to run thousands or tens of
thousands of threads simultaneously, which started when I went to a
talk by Gerald Sussman on amorphous computing, described at
http://www.swiss.ai.mit.edu/projects/amorphous/
Sussman and his group are interested in studying computing architectures
where so many processors are networked together that you would never
bother to explicitly address a single processor, but just treat them
as a continuous computing substrate. In simulation, however, you still
need to model each of the processors.

Another application that interests me is trying to simulate
microeconomic behavior. There is some work going on in this area now,
mostly following the "artificial life" tradition, designing
economic agents who learn to transact with one another in an abstract
world (e.g. http://www.brook.edu/sugarscape/). I think it would be
more interesting to base models on empirically observed behavior of
real people and businesses.

Games are another possible class of applications. Microthreads would
allow you to code up the behaviors of game characters as independent,
simultaneous actors. These might be spaceships, or staggering zombie
brain-eaters, or Pacman monsters, or naval ships.

The reasons microthreads would be a win in these situations is that
(1) you can practically run several thousand of them simultaneously,
and (2) syntactically they are fairly painless, and therefore good for
the kind of experimental tinkering somebody might do with simulators or
games where raw performance isn't yet a critical need. The complexities
of OS threads probably mean that you wouldn't casually throw hundreds
of them at a back-of-the-envelope simulation.
-- 
 - - - - - - - - - - - - - - - - - - - - - - - -
Resistance is futile. Capacitance is efficacious.
Will Ware	email:    wware @ world.std.com



More information about the Python-list mailing list