betreft:Re: [Stackless] Re: [Python-Dev] Stackless Design Q.

Christian Tismer tismer at tismer.com
Tue Feb 26 16:52:30 CET 2002


Gordon McMillan wrote:

> On 25 Feb 2002 at 17:13, Samuel Smith wrote:
> 
> 
>>I think you would want to have the option of making
>>the atomicity at a courser granularity than an
>>opcode. The old uthreads had atomic statements. So
>>you can wrapper a set of statements as being atomic. 
>>
> 
> A lightweight critical section mechanism would be
> nice.


Sure. Historical Stackless had that uthread_lock variable
which prevented it from switching.
The same thing will be implemented again.

Here what I'm at:

Tasklets can switch to each other explicitly. An implicit
switch only occours when the current tasklet returns
and vanishes.

Tasklets are members of proclets.
Proclets contain collections of tasklets.

Between proclets, there is preemptive scheduling by
a builtin scheduler.

The system starts with one default tasklet in one
default proclet.
The use is free to add more tasklets to the current
proclet or to create a new proclet.

Coroutines should always operate in their own proclet.

About the naming scheme:
I looked into the Alef user manual, where Brad Cox
directed me to.
They have "task" which is a bit like coroutines,
and "process" which is like a thread.

Please have a look at these pages:
http://plan9.bell-labs.com/who/rsc/thread.html
http://plan9.bell-labs.com/who/rsc/ug.pdf

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net/
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
      where do you want to jump 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