While scheduling and resource control decisions are made independently of most functional characteristics of jobs, there are several functional properties that do affect these decisions. The workload model must explicitly describe these properties using functional parameters:
- Preemptivity
- Criticality
- Optional execution
- Laxity type
Preemptivity of Jobs:
Execution of jobs can often be interleaved. The scheduler may suspend the execution of a less urgent job and give the processor to a more urgent job. Later, the less urgent job can resume its execution. This interruption of job execution is called preemption. A job is preemptable if its execution can be suspended at any time to allow the execution of other jobs and can later be resumed from the point of suspension.
A job is non-preemptable if it must be executed from start to completion without interruption. This constraint may be imposed because its execution, if suspended, must be executed again from the beginning. Sometimes a job may be preemptable everywhere except for a small portion which is constrained to be non-preemptable.
An example is an interrupt handling job. An interrupt handling job usually begins by saving the state of the processor. This small portion of the job is non-preemptable since suspending the execution may cause serious errors in the data structures shared by the jobs.
During preemption the system must first save the state of the preempted job at the time of preemption so that it can resume the job from that state. Then the system must prepare the execution environment for the preempting job before starting the job. These actions are called a context switch. The amount of time required to accomplish a context switch is called a context- switch time. The terms context switch and context-switch time are used to mean the overhead work done during preemption, and the time required to accomplish this work.
For example, in the case of CPU jobs, the state of the preempted job includes the contents of the CPU registers. After saving the contents of the registers in memory and before the preempting job can start, the operating system must load the new register values, clear pipelines, perhaps clear the caches, etc.
Criticality of Jobs:
In any system, jobs are not equally important. The importance (or criticality) of a job is a positive number that indicates how critical a job is with respect to other jobs. It also define by the term priority and weight. The more important a job, the higher its priority or the larger its weight. During an overload when it is not possible to schedule all the jobs to meet their deadlines, it may make sense to sacrifice the less critical jobs, so that the more critical jobs meet their deadlines. For this reason, some scheduling algorithms try to optimize weighted performance measures, taking into account the importance of jobs.
Optional Executions:
It defines the identification of jobs (or portion of jobs) that are either optional or mandatory.
Laxity type or Laxity function:
Laxity can be used to indicate the relative importance of a time constraint, for example hard versus soft constraints. May be supplemented with a utility function (for soft constraints) that gives the usefulness of a result versus its degree of tardiness.