[erlang-questions] : Subtle behaviour of Erlang scheduler
Ulf Wiger (TN/EAB)
ulf.wiger@REDACTED
Wed May 30 14:16:33 CEST 2007
Rickard Green wrote
>
> for that, since we do not consider the behavior
> a bug. I don't say that the priority management
> cannot be improved, it probably can, but
> currently it has low prio compared to other things.
What would be interesting, though, would be to do
a deeper analysis of scheduling behaviour in
SMP Erlang. As you pointed out before, high prio
processes don't necessarily starve normal prio
processes in SMP, even if they busy-loop.
One *could* also imagine extending the SMP
scheduler to make use of more sophisticated
priority schemes, e.g. on a real-time kernel.
(Not to foregoe the conclusion as to whether
this would actually be useful - I don't know.)
If this is at least described now, it is unlikely
to break legacy code more than SNMP already does.
John Hughes previously pointed out that the single-
threaded scheduler is deterministic to the point
of it being a slight problem for QuickCheck. With
SMP, the problem is the opposite: how to to
deterministic simplification of concurrency-oriented
test cases...(*) just as an example of how scheduling
in SMP is subtly different from that in old Erlang.
(*) Of course, the recommendation has always been to
regard the scheduler as preemptive, and expect your
code to be preemptable whenever possible (that is,
between any two operations), so in that sense, SMP
merely makes good on this promise. (:
BR,
Ulf W
More information about the erlang-questions
mailing list