Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know that constant switching time of the Linux scheduler was a big achievement.

What would be the implication of a non-constant switching time?

The only obvious reason I can think of is real-time systems where we have to meet deadlines. There it is obviously not ideal if the switching time is "random". Are there any other good reasons that favour constant switching times?

share|improve this question
add comment

1 Answer

If I understand your question correctly, the main concern is latency vs. throughput, and this is a tradeoff with no universal solution. For audio or video playback, you want low latency, which you will achieve at the cost of more frequent task switching, which means lost throughput. For a supercomputer running physics simulations, you want to maximise throughput, which means less task switching, and therefore higher latency, unpredictable context switching time.

For a practical example, there is linux software that will do the same thing that a digital guitar effects box does. In the configuration you have to select a buffer size manually, because with a larger buffer you are less likely to get audio clicks and dropouts, because there are fewer context switches during audio processing, but you get a noticeable audio delay, because of the buffer size. With a lower buffer size you can reduce that delay, but the shorter you get the delay, the more often you will get clicks, skips, and dropouts in the audio.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.