Minimizing mean flow-time with parallel processors and resource constraints