code: private static void distributeShareFair(
        double total, final Collection<? extends Schedulable> schedulables) {
      BinarySearcher searcher = new BinarySearcher() {
        @Override
        protected double targetFunction(double x) {
          return totalShareWithRatio(schedulables, x);
        }
      };
      double ratio = searcher.getSolution(total);
      for (Schedulable schedulable : schedulables) {
        schedulable.share = shareWithRatio(schedulable, ratio);
      }
    }
docs: Distribute the total share among the list of schedulables according to the
  FAIR model.
  Finds a way to distribute the share in such a way that all the
  min and max reservations of the schedulables are satisfied
  @param total the share to be distributed
  @param schedulables the list of schedulables