Round Robin – how to determine the optimal quantum of time

processschedulingunix

I have to calculate the proper quantum of time for Round Robin process scheduling algorithm. As I read in Tanenbaum's book, the quantum of time should cover like 80% of the running time of all processes.

Is there a formula how to find the optimal quantum of time?

Best Answer

You cannot choose an "optimal" quantum of time as long as you don't have any information beforehand about

  • how long each of your processes will run

  • how many new processes you have to expect within a given time frame

  • how quick each of your processes has to start / continue / respond

In a real system, you typically don't have those parameters beforehand, since this would mean to predict the future. Therefore, you will have typically have to make assumptions about those parameters, adapt the quantum dynamically to the environment, or choose a different kind of algorithm.