Abstract


Minimum Granularity


Target Latency


  • The desired maximum amount of time that a Process (进程) should wait before being given a chance to run again. So the process doesn’t seem laggy on the user side
  • In Linux Kernel, it is 6ms
  • Target Latency is exceeded when there is enough Process (进程) for Minimum Granularity to take effect - Process will seem laggy on user side, so rebooting to clear some Process will make computer seems faster

2 Types of Scheduling


Fixed Timeslice Round-Robin Scheduling

Laggy Situation

When there is a lot of Process (进程), and each of them gets a fixed Timeslice, the one cycle of all Process will take a significant amount of time

Dynamic Timeslice Round-Robin Scheduling

Helps to make each Process be more responsive

Ensures each Process will get to run again before it seems laggy to the user. As long Minimum Granularity is ensured and Target Latency is not exceeded

Process gets to run faster when there is less Process

The Timeslice is a ratio of Target Latency and total Process. Less process means more time for each process