[erlang-questions] : Subtle behaviour of Erlang scheduler

Kenneth Lundin kenneth.lundin@REDACTED
Mon May 28 18:33:12 CEST 2007


We will add a better description about what the priority levels means and
how to use them. We will also add to the documentation that the use
of different priority levels than 'normal' is highly questionable.
The priority levels have been around for 10 years or more and the use
is to our knowledge VERY VERY RARE.

For all code in the Erlang/OTP distribution there are only
11 modules where process_flag(priority,Prio) is explicitly used.
Of these I would say that a handful of them can be questioned if they really
are necessary.


It is important that we make clear in the documentation how priorities work and
that you have little or no reason to use them.

I hope we can close this discussion now.

/Regards Kenneth (Erlang/OTP team at Ericsson)

On 5/28/07, David Hopwood <david.hopwood@REDACTED> wrote:
> Rickard Green wrote:
> > Raimo Niskanen wrote:
> >
> >> I guess the solution for the problem at hand would be to make
> >> sure all code for the high priority processes are loaded
> >> before they are started, e.g by calling Module:module_info/0
> >> on them. That trick is done by the code server itself
> >> to ensure it can start without a running code server.
> >
> > 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
> > account.
> I'm surprised at this conclusion. Most code should be able to consider the
> existence of the code server process as an implementation detail. Certainly
> the fact that this process runs at normal priority is an implementation
> detail. What other facts about the Erlang/OTP implementation might we need
> to know in order to be able to reliably run code at high priority?
> --
> David Hopwood <david.hopwood@REDACTED>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list