public void dynamicWithReservedProcessors(BigDecimal factor, int reservedProcessors) {
    if (factor.compareTo(BigDecimal.ONE) > 0 && reservedProcessors > 0) {
      throw new IllegalArgumentException("A factor larger than 1 with reserved threads is unsupported.");
    }
    if (reservedProcessors < 0) {
      throw new IllegalArgumentException("A negative value for reservedProcessors is illegal.");
    }
    int availableProcessors = Runtime.getRuntime().availableProcessors();
    int wantedParallelism = Math.min(
      factor.multiply(BigDecimal.valueOf(availableProcessors)).intValue(),
      availableProcessors - reservedProcessors);
    int parallelism = Math.max(1, wantedParallelism);
    fixed(parallelism);
  }
Computes the desired parallelism based on the number of available
processors multiplied by the {@code factor} however it makes sure to keep {@code reservedProcessors} free.
<p>
Example:
<pre>
Given a configuration of {@code dynamicWithReservedProcessors(1, 2)}
On a system with 8 threads 6 threads will be used for testing.
On a system with 4 threads only 2 threads will be used for testing.
On a system with 1 or 2 threads only 1 thread will be used for testing, effectively deactivating parallel execution.
</pre>

@param factor to use to determine parallelism (must be {@code <= 1})
@param reservedProcessors the number for processors to reserve for other things (must be {@code >= 0})
spock-core/src/main/java/spock/config/ParallelConfiguration.java