[kernel] Update scheduler policies

A few updates to scheduler policies:
* Grant processes a startup timeslice bonus for time spent loading the
  process
* Grant processes a small fraction of a timeslice for yielding the CPU
  with time left
This commit is contained in:
Justin C. Miller
2020-06-28 17:50:29 -07:00
parent 6c468a134b
commit 0a28d2db07
3 changed files with 21 additions and 8 deletions

View File

@@ -33,6 +33,9 @@ public:
/// How long the base timer quantum is, in us
static const uint64_t quantum_micros = 500;
/// How much extra time (in us) to give a process to let it load
static const uint64_t startup_bonus = 16000;
/// How many quanta a process gets before being rescheduled
static const uint16_t process_quanta = 10;