[erlang-questions] : Subtle behaviour of Erlang scheduler
Mon May 28 13:56:44 CEST 2007
On Mon, May 28, 2007 at 12:33:31PM +0200, Rickard Green wrote:
> Yes, this is the way to do it.
> We had a discussion about these things this morning at OTP, and we have
> decided to leave things as they are (no propagation of prios, and leave
> code server on prio normal).
> We reason like this: Priority levels other than normal, should normally
> not be used. When other priority levels are used, they have to be used
> with extreme care. The programmer have to take things like this into
Users can take into account drawbacks of using higher priorities only
if they actually KNOW those drawbacks, and how they can arise :-)
IMHO, users should not be requested to know so much about Erlang
internals to decide if they can or cannot use a feature made available
by the language (such as higher priorities) and reported in the
official documentation. And the work-around of calling module_info
before executing a high-prio process is not so elegant, indeed... :-(
A real fix of these subtle behaviours would be a better solution,
expecially because we're talking about the process scheduler, and not
about an ancillary library....
I think that the Erlang environment itself should act safely (since it
has been built with safety and robustness in mind...), and ugly
behaviours should be avoided or at least well documented, if it is
actually not safe or possible to avoid them.
I agree with you: priority system lacks at least a complete and
consistent documentation, together with a couple of tiny examples
which explain what can go wrong, and WHY some code could not work as
The discussion about priority propagation/inversion is not related
with those things: it is just a proposal to speed-up message-passing
and interactions among processes with different priorities, and has
nothing to do with the actual behaviour of the scheduler.
[ Enzo Nicosia aka KatolaZ --- GLUG Catania -- Freaknet Medialab ]
[ me [at] katolaz.homeunix.net -- http://katolaz.homeunix.net -- ]
[ GNU/Linux User:#325780/ICQ UIN: #258332181/GPG key ID 0B5F062F ]
[ Fingerprint: 8E59 D6AA 445E FDB4 A153 3D5A 5F20 B3AE 0B5F 062F ]
More information about the erlang-questions