Realtime capabilities?

Carlos Gaston Alvarez cgaston at moonqzie.com
Mon Sep 24 03:40:20 EDT 2001


Why there is a stack and a stackless python?
The cuestion is: why not using allways stackless?

Chau,

Gaston

----- Original Message -----
From: "Aahz Maruch" <aahz at panix.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Sunday, September 23, 2001 6:31 PM
Subject: Re: Realtime capabilities?


> In article <mailman.1001219305.22703.python-list at python.org>,
> Tim Peters <tim.one at home.com> wrote:
> >[Aahz Maruch]
> >>
> >> In other words, if the original poster is doing more than a tiny amount
> >> of I/O, standard Python/OS threads will probably beat Erlang processes
> >> for fairness, but if an application is almost completely
> >> compute-bound, Erlang will probably beat even Stackless Python.
> >
> >Why?  Scheduling fairness has nothing directly to do with speed, it has
> >to do with whether a process ready to run is assured to get a chance to
> >run "soon".  A process that needs to deliver a result within a given
> >time delta needs to know (at least) that it can't be swapped out for
> >longer than that time delta.  The speed of each process on its own is
> >at best a second-order effect on that, compared to the granularity
> >and fairness of the time-slicing policy, and especially when running
> >thousands of processes (which Erlang is designed for).  I *expect*
> >Erlang switches context more frequently than Stackless, so all else
> >being equal (which I'm sure it's not), it would be slower overall (due
> >to higher switching overhead, simply because switching more often) if
> >so.  Real-time has to do with getting specific pieces of work done by
> >specific times, not primarily with maximizing the amount of work done
> >per unit time (if the latter is your goal-- "peak speed" --best to stay
> >away from context switching entirely).
>
> Right, my point was a condensation of what you said earlier about Python
> only doing context-switching between bytecodes, assuming that "fairness"
> means "CPU time gets divided evenly between threads".  I said, "even
> Stackless" because it does context-switching more efficiently than
> regular Python.
>
> Oh, I see where the confusion is.  There was an implied "fairness"
> clause in my comment about Stackless, too.
> --
>                       --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)
>
> Hugs and backrubs -- I break Rule 6
http://www.rahul.net/aahz/
> Androgynous poly kinky vanilla queer het Pythonista
>
> We must not let the evil of a few trample the freedoms of the many.
> --
> http://mail.python.org/mailman/listinfo/python-list
>





More information about the Python-list mailing list