GF.Queuing

This Function serves to optimise processing of traffic or resource usage, based on one or more queuing policies. A queuing policy formulates a decision on which job to perform next, where "job" can mean an action, processing task, data packet transfer et cetera. Queuing policies generally can occur in two different forms: To be able to prioritize jobs, Queuing must be paired with Caching, which then serves as the buffer for jobs that cannot be processed yet.
 * non-pre-emptive: in this form a job being processed cannot be interrupted; the queuing function simply decides on the next job in line;
 * pre-emptive: in this form an active job can be interrupted as soon as another non-active job takes precedence according to the queuing policy. The active job is deactivated (usually without losing the results of the processing thusfar), and the higher precedence job starts processing.

Examples of queuing policies are: The next job to be served is the one with the smallest size or shortest expected duration; if a new job comes in with smaller size or expected duration than the remaining size/duration of the currently running job, the running job is interrupted.
 * First in first out: This policy states that the job that has been waiting the longest is served first.
 * Last in first out: This policy states that the job that was added most recently will be served first.
 * Resource sharing: Service capacity is shared equally over multiple jobs.
 * Priority: A job with an assigned priority that is higher than that of another job is served first. This ofcourse means a priority criterium must be available, e.g. based on metadata.
 * Shortest job first: The next job to be served is the one with the smallest size or shortest expected duration.
 * Pre-emptive shortest job first: