[erlang-questions] Subtle behaviour of Erlang scheduler
Sun May 27 00:54:44 CEST 2007
Corrado Santoro wrote:
> Ulf Wiger (TN/EAB) wrote:
>> BTW, where is it documented that 'high' and 'max'
>> are strict priorities, and does this still hold
>> true in an SMP environment (i.e. can one high
>> priority process starve all normal priority
> Indeed, this could be reasonable, IMHO, according to a "standard"
> priority system.
>> The code server is a pretty heavy process to
>> run on a blocking priority. One way to address
>> the problem would be to make all priorities
>> non-strict, right?
> Or to think about a priority inheritance/ceiling system. If we think
> that a gen_server is something like an object and that a gen_server:call
> is something like a method call, it is reasonable to assume that a
> process receiving a message handles it running with the same priority of
> the sending process. That is, not only the receiving process uses the
> reductions left by the sending proces, but also its priority. This
> should definitively solve the problem by means of a state-of-art approach.
That could be devasting to a system if a critical server inherits the
priority of the process which sent it a message. A low priority process
could then block the system by sending messages to critical servers,
which would then be blocked by normal level processes and potentially
hang the system.
Another problem would be to determine *when* the receiving process
actually inherits the priority. When the message arrives or when it is
On an SMP environment I would assume that the high priority processes
take as many run-queues as are needed and leave the rest, if any, to
lower priority processes. To completley block the system if they don't
use all the resources seems odd.
Wouldn't it be possible to have one blocking high priority, 'max', and
one which is non-blocking but is allowed in more often, 'high'. I don't
know if this is the case already.
More information about the erlang-questions