[erlang-questions] Erlang internal scheduler implementation

Björn-Egil Dahlberg <>
Wed Jul 21 15:23:39 CEST 2010

On 2010-07-21 14:53, Ulf Wiger wrote:
> - The latest versions of OTP implement process migration
> between schedulers to prevent schedulers from running
> out of work (if they do, they will busy-loop for a while
> in order to avoid having to suspend and wake up the OS
> thread unnecessarily). The AFAICT wholly undocumented
> process_flag(scheduler, No) binds a process to a specific
> scheduler so that it cannot be migrated, presumably to
> allow for process affinity.
> ...or at least that's what I imagine that it ought to be
> doing. The value cannot be inspected, and at first sight,
> I couldn't find a way to 'unbind' a process again, so
> perhaps we should just ignore this facility for now? :)

It is actually there for testing only and there isn't a way to unbind 
it. Process to scheduler affinity will probably be a bit more automatic.

// Björn-Egil

More information about the erlang-questions mailing list