Go to file
Tomas Hruby b4cf88a04f Userspace scheduling
- cotributed by Bjorn Swift

- In this first phase, scheduling is moved from the kernel to the PM
  server. The next steps are to a) moving scheduling to its own server
  and b) include useful information in the "out of quantum" message,
  so that the scheduler can make use of this information.

- The kernel process table now keeps record of who is responsible for
  scheduling each process (p_scheduler). When this pointer is NULL,
  the process will be scheduled by the kernel. If such a process runs
  out of quantum, the kernel will simply renew its quantum an requeue
  it.

- When PM loads, it will take over scheduling of all running
  processes, except system processes, using sys_schedctl().
  Essentially, this only results in taking over init. As children
  inherit a scheduler from their parent, user space programs forked by
  init will inherit PM (for now) as their scheduler.

 - Once a process has been assigned a scheduler, and runs out of
   quantum, its RTS_NO_QUANTUM flag will be set and the process
   dequeued. The kernel will send a message to the scheduler, on the
   process' behalf, informing the scheduler that it has run out of
   quantum. The scheduler can take what ever action it pleases, based
   on its policy, and then reschedule the process using the
   sys_schedule() system call.

- Balance queues does not work as before. While the old in-kernel
  function used to renew the quantum of processes in the highest
  priority run queue, the user-space implementation only acts on
  processes that have been bumped down to a lower priority queue.
  This approach reacts slower to changes than the old one, but saves
  us sending a sys_schedule message for each process every time we
  balance the queues. Currently, when processes are moved up a
  priority queue, their quantum is also renewed, but this can be
  fiddled with.

- do_nice has been removed from kernel. PM answers to get- and
  setpriority calls, updates it's own nice variable as well as the
  max_run_queue. This will be refactored once scheduling is moved to a
  separate server. We will probably have PM update it's local nice
  value and then send a message to whoever is scheduling the process.

- changes to fix an issue in do_fork() where processes could run out
  of quantum but bypassing the code path that handles it correctly.
  The future plan is to remove the policy from do_fork() and implement
  it in userspace too.
2010-03-29 11:07:20 +00:00
benchmarks only check local benchmark dir if it exists 2010-02-04 18:15:10 +00:00
boot Lots of const correctness. 2010-03-27 14:31:00 +00:00
commands Lots of const correctness. 2010-03-27 14:31:00 +00:00
docs Minor docs/UPDATING fix 2010-03-24 13:41:38 +00:00
drivers More const correctness. 2010-03-23 14:25:09 +00:00
etc Fix crtso building with GCC 2010-03-24 10:11:17 +00:00
include Userspace scheduling 2010-03-29 11:07:20 +00:00
kernel Userspace scheduling 2010-03-29 11:07:20 +00:00
lib Userspace scheduling 2010-03-29 11:07:20 +00:00
man New RS and new signal handling for system processes. 2010-03-17 01:15:29 +00:00
servers Userspace scheduling 2010-03-29 11:07:20 +00:00
test New RS and new signal handling for system processes. 2010-03-17 01:15:29 +00:00
tools Prioritized NOTIFY messages for reliable asynchonrous delivery of system events. 2010-03-22 23:44:55 +00:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile Convert drivers/ and servers/ over to bsdmake 2010-03-22 21:25:22 +00:00