Question on Hard Switching and Soft Switching
Hi Folks: As a part of an up-coming talk, I have been reading more about that happens under the hood. For instance "The Essentials of Stackless Python." The terms 'hard switching' and 'soft switching' constantly appear. 'Soft' switching is defined as cooperating switching. I will assume this is associated with a 'stackless.schedule()' or a blocked on channel. Hard switching is defined as brute-force. However what is brute-force? Is this when Stackless is in pre-emptive mode and one is relying on the ticks? Cheers, Andrew
Hi Andrew, On Tue, Sep 29, 2009 at 09:34:19AM -0700, Andrew Francis wrote:
The terms 'hard switching' and 'soft switching' constantly appear. 'Soft' switching is defined as cooperating switching. I will assume this is associated with a 'stackless.schedule()' or a blocked on channel.
Hard switching is defined as brute-force. However what is brute-force? Is this when Stackless is in pre-emptive mode and one is relying on the ticks?
This is a question for Stackless Python only, not PyPy, so you should post in that mailing list, not here :-) To answer it, it's not visible to the user: it's just two different implementations of switching. "Hard switching" is by actually moving part of the C stack away; "soft switching" is using a purely standard C approach. PyPy only has soft switching (but with the same Stackless interface). A bientot, Armin.
participants (2)
-
Andrew Francis
-
Armin Rigo