OS-Quantum Size

Determination of quantum size is critical to the effective operation of a computer system. Should the quantum be large or small? Should it be fixed or variable? Should it be the same for all users or should it be determined separately for each user?

When the quantum is very large, each process is given as much time as it needs to complete, so the round-robin scheme degenerates to FIFO. When the quantum is small, context switching overhead becomes a dominant factor and the performance of the system degrades to the point that most of the time is spent switching.

Quantum can be set between zero and infinity? When the quantum is near zero then the context switching overhead consumes most of the CPU resource. The interactive users experience a poor response times. As the quantum is increased, the response time improve. At least the point has been reached at which the percentage of CPU consumed by overhead is small enough that the users receive some CPU service. But response times are still not very good.

As the quantum time is increased, response times continue to improve. At one point the users are getting prompt responses from the system. Again the quantum is increased it is optimal. When the quantum is increased again the response times become sluggish again. As the quantum gets larger, it is becoming sufficiently large for each user to run to completion upon receiving the CPU. The scheduling is degenerating to FIFO in which longer processes make shorter ones wait, and the average waiting time increases as the longer processes run to completion upon receiving the CPU. The scheduling is degenerating to FIFO in which longer processes make shorter ones wait, and the average waiting time increases as the longer processes run to completion before yielding the CPU.

The interactive requests requires less time than the duration of the quantum. When an interactive process begins executing, it normally uses the CPU long enough to generate an I/O request. Once the I/O is generated that process yields the CPU to the next process. Optimal quantum varies from system to system, and it also varies from process to process.
Share this article :
 
Copyright © 2012. Best Online Tutorials | Source codes | Programming Languages - All Rights Reserved