The starvation can also be resolved by using a preemptive job scheduler. Unfortunately not all computer systems can handle this. Moreover, if jobs can be preempted it is more difficult to predict when the job will finish. When an idle job becomes eligible to run, it is assigned a priority. This priority is used to sort the jobs before the scheduler selects a job to start.
Many batch systems use queues to divide and classify the workload.
Each queue is then assigned a priority and sometimes each job is assigned a second priority to sort themselves within the queue. This classifying scheme is often too coarse. To take into account all parameters that set a batch job policy, you may end up with more queues than jobs. However, QoS is not a hierarchical scheme. It is merely a method of setting the parameters of a job when it enters the scheduler.