Linux kernel scheduling

kernel, linux, linux-kernel, scheduling

Solution

This problem actually is one of the major reasons why it is rarely used in common environments, since SJF algorithm requires accurate estimate of the runtime of all processes, which is only given in specialized environments.

In common situations you can only get estimated and inaccurate length of process running time, for example, by recording the length of previous CPU bursts of the same process, and use mathematical approximation methods to calculate how long it will run next time.

Problem

I wish to know how Old Linux scheduling algorithm SJF (shortest job first) calculates the process runtime ?

Original source