[erlang-questions] Why system_flag(scheduler_bind_type) is deprecated?

Rickard Green rickard@REDACTED
Thu Dec 27 00:45:54 CET 2012


On Dec 26, 2012, at 5:46 PM, Max Lapshin <max.lapshin@REDACTED> wrote:

> Mac OS X:
> 
> $ erl +sbt s
> setting scheduler bind type 's' failed: not supported
> Usage: beam.smp [flags] [ -- [init_args] ]
> ...
> $ erl -sbt s
> Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:4:4] [async-threads:
> 0] [hipe] [kernel-poll:false] [dtrace]
> 2> erlang:system_info(scheduler_bindings).
> {unbound,unbound,unbound,unbound}
> 
> 
> 
> Linux:
> 
> $ erl +sbt s
> Erlang R15B (erts-5.9) [source] [64-bit] [smp:8:8] [async-threads:0]
> [hipe] [kernel-poll:false]
> 
> Eshell V5.9  (abort with ^G)
> 1> erlang:system_info(scheduler_bindings).
> {0,1,2,3,4,5,6,7}
> 
> 
> Setting this flag +sbt doesn't allow me to launch code under mac os.
> How should I change system_flag/2 call to this flag?

Neither the +sbt flag nor the 'scheduler_bind_type' argument of the system_flag/2 BIF have ever been supported on MacOSX. This since the last time I tried to find an api for binding threads to processors on MacOSX I couldn't find one. This might however have changed since then. It was a long time ago I checked. If you can find an api making it possible to implement this on MacOSX, a patch implementing this is welcome.

Regards,
Rickard Green, Erlang/OTP, Ericsson AB


More information about the erlang-questions mailing list