erlangelixirschedulerbeam

Erlang: Will Process Priority Affect Long Running Tasks?


When a process is scheduled with low priority in erlang, it is scheduled into the low/normal queue with a count of 8. It has to be picked from the queue 8 times before getting scheduled.

Once it's scheduled, a counter for 2000 reductions is started. After the 2000 reductions the process will be suspended and rescheduled. When the process is rescheduled, is it scheduled with the same priority that the original process was?

That would make sense to me but I can't find this detail and it would have a big impact for long running computational tasks (not that it's a good idea to use BEAM for heavy computation!) .


Solution

  • When the process is rescheduled, is it scheduled with the same priority that the original process was?

    What do you mean by the original process? It is the same process so it retains its priority.