Reductions: BEAM's Workload-Based Fairness Metric
Erlang's scheduler defines a 'reduction' as a unit of work (e.g., function call, message passing), preempting processes after a set number (e.g., 2000) to guarantee fair CPU time distribution.
The top 3
- Reductions vs. Time-Slicing: Fairness Champion: Erlang's BEAM scheduler uses 'reductions' for preemption, offering more equitable CPU distribution by measuring actual work, unlike time-slicing which can be expensive and platform-dependent due to OS time calls.
- Erlang Reductions: Unit of Work Defined: A 'reduction' in Erlang's BEAM is a unit of work, roughly equivalent to a function call or a fixed number of bytecode instructions, and includes operations like function application, arithmetic, or message passing.
- BEAM's Reduction Edge: Predictable Latency: By using reductions to ensure fair CPU allocation, BEAM's scheduler prevents process starvation and 'noisy neighbor' issues, guaranteeing soft real-time responsiveness and predictable latency essential for robust concurrent systems.
Sources
Open the full topic