当前位置: 动力学知识库 > 问答 > 编程问答 >

Linux kernel scheduling

问题描述:

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

网友答案:

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.

网友答案:

If you have some bandwidth to burn, you might be able to find the actual code here. Start at 2.0, where I think you'll find it as experimental.

SJF was (IIRC) extremely short lived, for the exact reasons that ZelluX noted.

I think your only hope to understand the method behind its madness lives in the code at this point. You may be able to build it and get it to boot in a simulator.

Edit:

I'm now not completely sure if it ever did go into mainline. If you can't find it, don't blame me :)

分享给朋友:
您可能感兴趣的文章:
随机阅读: