allocate slots for a job.