ArticleslgStudy

computer science

Online job scheduling

Online job scheduling is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Online job scheduling rather than just read about it. In short: Online job scheduling is a variant of the optimal job scheduling problem, in which the jobs are not all available at the beginning, but come one after the other. Each job must be scheduled to a machine immediately when it arrives, and cannot be scheduled later.

Key takeaways

  • Online job scheduling belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Online job scheduling to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Online job scheduling from memory before moving on to harder problems.

Reference excerpt

Online job scheduling is a variant of the optimal job scheduling problem, in which the jobs are not all available at the beginning, but come one after the other. Each job must be scheduled to a machine immediately when it arrives, and cannot be scheduled later. This implies that the final scheduling might not be optimal in hindsight. Online algorithms for job scheduling are evaluated by their competitive ratio – the ratio between their performance and the best possible offline performance. Semi-online scheduling is a class of intermediate variants, between online scheduling and standard (offline) scheduling. In a semi-online problem, some – but not all – information about upcoming jobs is available in advance, e.g. the total size of all jobs or the maximum job size.

Online scheduling algorithms The first known algorithm for online job scheduling was List Scheduling, developed by Ronald Graham at 1966. It is a simple greedy algorithm that assigns the next job to the machine with the least load so far. Its competitive ratio for minimizing the maximum sum is 2-1/n (where n is the number of machines). This ratio is tight for n=2,3. The competitive ratio was improved in a series of later works. In 1999, Susanne Albers presented an algorithm that attains an approximation ratio of 1.923 for any number of machines, and proved a lower bound of 1.852, for minimizing the maximum sum. Elkind, Lam, Latifian, Neoh and Teh study a related problem called temporal fair division. A special case of this problem (where all agents have identical valuations) is equivalent to a variant of job scheduling, in which the goal is maximizing the minimum sum (this variant is sometimes called machine covering). They present an algorithm that guarantees envy-freeness up to one good (EF1). Although their paper assumes that all information on future items is available, this specific algorithm does not need future information (it is based on the Envy-graph procedure), so it is in fact an online algorithm.

Semi-online scheduling algorithms Kellerer, Kotov, Speranza and Tuza study three semi-online variants for minimizing the maximum sum, for n=2 machines (where for the fully-online variant, the optimal approximation ratio is 3/2):

There is a buffer of length k; the algorithm can either assign the job immediately, or store it in a buffer; if the buffer is full, one job from the buffer must be assigned. There is an algorithm with approximation ratio 4/3 for k=1, and it is tight even for larger k. Note that a fixed look-ahead of size k does not help; we must be able to store the jobs. There are two multi-processors that run in parallel; we send each job to each of the two multi-processors, and they can schedule it differently. At the end, the multi-processor with the smallest makespan is chosen. They present a heuristic with approximation ratio 4/3, and prove that it is tight. The sum of all job sizes is known in advance. They present a heuristic with approximation ratio 4/3, and prove that it is tight. Tan and Wu present optimal algorithms for three semi-online problems for maximizing the minimum sum (aka machine covering). They prove that:

If either the total value or the largest value is known in advance, then the approximation ratio of all algorithms is 1/(n-1). If both the total value and the largest value is known in advance, then the approximation ratio of all algorithms is 2/3 when n=3, and 1/(n-2) when n≥4. Dwibedy and Mohanti present a survey on semi-online scheduling algorithms, updated to 2022. Neoh, Peters and Teh present semi-online algorithms for other fairness notions besides max-min and min-max:

With identical valuations and information on the sum of valuations, when n=2 it is possible guarantee a multiplicative approximation of to (sqrt(5)-1)/2 EFx, and it is tight; when n≥3 no positive approximation is possible. Without any future information, it is impossible to guarantee any positive multiplicative approximation of EFx.

See also Online fair division – a more general problem, in which items should be allocated online to agents who may have different valuations.

References

Worked examples

Example 1 — a first encounter with Online job scheduling

Start with the simplest possible case. Write down what Online job scheduling claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Online job scheduling before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Online job scheduling ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Online job scheduling

In research
Online job scheduling appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Online job scheduling in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Online job scheduling is common in secondary-school and first-year university syllabi. It links to neighbouring topics Online algorithms, Optimal scheduling, so understanding it makes those chapters shorter.
In everyday life
Look for Online job scheduling outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Online job scheduling” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Online job scheduling in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Online job scheduling means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Online job scheduling out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Online job scheduling in simple terms?

Online job scheduling is a variant of the optimal job scheduling problem, in which the jobs are not all available at the beginning, but come one after the other. Each job must be scheduled to a machine immediately when it arrives, and cannot be scheduled later.

Why does Online job scheduling matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Online job scheduling?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Online job scheduling.

Tags

  • Online algorithms
  • Optimal scheduling

Keep exploring