Throughput maximization with multiclass workloads and resource constraints