ArticleslgStudy

computer science

YDS algorithm

YDS algorithm 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 YDS algorithm rather than just read about it. In short: YDS is a scheduling algorithm for dynamic speed scaling processors which minimizes the total energy consumption. It was named after and developed by Yao et al.

Key takeaways

  • YDS algorithm 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 YDS algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of YDS algorithm from memory before moving on to harder problems.

Reference excerpt

YDS is a scheduling algorithm for dynamic speed scaling processors which minimizes the total energy consumption. It was named after and developed by Yao et al. There is both an online and an offline version of the algorithm.

Offline Algorithm Definitions:

There is a set of n Jobs J:=J1,...,Jn, where each job Ji has a release time ri, deadline di and a processing volume wi. I is a certain time interval. Also we have ΔI=1|I|∑Ji∈SIwi, the work density in I. And finally SI∈J is the set of Jobs that must be processed in I, that means Jobs with [ri,di]∈I. The algorithm then works as follows:

While J≠{} Determine the time interval I of maximum density ΔI. In I process the jobs of SI at speed ΔI according to EDF Set J:=J∖SI. Remove I from the time horizon and update the release times and deadlines of unscheduled jobs accordingly. end While

In other terms it's a recursive algorithm that will follow these steps until all jobs are scheduled:

Calculate all intensities for all possible combinations of intervals. This means that for every start time and end time combination the intensity of work is calculated. For this the times of all jobs whose arrival time and deadline lie inside the interval are added and divided by the interval length. To speed up the process, only combinations of arrival times and later deadlines need to be considered, as times without arrival of a process or deadline can be shrunk to a smaller interval with the same processes, thus increasing intensity, and negative intervals are invalid. Then the maximum intensity interval is selected. In case of multiple equally intense intervals, one can be chosen at will, as intensities of non-overlapping intervals do not influence each other, and removing a part of an interval will not change the intensity of the rest, as processes are removed proportionally. The processes inside this interval are scheduled using Earliest Deadline First, meaning that the job inside this interval whose deadline will arrive soonest is scheduled first, and so on. The jobs are executed at the above calculated intensity to fit all jobs inside the interval. The interval is removed from the timeline, as no more calculations can be scheduled here. To simplify further calculations, all arrival times and deadlines of remaining jobs are recalculated to omit already occupied times. For example, assume a job A with arrival time aA=0, deadline dA=10 and a workload wA=5, and a job B with aB=5, dB=10 and wB=4. Assume the previous interval was from time 3 to 8. To omit this interval the times of A and B need to be adjusted; workloads are unaffected, as no work has been done for either A or B. aA stays the same, as it's unaffected by later omissions. dA, however, needs to be changed to 5, as 10−(8−3)=5. This is the time job A has left before its deadline. The arrival time aB becomes 3, as it would have been inside the removed interval. dB also becomes 5, as the time left after the removed interval is 2. It is important, however, to remember the actual arrival and deadline times for later assembly of the scheduling. Repeat steps 1-3 until all jobs have been scheduled. Assemble jobs into final scheduling according to their allotted time intervals. Remember, though, that an interval may be split in two by another interval calculated earlier. For any Job instance, the algorithm computes an optimal schedule minimizing the total energy consumption.

See also Earliest deadline first scheduling

References

Worked examples

Example 1 — a first encounter with YDS algorithm

Start with the simplest possible case. Write down what YDS algorithm 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 YDS algorithm 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 YDS algorithm 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 YDS algorithm

In research
YDS algorithm 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 YDS algorithm 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
YDS algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Optimal scheduling, Processor scheduling algorithms, Real-time computing, so understanding it makes those chapters shorter.
In everyday life
Look for YDS algorithm 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 “YDS algorithm” →

How to study YDS algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what YDS algorithm 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 YDS algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is YDS algorithm in simple terms?

YDS is a scheduling algorithm for dynamic speed scaling processors which minimizes the total energy consumption. It was named after and developed by Yao et al.

Why does YDS algorithm 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 YDS algorithm?

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 YDS algorithm.

Tags

  • Optimal scheduling
  • Processor scheduling algorithms
  • Real-time computing

Keep exploring