Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
1  
Where did you found that 80% thing? Having a short look into the book, Tanenbaum gives a example where the quantum of time is about 80% of the total "quantum of time + context change time", as a demonstration for a wasteful decision (and how not to choose parameters). Did you mean that? –  Doc Brown Jan 27 '13 at 7:20

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.