minix/include
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
..
arch atomicity fix when enabling paging 2010-03-22 07:42:52 +00:00
arpa create the getaddrinfo and getnameinfo library functions and friends 2010-01-21 06:38:17 +00:00
minix Userspace scheduling 2010-03-29 11:07:20 +00:00
net IPv6 address family and protocol familyconstants 2010-01-22 10:45:43 +00:00
netinet typo 2010-01-25 21:06:07 +00:00
sys Suppressed some warnings in the WIFSIGNALED macro. 2010-03-15 18:33:29 +00:00
a.out.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
alloca.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
ansi.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
ar.h Import NetBSD's make 2010-02-04 16:52:54 +00:00
assert.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
configfile.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
ctype.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
curses.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
dirent.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
env.h . made memory parsing function into a library call 2007-02-16 15:54:28 +00:00
err.h Add getopt_long library function 2010-01-25 18:11:21 +00:00
errno.h New RS and new signal handling for system processes. 2010-03-17 01:15:29 +00:00
fcntl.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
fenv.h Floating point support functions 2009-12-24 20:22:41 +00:00
float.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
fnmatch.h - new pread(), fnmatch() calls 2010-02-25 17:08:08 +00:00
fts.h Some misc portability-enhancing definitions. 2006-01-20 13:42:29 +00:00
getopt.h Add getopt_long library function 2010-01-25 18:11:21 +00:00
glob.h A glob() implementation. 2008-04-08 13:14:33 +00:00
grp.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
ifaddrs.h . getifaddrs() and data 2006-04-03 15:06:31 +00:00
inttypes.h Additions to inttypes.h format strings 2010-01-25 18:16:25 +00:00
lib.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
libgen.h Add dirname function, forgot to commit header before 2010-01-25 18:17:57 +00:00
libutil.h Header file for new -lutil (naming from freebsd) 2005-07-19 16:01:20 +00:00
limits.h Implementations of readv and writev 2010-01-08 13:40:34 +00:00
locale.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
Makefile cdecl calling convention expects the callee to pop the hidden pointer on 2010-03-24 17:25:17 +00:00
math.h Add a set of declarations to math.h. Since we don't actually have 2010-03-09 22:05:20 +00:00
mathconst.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
midiparser.h support for OSS. 2009-10-01 16:36:14 +00:00
netdb.h Improved compatibility with other Unix systems. 2005-06-10 15:12:03 +00:00
pwd.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
regex.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
regexp.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
setjmp.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
sgtty.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
signal.h Print stacktrace when a system service fails or when a core dump has to be generated for a user process. 2010-03-22 22:46:29 +00:00
stdarg.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
stddef.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
stdint.h Additions to inttypes.h format strings 2010-01-25 18:16:25 +00:00
stdio.h Use _POSIX_SOURCE rather than _MINIX to protect popen, pclose and snprintf 2010-01-18 18:06:43 +00:00
stdlib.h Implementation of strto(u)ll, documentation and tests for strto(u)l(l) 2009-12-09 19:01:38 +00:00
string.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strings.h Fix compiler warnings for pax 2006-03-24 14:03:25 +00:00
sysexits.h . getifaddrs() and data 2006-04-03 15:06:31 +00:00
syslog.h - VM_KERN_NOPAGEZERO feature is gone 2009-09-21 14:23:10 +00:00
tar.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
termcap.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
termios.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
time.h Add prototypes for a bunch of time-related functions. Surprisingly, 2010-03-09 22:10:58 +00:00
timers.h Changes to the include files in order to make cross-compilation possible. 2009-11-06 08:46:22 +00:00
tools.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
ttyent.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
ucontext.h - Add support for the ucontext system calls (getcontext, setcontext, 2010-03-12 15:58:41 +00:00
unistd.h More const correctness. 2010-03-23 14:25:09 +00:00
utime.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
utmp.h Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00